Ridrik Posted July 23, 2009 Share Posted July 23, 2009 And there's the same error i have with my client, what were you doing this whole time? Link to comment Share on other sites More sharing options...
Dennys Posted July 23, 2009 Author Share Posted July 23, 2009 Im telling you, you must nto have compiled it, Look at attachmentsP.S. The Map was dark and i was scared of what was under the Bed :( Link to comment Share on other sites More sharing options...
Ridrik Posted July 23, 2009 Share Posted July 23, 2009 Okay can you pm me the CLIENT again please? because server works and client still run time error 9, but server is okay. Link to comment Share on other sites More sharing options...
VitinhooxD Posted July 23, 2009 Share Posted July 23, 2009 EDIT: Ups sorry , i tought that was SadScript but is VB6 ,, sorry .but else if you need sadscripting help pm mePS:Good luck with the project guys! Link to comment Share on other sites More sharing options...
Ridrik Posted July 23, 2009 Share Posted July 23, 2009 lol i got it to work woohooo pet script here we come. Link to comment Share on other sites More sharing options...
Dennys Posted July 23, 2009 Author Share Posted July 23, 2009 What was the problem?BTW vitinhooxD if you want to help weve got a scripting part to this system too. Link to comment Share on other sites More sharing options...
Ridrik Posted July 23, 2009 Share Posted July 23, 2009 ~~Idk, some script problems, now there's a problem, "script out of range" when i try to join the game >.>~~Nevermind everything works perfectly. Good job. Our progress is like 50% done.EDID: The only bug right now is, when you lauch the client, it gives an error, re-creates config.ini to default IP: 127.0.0.1 and port 4001, so basically people on my server have to put the ip and the port every since time. Link to comment Share on other sites More sharing options...
Dennys Posted July 23, 2009 Author Share Posted July 23, 2009 lol my brain is overloaded… been a while since ive had to think so much xD, i remember the first day of this project i spent all night thinkign about it and thoughts changed and by the end of the night i had figured out a plan to remodel my room to have more space xD Link to comment Share on other sites More sharing options...
VitinhooxD Posted July 23, 2009 Share Posted July 23, 2009 @Bloodmyst:> BTW vitinhooxD if you want to help weve got a scripting part to this system too.Ok =) , can the developers talk via msn to evite flood? Link to comment Share on other sites More sharing options...
Dennys Posted July 23, 2009 Author Share Posted July 23, 2009 Hmm check your config and read me the insides….. Anyways ill fix it via hardcode and send you it but ill give you a temporary FixBtw VintihooxD once we get to sadscripting ill call you(PM you) Link to comment Share on other sites More sharing options...
VitinhooxD Posted July 23, 2009 Share Posted July 23, 2009 wowwww i think i found i way to the pet attack!!! VIA SADSCRIPT!!(don't know if will work!) Link to comment Share on other sites More sharing options...
Ridrik Posted July 23, 2009 Share Posted July 23, 2009 Lol anyway now what are we gonna work on? i posted a lil bug on the top there. We need to spawn the pet by call spawnpet (NOT NPC) or idk how? Link to comment Share on other sites More sharing options...
Dennys Posted July 23, 2009 Author Share Posted July 23, 2009 @Bloodmyst:> Hmm check your config and read me the insides….. Anyways ill fix it via hardcode and send you it but ill give you a temporary Fix> > Btw VintihooxD once we get to sadscripting ill call you(PM you)DONT IGNORE ME :( Link to comment Share on other sites More sharing options...
Ridrik Posted July 23, 2009 Share Posted July 23, 2009 Bloodmyst, we need to get command "spawnpet" working!!! Link to comment Share on other sites More sharing options...
VitinhooxD Posted July 23, 2009 Share Posted July 23, 2009 hmm , should be to summon teh pet Call ScriptSpawnNpc(ByVal MapNpcNum As Long, ByVal MapNum As Long, ByVal spawn_X As Long, ByVal spawn_Y As Long, ByVal NPCnum As Long) Link to comment Share on other sites More sharing options...
Dennys Posted July 23, 2009 Author Share Posted July 23, 2009 Heres Fix:Replace THese 2 Subs in ModGeneral:```Private Sub LoadConfig() Dim FileName As String On Error GoTo ErrorHandle FileName = App.path & "\config.ini" frmMirage.chkBubbleBar.Value = CLng(ReadINI("CONFIG", "SpeechBubbles", FileName)) frmMirage.chkNpcBar.Value = CLng(ReadINI("CONFIG", "NpcBar", FileName)) frmMirage.chkPetBar.Value = CLng(ReadINI("PET", "PETBar", FileName)) frmMirage.chkNpcName.Value = CLng(ReadINI("CONFIG", "NPCName", FileName)) frmMirage.chkPetName.Value = CLng(ReadINI("PET", "PETName", FileName)) frmMirage.chkPlayerBar.Value = CLng(ReadINI("CONFIG", "PlayerBar", FileName)) frmMirage.chkPlayerName.Value = CLng(ReadINI("CONFIG", "PlayerName", FileName)) frmMirage.chkPlayerDamage.Value = CLng(ReadINI("CONFIG", "NPCDamage", FileName)) frmMirage.chkNpcDamage.Value = ReadINI("CONFIG", "PlayerDamage", FileName) ' frmMirage.chkMusic.Value = CLng(ReadINI("CONFIG", "Music", FileName)) <-- This caused connectivity issues upon disabling music [Devil Of Duce] frmMirage.chkSound.Value = CLng(ReadINI("CONFIG", "Sound", FileName)) frmMirage.chkAutoScroll.Value = CLng(ReadINI("CONFIG", "AutoScroll", FileName)) AutoLogin = CLng(ReadINI("CONFIG", "Auto", FileName)) Exit SubErrorHandle: Call MsgBox("Error reading from config.ini, re-creating file.") Kill "config.ini" Call FileCreateConfigINIEnd SubPrivate Sub FileCreateConfigINI() WriteINI "IPCONFIG", "IP", "127.0.0.1", App.path & "\config.ini" WriteINI "IPCONFIG", "PORT", 4001, App.path & "\config.ini" WriteINI "CONFIG", "Account", vbNullString, App.path & "\config.ini" WriteINI "CONFIG", "Password", vbNullString, App.path & "\config.ini" WriteINI "CONFIG", "WebSite", vbNullString, App.path & "\config.ini" WriteINI "CONFIG", "SpeechBubbles", 1, App.path & "\config.ini" WriteINI "CONFIG", "NpcBar", 1, App.path & "\config.ini" WriteINI "PET", "PETBar", 1, App.path & "\config.ini" WriteINI "PET", "PETName", 1, App.path & "\config.ini" WriteINI "CONFIG", "NPCName", 1, App.path & "\config.ini" WriteINI "CONFIG", "NPCDamage", 1, App.path & "\config.ini" WriteINI "CONFIG", "PlayerBar", 1, App.path & "\config.ini" WriteINI "CONFIG", "PlayerName", 1, App.path & "\config.ini" WriteINI "CONFIG", "PlayerDamage", 1, App.path & "\config.ini" WriteINI "CONFIG", "MapGrid", 1, App.path & "\config.ini" WriteINI "CONFIG", "Music", 1, App.path & "\config.ini" WriteINI "CONFIG", "Sound", 1, App.path & "\config.ini" WriteINI "CONFIG", "AutoScroll", 1, App.path & "\config.ini" WriteINI "CONFIG", "Auto", 0, App.path & "\config.ini"End Sub``` Link to comment Share on other sites More sharing options...
VitinhooxD Posted July 23, 2009 Share Posted July 23, 2009 lol i got it working on my game put like this:Call ScriptSpawnNpc(1, GetPlayerMap(index) , ""& GetPlayerX(index) + 2 , ""& GetPlayerY(index) , (NPC NUM))in npc num put the NPC num =X Link to comment Share on other sites More sharing options...
Dennys Posted July 23, 2009 Author Share Posted July 23, 2009 our PetSpawn will prolly be soemthign like Call ScriptPsawnPet(1, Map, X, Y, PetNum)I knwo ive used the script before, when i was making the Pure Sadscript Pets Link to comment Share on other sites More sharing options...
Ridrik Posted July 23, 2009 Share Posted July 23, 2009 VitinhooxD, we need scriptspawnPET not NPC, because we totally re-did the source from top to button, and made a totally new thing from NPC to PET.:cool: yeah what blood said. Link to comment Share on other sites More sharing options...
VitinhooxD Posted July 23, 2009 Share Posted July 23, 2009 hmm.PM me when you need sad script ok? Link to comment Share on other sites More sharing options...
Ridrik Posted July 23, 2009 Share Posted July 23, 2009 We sure will ;)Blood, let's start figuring out for the spawn. Link to comment Share on other sites More sharing options...
Dennys Posted July 23, 2009 Author Share Posted July 23, 2009 @Ridrik:> :cool: yeah what blood said.>.> Link to comment Share on other sites More sharing options...
Dennys Posted July 23, 2009 Author Share Posted July 23, 2009 I already added SpawnPet all we need to do is ScriptSpawnPet….. which will go in Clscommands used by sadscripts. Unless we decide not to do any sadscript. And we make some sort of System Purely by coding, But then its hard to Make it Smmon pet from item *BRAIN POPS* Link to comment Share on other sites More sharing options...
Ridrik Posted July 23, 2009 Share Posted July 23, 2009 Not an item ,but SPELL. Did you do this code? :```Sub ScriptSpawnNpc(ByVal MapNpcNum As Long, ByVal MapNum As Long, ByVal spawn_X As Long, ByVal spawn_Y As Long, ByVal NPCnum As Long) ' NPC_index map_number X spawn Y spawn NPC_number Dim packet As String Dim I As Long ' Check for subscript out of range If MapNpcNum < 0 Or MapNpcNum > MAX_MAP_NPCS Or MapNum <= 0 Or MapNum > MAX_MAPS Then Exit Sub End If If NPCnum = 0 Then Map(MapNum).Revision = Map(MapNum).Revision + 1 MapNPC(MapNum, MapNpcNum).num = 0 Map(MapNum).NPC(MapNpcNum) = 0 MapNPC(MapNum, MapNpcNum).Target = 0 MapNPC(MapNum, MapNpcNum).HP = 0 MapNPC(MapNum, MapNpcNum).MP = 0 MapNPC(MapNum, MapNpcNum).SP = 0 MapNPC(MapNum, MapNpcNum).Dir = 0 MapNPC(MapNum, MapNpcNum).X = 0 MapNPC(MapNum, MapNpcNum).Y = 0 ' Packet = "SPAWNNPC" & SEP_CHAR & MapNpcNum & SEP_CHAR & MapNpc(mapnum, MapNpcNum).num & SEP_CHAR & MapNpc(mapnum, MapNpcNum).X & SEP_CHAR & MapNpc(mapnum, MapNpcNum).Y & SEP_CHAR & MapNpc(mapnum, MapNpcNum).Dir & SEP_CHAR & Npc(MapNpc(mapnum, MapNpcNum).num).Big & END_CHAR ' Call SendDataToMap(mapnum, Packet) Call SaveMap(MapNum) End If' MapNpc(mapnum, MapNpcNum).num = 0' MapNpc(mapnum, MapNpcNum).SpawnWait = GetTickCount' MapNpc(mapnum, MapNpcNum).HP = 0' Call SendDataToMap(mapnum, "NPCDEAD" & SEP_CHAR & MapNpcNum & END_CHAR) Map(MapNum).Revision = Map(MapNum).Revision + 1 MapNPC(MapNum, MapNpcNum).num = NPCnum Map(MapNum).NPC(MapNpcNum) = NPCnum MapNPC(MapNum, MapNpcNum).Target = 0 MapNPC(MapNum, MapNpcNum).HP = GetNpcMaxHP(NPCnum) MapNPC(MapNum, MapNpcNum).MP = GetNpcMaxMP(NPCnum) MapNPC(MapNum, MapNpcNum).SP = GetNpcMaxSP(NPCnum) MapNPC(MapNum, MapNpcNum).Dir = Int(Rnd * 4) MapNPC(MapNum, MapNpcNum).X = spawn_X MapNPC(MapNum, MapNpcNum).Y = spawn_Y packet = "SPAWNNPC" & SEP_CHAR & MapNpcNum & SEP_CHAR & MapNPC(MapNum, MapNpcNum).num & SEP_CHAR & MapNPC(MapNum, MapNpcNum).X & SEP_CHAR & MapNPC(MapNum, MapNpcNum).Y & SEP_CHAR & MapNPC(MapNum, MapNpcNum).Dir & SEP_CHAR & NPC(MapNPC(MapNum, MapNpcNum).num).Big & END_CHAR Call SendDataToMap(MapNum, packet) Call SaveMap(MapNum) For I = 1 To MAX_PLAYERS If IsPlaying(I) And GetPlayerMap(I) = MapNum Then Call SendDataTo(I, "CHECKFORMAP" & SEP_CHAR & GetPlayerMap(I) & SEP_CHAR & Map(GetPlayerMap(I)).Revision & END_CHAR) End If Next IEnd Sub```This is for spawn. And this is how you call it out:```Sub ScriptSpawnNpc(ByVal MapNpcNum As Long, ByVal MapNum As Long, ByVal spawn_X As Long, ByVal spawn_Y As Long, ByVal NPCnum As Long```EDIT: lol exept change the NPC to Pet and that's it. Link to comment Share on other sites More sharing options...
Dennys Posted July 23, 2009 Author Share Posted July 23, 2009 No i did this code which is used by server Not by sadscripting.```Sub SpawnPet(ByVal MapPetNum As Long, ByVal MapNum As Long) Dim packet As String Dim PETnum As Long Dim I As Long Dim X As Long Dim Y As Long Dim Spawned As Boolean ' Check for subscript out of range If MapPetNum < 1 Or MapPetNum > MAX_MAP_PETS Or MapNum < 1 Or MapNum > MAX_MAPS Then Exit Sub End If PETnum = Map(MapNum).PET(MapPetNum) If PETnum > 0 Then If GameTime = TIME_NIGHT Then If PETS(PETnum).SpawnTime = 1 Then MapPET(MapNum, MapPetNum).num = 0 MapPET(MapNum, MapPetNum).SpawnWait = GetTickCount MapPET(MapNum, MapPetNum).HP = 0 Call SendDataToMap(MapNum, "PetDEAD" & SEP_CHAR & MapPetNum & END_CHAR) Exit Sub End If Else If PETS(PETnum).SpawnTime = 2 Then MapPET(MapNum, MapPetNum).num = 0 MapPET(MapNum, MapPetNum).SpawnWait = GetTickCount MapPET(MapNum, MapPetNum).HP = 0 Call SendDataToMap(MapNum, "PETDEAD" & SEP_CHAR & MapPetNum & END_CHAR) Exit Sub End If End If MapPET(MapNum, MapPetNum).num = PETnum MapPET(MapNum, MapPetNum).Target = 0 MapPET(MapNum, MapPetNum).HP = GetNpcMaxHP(PETnum) MapPET(MapNum, MapPetNum).MP = GetNpcMaxMP(PETnum) MapPET(MapNum, MapPetNum).SP = GetNpcMaxSP(PETnum) MapPET(MapNum, MapPetNum).Dir = Int(Rnd * 4) ' This means the admin wants to do a random spawn. [Mellowz] If Map(MapNum).SpawnX(MapPetNum) = 0 Or Map(MapNum).SpawnY(MapPetNum) = 0 Then For I = 1 To 100 X = Int(Rnd * MAX_MAPX) Y = Int(Rnd * MAX_MAPY) If Map(MapNum).Tile(X, Y).Type = TILE_TYPE_WALKABLE Then MapPET(MapNum, MapPetNum).X = X MapPET(MapNum, MapPetNum).Y = Y Spawned = True Exit For End If Next I ' Didn't spawn, so now we'll just try to find a free tile If Not Spawned Then For Y = 0 To MAX_MAPY For X = 0 To MAX_MAPX If Map(MapNum).Tile(X, Y).Type = TILE_TYPE_WALKABLE Then MapNPC(MapNum, MapPetNum).X = X MapNPC(MapNum, MapPetNum).Y = Y Spawned = True End If Next X Next Y End If Else ' We subtract one because Rand is ListIndex 0\. [Mellowz] MapPET(MapNum, MapPetNum).X = Map(MapNum).SpawnX(MapPetNum) - 1 MapPET(MapNum, MapPetNum).Y = Map(MapNum).SpawnY(MapPetNum) - 1 Spawned = True End If ' If we suceeded in spawning then send it to everyone If Spawned Then packet = "SPAWNPET" & SEP_CHAR & MapPetNum & SEP_CHAR & MapPET(MapNum, MapPetNum).num & SEP_CHAR & MapPET(MapNum, MapPetNum).X & SEP_CHAR & MapPET(MapNum, MapPetNum).Y & SEP_CHAR & MapPET(MapNum, MapPetNum).Dir & SEP_CHAR & PETS(MapPET(MapNum, MapPetNum).num).Big & END_CHAR Call SendDataToMap(MapNum, packet) End If End If ' Enable this to display HP when monsters spawn. ' Call SendDataToMap(MapNum, "npchp" & SEP_CHAR & MapNpcNum & SEP_CHAR & MapNPC(MapNum, MapNpcNum).HP & SEP_CHAR & GetNpcMaxHP(MapNPC(MapNum, MapNpcNum).num) & END_CHAR)End Sub``` Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now