RyokuHasu Posted March 13, 2011 Share Posted March 13, 2011 =P i know its not the exact sameBUT somtimes code breaks for an instant, its like that. One time while working on Bleach: Bladed's mirror people kept saying that thier kido spells were not calling the animations but still working (this is in a 3d combat MMO i made) I the code for some reason had a 1 in a 1000 chance of skiping the animation sequence, there was nothing i could do, i poured over it for 3 days looking for the problem, and cam back and said sorry, it looks fine. Link to comment Share on other sites More sharing options...
RyokuHasu Posted March 14, 2011 Share Posted March 14, 2011 EDITED MULTI PET TUTORIAL!!!Pets can now change maps again using the multiple pets tutorial.(p.s. The pets don't Disband after death… i fixed it on mine... but i dont fell like sharing, too tired, good night =P)| Link in my sig.|V Link to comment Share on other sites More sharing options...
peekay Posted March 14, 2011 Share Posted March 14, 2011 few other things u need to fix lightning…- onpetdeath the pets target needs to switch to player- if the server crashes for some reason and u enter the game again your pet is there uncontrolable... duno if u can fix that tho Link to comment Share on other sites More sharing options...
Yxxe Posted March 14, 2011 Author Share Posted March 14, 2011 @peekay:> few other things u need to fix lightning…> - onpetdeath the pets target needs to switch to playerWhat do you mean by this, explain more please.@peekay:> - if the server crashes for some reason and u enter the game again your pet is there uncontrolable… duno if u can fix that thoThat's because the Pet is still there but doesn't have a pet index. There is obviously no event handler which will despawn all the pets when the server crashes. Link to comment Share on other sites More sharing options...
RyokuHasu Posted March 14, 2011 Share Posted March 14, 2011 you go in and remove it from the map at this point…. or kill it (if you can)GO NEWS!!! Coming soon: Pet Stats scaling!!!! based on your level and STR the pet you summon will be stronger too =DWIP: Pet armor, give your pet paperdoll armor and get it back when it dies or is disbanded.;D im making your pets better... Link to comment Share on other sites More sharing options...
Yxxe Posted March 14, 2011 Author Share Posted March 14, 2011 @RyokuHasu:> you go in and remove it from the map at this point…. or kill it (if you can)> > GO NEWS!!! Coming soon: Pet Stats scaling!!!! based on your level and STR the pet you summon will be stronger too =D> > WIP: Pet armor, give your pet paperdoll armor and get it back when it dies or is disbanded.> > ;D im making your pets better...You haven't seen what I've done with mine yet… xD Link to comment Share on other sites More sharing options...
Fuu Posted March 14, 2011 Share Posted March 14, 2011 What would I have to change if I don't want the pet to be able to attack? Link to comment Share on other sites More sharing options...
Yxxe Posted March 14, 2011 Author Share Posted March 14, 2011 @Fuu:> What would I have to change if I don't want the pet to be able to attack?Remove the "PetAttack" procedure. Link to comment Share on other sites More sharing options...
Fuu Posted March 14, 2011 Share Posted March 14, 2011 Thanks. <-< Link to comment Share on other sites More sharing options...
RyokuHasu Posted March 14, 2011 Share Posted March 14, 2011 @Lightning:> You haven't seen what I've done with mine yet… xDO.o you ever gona share? or do i have to become the leading person for pet modifications? lol Link to comment Share on other sites More sharing options...
Yxxe Posted March 14, 2011 Author Share Posted March 14, 2011 @RyokuHasu:> O.o you ever gona share? or do i have to become the leading person for pet modifications? lolI've given the community everything you need to make something that I am making. And no, my Pet System will be unique to my game. ;)[Origin - The Legend Reborn Pet Handling Life Skill](http://www.touchofdeathforums.com/smf/index.php/topic,69956.0.html)In the next few days I will be releasing more info about it. ^^ Link to comment Share on other sites More sharing options...
bruno1987 Posted March 14, 2011 Share Posted March 14, 2011 per those chances I would not have to files and modified for use with just copy and paste them into their respective easiest place to us using the same Link to comment Share on other sites More sharing options...
peekay Posted March 14, 2011 Share Posted March 14, 2011 umm bout that thing i said above lightningwhen a pet dies from attacking a npc the npc its attacking should switch targets to the player, otherwise people can just send in pets after pets and never be attacked by a npc xD Link to comment Share on other sites More sharing options...
RyokuHasu Posted March 15, 2011 Share Posted March 15, 2011 I was thinking that too lol i might find i way to do that… Maby Link to comment Share on other sites More sharing options...
peekay Posted March 15, 2011 Share Posted March 15, 2011 all that u just need to change targets target on pet death isnt hard but he told me to just tell him Link to comment Share on other sites More sharing options...
RyokuHasu Posted March 15, 2011 Share Posted March 15, 2011 XD but like said befor…. i know knothing about how the game engine works.... The tutorial I made was 5 hours of guess work... that magicly worked (after 5 failed attempts)Ill be lucky if i can ever pruduce 1/10th the stuff i want to make... lol Link to comment Share on other sites More sharing options...
Yxxe Posted March 15, 2011 Author Share Posted March 15, 2011 @peekay:> umm bout that thing i said above lightning> > when a pet dies from attacking a npc the npc its attacking should switch targets to the player, otherwise people can just send in pets after pets and never be attacked by a npc xDAdded, all it is is 2 lines of code, lol.Change sub NpcAttackNpc to this:```Sub NpcAttackNpc(ByVal MapNum As Long, ByVal Attacker As Long, ByVal Victim As Long, ByVal Damage As Long) Dim i As Long Dim Buffer As clsBuffer Dim aNpcNum As Long Dim vNpcNum As Long Dim n As Long Dim PetOwner As Long If Attacker <= 0 Or Attacker > MAX_MAP_NPCS Then Exit Sub If Victim <= 0 Or Victim > MAX_MAP_NPCS Then Exit Sub If Damage <= 0 Then Exit Sub aNpcNum = MapNpc(MapNum).Npc(Attacker).Num vNpcNum = MapNpc(MapNum).Npc(Victim).Num If aNpcNum <= 0 Then Exit Sub If vNpcNum <= 0 Then Exit Sub 'set the victim's target to the pet attacking it MapNpc(MapNum).Npc(Victim).targetType = 2 'Npc MapNpc(MapNum).Npc(Victim).target = Attacker ' Send this packet so they can see the person attacking Set Buffer = New clsBuffer Buffer.WriteLong SNpcAttack Buffer.WriteLong Attacker SendDataToMap MapNum, Buffer.ToArray() Set Buffer = Nothing If Damage >= MapNpc(MapNum).Npc(Victim).Vital(Vitals.HP) Then SendActionMsg MapNum, "-" & Damage, BrightRed, 1, (MapNpc(MapNum).Npc(Victim).x * 32), (MapNpc(MapNum).Npc(Victim).y * 32) SendBlood MapNum, MapNpc(MapNum).Npc(Victim).x, MapNpc(MapNum).Npc(Victim).y ' npc is dead. 'Call GlobalMsg(CheckGrammar(Trim$(Npc(vNpcNum).Name), 1) & " has been killed by " & CheckGrammar(Trim$(Npc(aNpcNum).Name)) & "!", BrightRed) ' Set NPC target to 0 MapNpc(MapNum).Npc(Attacker).target = 0 MapNpc(MapNum).Npc(Attacker).targetType = 0 'reset the targetter for the player If MapNpc(MapNum).Npc(Attacker).IsPet = YES Then TempPlayer(MapNpc(MapNum).Npc(Attacker).PetData.Owner).target = 0 TempPlayer(MapNpc(MapNum).Npc(Attacker).PetData.Owner).targetType = TARGET_TYPE_NONE PetOwner = MapNpc(MapNum).Npc(Attacker).PetData.Owner SendTarget PetOwner 'Give the player the pet owner some experience from the kill Call SetPlayerExp(PetOwner, GetPlayerExp(PetOwner) + Npc(MapNpc(MapNum).Npc(Victim).Num).Exp) CheckPlayerLevelUp PetOwner SendActionMsg MapNum, "+" & Npc(MapNpc(MapNum).Npc(Victim).Num).Exp & "Exp", White, 1, GetPlayerX(PetOwner) * 32, GetPlayerY(PetOwner) * 32 SendEXP PetOwner ElseIf MapNpc(MapNum).Npc(Victim).IsPet = YES Then 'Get the pet owners' index PetOwner = MapNpc(MapNum).Npc(Victim).PetData.Owner 'Set the NPC's target on the owner now MapNpc(MapNum).Npc(Attacker).targetType = 1 'player MapNpc(MapNum).Npc(Attacker).target = PetOwner 'Disband the pet PetDisband PetOwner, GetPlayerMap(PetOwner) End If ' Drop the goods if they get it 'For n = 1 To MAX_NPC_DROPS If Npc(vNpcNum).DropItem <> 0 Then If Rnd <= Npc(vNpcNum).DropChance Then Call SpawnItem(Npc(vNpcNum).DropItem, Npc(vNpcNum).DropItemValue, MapNum, MapNpc(MapNum).Npc(Victim).x, MapNpc(MapNum).Npc(Victim).y) End If End If 'Next ' Reset victim's stuff so it dies in loop MapNpc(MapNum).Npc(Victim).Num = 0 MapNpc(MapNum).Npc(Victim).SpawnWait = GetTickCount MapNpc(MapNum).Npc(Victim).Vital(Vitals.HP) = 0 ' send npc death packet to map Set Buffer = New clsBuffer Buffer.WriteLong SNpcDead Buffer.WriteLong Victim SendDataToMap MapNum, Buffer.ToArray() Set Buffer = Nothing If PetOwner > 0 Then PetFollowOwner PetOwner End If Else ' npc not dead, just do the damage MapNpc(MapNum).Npc(Victim).Vital(Vitals.HP) = MapNpc(MapNum).Npc(Victim).Vital(Vitals.HP) - Damage ' Say damage SendActionMsg MapNum, "-" & Damage, BrightRed, 1, (MapNpc(MapNum).Npc(Victim).x * 32), (MapNpc(MapNum).Npc(Victim).y * 32) SendBlood MapNum, MapNpc(MapNum).Npc(Victim).x, MapNpc(MapNum).Npc(Victim).y End If 'Send both Npc's Vitals to the client SendMapNpcVitals MapNum, Attacker SendMapNpcVitals MapNum, VictimEnd Sub```^^ Link to comment Share on other sites More sharing options...
RyokuHasu Posted March 15, 2011 Share Posted March 15, 2011 YAY ^_^ thank you Link to comment Share on other sites More sharing options...
peekay Posted March 16, 2011 Share Posted March 16, 2011 i knew it was easy i just know u told me so u can fix it in your tut insted of me doing it Link to comment Share on other sites More sharing options...
Yxxe Posted March 16, 2011 Author Share Posted March 16, 2011 @RyokuHasu:> YAY ^_^ thank you@peekay:> i knew it was easy i just know u told me so u can fix it in your tut insted of me doing itNo problemo. ^^ Link to comment Share on other sites More sharing options...
peekay Posted March 16, 2011 Share Posted March 16, 2011 i got pet spells sorta workin but they dont stop for the cast time… do u think i need to add spellbuffer to mapnpcrec? Link to comment Share on other sites More sharing options...
Yxxe Posted March 16, 2011 Author Share Posted March 16, 2011 @peekay:> i got pet spells sorta workin but they dont stop for the cast time… do u think i need to add spellbuffer to mapnpcrec?You could add another spell buffer to TempPlayerRec, and make a new spell type. Then you could go ahead with adding a few checks which would fill the other buffer with the Pets' spell, leaving you able to cast one yourself. I haven't really thought about it much, but I would probably go down that kinda route. Link to comment Share on other sites More sharing options...
peekay Posted March 16, 2011 Share Posted March 16, 2011 yea good point… i was goin to add it to mapnpcrec so npcs could also cast spells as well as the pets Link to comment Share on other sites More sharing options...
peekay Posted March 18, 2011 Share Posted March 18, 2011 i think theres a possible bug when ur pet attacks a npc and the npcs target is the player..getting a division by 0 errornum 11unless its somethin i did (EDIT: its to do with my new spell attacking subs dw bout this but if u can help me figure it out xD)also if u disband your pet the npcs target is set to 0 it needs to be set to 1 to attack playerthats all i can think of atm Link to comment Share on other sites More sharing options...
RyokuHasu Posted March 18, 2011 Share Posted March 18, 2011 @Xlithan:> For anybody who has added Multiple Item Drops and Percentiles, Find:> > ```> ' Drop the goods if they get it> ```in NPCAttackNPC sub, and change to this:> > ```> ' Drop the goods if they get it> For n = 1 To MAX_NPC_DROPS> If Npc(Victim).DropItem(n) = 0 Then Exit For> If Rnd <= Npc(Victim).DropChance(n) Then> Call SpawnItem(Npc(Victim).DropItem(n), Npc(Victim).DropItemValue(n), MapNum, MapNpc(MapNum).Npc(Victim).x, MapNpc(MapNum).Npc(Victim).y)> End If> Next> ```=D this goes In your tut more than mine ^_^ 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