RyokuHasu Posted June 7, 2011 Author Share Posted June 7, 2011 **ONLY for fixing the "older" version of Lightning's pet system (before 6/11/11)**Yet another pet system Upgrade By Ryoku Hasu**Prerequired TUT - Lightning's pet system**http://www.touchofdeathforums.com/smf/index.php/topic,69521.0.html**Highly suggested Pet Mods- by RyokuHasu**http://www.touchofdeathforums.com/smf/index.php/topic,69925.0.htmlhttp://www.touchofdeathforums.com/smf/index.php/topic,72517.msg778251.htmlfixes pet loading/ unloadingandremoves pets without fail on-log out-server shutdown and start up-server crash and startup**SERVER**in modPlayerin Sub LeftGame above```' leave party.```add```PetDisband Index, GetPlayerMap(Index)For i = 1 To Player_HighIndex    If IsPlaying(i) Then         If GetPlayerMap(i) = GetPlayerMap(Index) Then              Call PlayerWarp(i, GetPlayerMap(Index), GetPlayerX(i), GetPlayerY(i))         End If    End IfNext```AND in modGeneralunder Public Sub ClearGameData() add```Call SetStatus("Clearing pets...")Call ClearPets```to the bottomin modDatabase right bellow```' **********' ** Maps **' **********```add```Sub ClearPets()Dim i As LongDim x As LongFor i = 1 To MAX_MAPS  For x = 1 To MAX_MAP_NPCS     If MapNpc(i).NPC(x).IsPet Then       Call ZeroMemory(ByVal VarPtr(MapNpc(i).NPC(x)), LenB(MapNpc(i).NPC(x)))       Map(i).NPC(x) = 0       MapNpc(i).NPC(x).Num = 0       MapCache_Create (i)     End If  NextNextEnd Sub```in modGameLogicunder sub PetDisband add```Dim i As Integer```at the topand add, to the bottom of the sub```For i = 1 To Player_HighIndex  If IsPlaying(i) Then    If GetPlayerMap(i) = GetPlayerMap(Index) Then       Call PlayerWarp(i, GetPlayerMap(Index), GetPlayerX(i), GetPlayerY(i))    End If  End IfNext```in the same mod under Sub SpawnPet, at the bottom, replace```'re-warp the players on the mapFor i = 1 To Player_HighIndex  If IsPlaying(i) Then    If GetPlayerMap(i) = GetPlayerMap(Index) Then       Call PlayerWarp(Index, PlayerMap, GetPlayerX(Index), GetPlayerY(Index))    End If  End IfNext```with```'re-warp the players on the mapFor i = 1 To Player_HighIndex  If IsPlaying(i) Then     If GetPlayerMap(i) = GetPlayerMap(Index) Then       Call PlayerWarp(i, PlayerMap, GetPlayerX(i), GetPlayerY(i))    End If  End IfNext```in modPlayerfind```'switch maps PetDisband Index, OldMap```and UNDER it add```For i = 1 To Player_HighIndex  If IsPlaying(i) Then    If GetPlayerMap(i) = OldMap Then      Call PlayerWarp(i, OldMap, GetPlayerX(i), GetPlayerY(i))    End If  End IfNext```in modCombat , in Sub NpcAttackNpcFind```PetDisband petowner, GetPlayerMap(petowner)```and add below it```For i = 1 To Player_HighIndex  If IsPlaying(i) Then     If GetPlayerMap(i) = GetPlayerMap(petowner) Then       Call PlayerWarp(i, GetPlayerMap(petowner), GetPlayerX(i), GetPlayerY(i))     End If  End IfNext``` Link to comment Share on other sites More sharing options...
EclipseCommunity Posted June 7, 2011 Share Posted June 7, 2011 –removed-- Link to comment Share on other sites More sharing options...
RyokuHasu Posted June 7, 2011 Author Share Posted June 7, 2011 FIXEDClear pets was done incorrectly for solving the crash problem. Dont worry it works now. I hope.(its really hard to recreate some of the problems but they are were there) Link to comment Share on other sites More sharing options...
Dzastin Posted June 9, 2011 Share Posted June 9, 2011 don't work, when my pet is killed, he saved in map properties. Link to comment Share on other sites More sharing options...
RyokuHasu Posted June 9, 2011 Author Share Posted June 9, 2011 O.o…. did you restart the server? ... its spose to clean on server boot.the log out part only ensure your pet is erased if its on the same map, but the sever pet cleanis on restart.* * *Oops I didnt clear them corectly even on restart.**FIXED**Ill add a correct "remove on death" too =PEdit: Also, I found a way to test this and it works on the server load =PEdit v2: added spawn and despawn fixes.. now you should have no problems with out of place pets. Link to comment Share on other sites More sharing options...
Sr_Sirius Posted June 9, 2011 Share Posted June 9, 2011 In in modGameLogicunder sub addCode: [Select]Dim i As Integerat the topWhat sub you mean? i think miss a pieace of tutorial. Link to comment Share on other sites More sharing options...
RyokuHasu Posted June 9, 2011 Author Share Posted June 9, 2011 oops i edited that let me fix that XD Link to comment Share on other sites More sharing options...
Sr_Sirius Posted June 9, 2011 Share Posted June 9, 2011 hahaha no problem, thank you. Link to comment Share on other sites More sharing options...
RyokuHasu Posted June 9, 2011 Author Share Posted June 9, 2011 it was sub PetDisband lolEnjoy my extreamly needed pet fix XD(dont forget the pet combat fix and summon with items tuts if you want them too ;D) Link to comment Share on other sites More sharing options...
Whitepinkbun Posted June 10, 2011 Share Posted June 10, 2011 All righty then got all these onto my game aswell so ill see if it improves it XD ill post any bugs i find ^^ Link to comment Share on other sites More sharing options...
Whitepinkbun Posted June 10, 2011 Share Posted June 10, 2011 Don't mean to double post but mine has a bug… when i leave a map my pet stays there till i return yet when i go to the next map i have one there as well... i had 2 accounts loged on to watch it and this is what i seen... Just mine or is this a bug xDAlso when i walk into a room with my pet and someone has a pet theirs is destroyed by mine lol...er to clarify its just destroyed not killed or attacked just POOF gone xD!I hope im not havin problems because im using spells to summon my pets not items >.< Link to comment Share on other sites More sharing options...
RyokuHasu Posted June 10, 2011 Author Share Posted June 10, 2011 hmmm…. Im not sure, ill take a look when I get back from the doctor. Check back later for any updates. Link to comment Share on other sites More sharing options...
RyokuHasu Posted June 10, 2011 Author Share Posted June 10, 2011 @Whitepinkbun:> Don't mean to double post but mine has a bug… when i leave a map my pet stays there till i return yet when i go to the next map i have one there as well... i had 2 accounts loged on to watch it and this is what i seen... Just mine or is this a bug xDFound your problem the map isnt reloading every player on the map when you leave. your pet DOSE get removed, however no oter players are reloaded to see that its gone.to fix this go in the server, in mod playerfind```'switch maps PetDisband Index, OldMap```and UNDER it add```For i = 1 To Player_HighIndex  If IsPlaying(i) Then    If GetPlayerMap(i) = OldMap Then      Call PlayerWarp(i, OldMap, GetPlayerX(i), GetPlayerY(i))    End If  End IfNext```I added it to the Tut, also I fixed a few other things so please re-read this tut. Link to comment Share on other sites More sharing options...
RyokuHasu Posted June 10, 2011 Author Share Posted June 10, 2011 @aℓνιη:> don't work, when my pet is killed, he saved in map properties.Ya I saw that too, but then i checked the map properties again and it was gone, just give it a min. Link to comment Share on other sites More sharing options...
Whitepinkbun Posted June 10, 2011 Share Posted June 10, 2011 Great work RyokuHasu your an inspiration that's for sure. I'll try it out see how its goes xDEEEP Run-Time error '9' subscript out of range xD… server crashed when i went two a different room odly enough when i went to my 3rd room first transition made him... jump around the map lol xDAHAHAH logged in on another toon and walked to each room the 2 i visited and one i crashed on all had a pet in it jumpin around the screen randomly ^^ im going to try and do the tutorial from the start no modifications on my behalf and see if its working lol.... I'll get back to you Link to comment Share on other sites More sharing options...
Whitepinkbun Posted June 10, 2011 Share Posted June 10, 2011 Followed it to the letter pet overwrites other npcs lol… jumps randomly when walking... I get bombarded with You are below level 10, you cannot attack another player with a pet yet! and none of my buttons seam to work now ... lol Progress was not made >.<... Link to comment Share on other sites More sharing options...
RyokuHasu Posted June 10, 2011 Author Share Posted June 10, 2011 @Whitepinkbun:> Followed it to the letter pet overwrites other npcs lol… jumps randomly when walking... I get bombarded with You are below level 10, you cannot attack another player with a pet yet! and none of my buttons seam to work now ... lol Progress was not made >.<...O.o…. then you either DIDNT follow them correctly... or your version has some serious bugs.Ive been testing these NON stop for 3 days ... Im pretty shure these have LOTS of progress behind then.if you are realy having tooo many problems, also try deleting all your NPC filesEdit: also looking at your post count tells me you are VERY new here and that you started with an advanced edit maby just a little too early. =/ Link to comment Share on other sites More sharing options...
Whitepinkbun Posted June 11, 2011 Share Posted June 11, 2011 I guess I will have to try from a untouched eo2 and see how it goes it may be one of the features of my game is causing conflict ^^ Thanks for all the help wish me luck lol… Link to comment Share on other sites More sharing options...
Yxxe Posted June 11, 2011 Share Posted June 11, 2011 Why are you claiming credit all of a sudden? Half of the "fixes" you have posted worked in the first place. :| I'll be posting a few urgent updates myself this afternoon.EDIT: http://www.touchofdeathforums.com/smf/index.php/topic,69521.msg779874.html#msg779874 Link to comment Share on other sites More sharing options...
RyokuHasu Posted June 11, 2011 Author Share Posted June 11, 2011 @Lightning:> Why are you claiming credit all of a sudden? Half of the "fixes" you have posted worked in the first place. :| I'll be posting a few urgent updates myself this afternoon.I didnt take creadit from you I was taking credit for my fixes, i was saying cite credit for both. Im sorry if you think i was taking all the credit, i just wanted credit for some fixes. =PÂ and alot of these fixes did not work before, you didnt rewarp the players to the map in most of the cases, wich is what most of these are, just rewarping the map.the pet cleaner part is to help those who were complaining about the pets not getting removed thier game was spammed with "trash pets"also if it make you feel any beter i removed the cite credit lines. Link to comment Share on other sites More sharing options...
EclipseCommunity Posted June 13, 2011 Share Posted June 13, 2011 How much of this has been changed because I added it before you made changes to it. Link to comment Share on other sites More sharing options...
Yxxe Posted June 13, 2011 Share Posted June 13, 2011 @Xlithan:> How much of this has been changed because I added it before you made changes to it.Just run through my tutorial again. I fixed it up a few days ago, so all pets are cached server-side etc. Take a look at the last few posts for a more in-depth description. :Phttp://www.touchofdeathforums.com/smf/index.php/topic,69521.0.html Link to comment Share on other sites More sharing options...
EclipseCommunity Posted June 14, 2011 Share Posted June 14, 2011 I'm using Modification(S) latest. Link to comment Share on other sites More sharing options...
Fragment Posted July 2, 2011 Share Posted July 2, 2011 even modifcation is bugged up, if you have a large map and you summon a pet, close the server by the x and then when you go back in, your pet is stuck on the map Link to comment Share on other sites More sharing options...
Yxxe Posted July 3, 2011 Share Posted July 3, 2011 @Xlithan:> I'm using Modification(S) latest.@Fragment:> even modifcation is bugged up, if you have a large map and you summon a pet, close the server by the x and then when you go back in, your pet is stuck on the mapModification(s) runs off of an ancient version of my Pet System. 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