Prang123 Posted April 15, 2011 Share Posted April 15, 2011 I'm a major Noob at EO Scripting, so I was wondering if you could PM me the source code files? xDI don't even know how to get those buttons up =/ (The Call Pet ones from Lightning's Tutorial) Link to comment Share on other sites More sharing options...
Yxxe Posted April 18, 2011 Share Posted April 18, 2011 @Prang123:> I'm a major Noob at EO Scripting, so I was wondering if you could PM me the source code files? xD> I don't even know how to get those buttons up =/ (The Call Pet ones from Lightning's Tutorial)Read my thread next time please. All you need to do is make a label on the game form.[If you can't for the life of you figure out how to call the procedures, click here.](http://www.touchofdeathforums.com/smf/index.php/topic,69521.msg764273.html#msg764273) Link to comment Share on other sites More sharing options...
Suppositoire Posted April 23, 2011 Share Posted April 23, 2011 I have meet an error x([![](http://www.noelshack.com/uploads/images/8561756428731_sans_titre.png)](http://www.noelshack.com/upload/8561756428731_sans_titre.png) Link to comment Share on other sites More sharing options...
TheRexion Posted April 24, 2011 Share Posted April 24, 2011 Make sure you added```Public Const ITEM_TYPE_SUMMON As Byte = 9```to modConstants. Link to comment Share on other sites More sharing options...
Suppositoire Posted April 24, 2011 Share Posted April 24, 2011 It is OK its walking perfectly Link to comment Share on other sites More sharing options...
RyokuHasu Posted May 26, 2011 Author Share Posted May 26, 2011 >.< lol yep Thanks Ecclestio.RMINDER: CAREFULY read ALL the steps when applying code. Link to comment Share on other sites More sharing options...
RyokuHasu Posted May 27, 2011 Author Share Posted May 27, 2011 **ADDED****Translated In German by EisKeks, Under "Abschnitt 2"**http://www.touchofdeathforums.com/smf/index.php/topic,71065.new.htmlI added a link to the german version. ^_^ Link to comment Share on other sites More sharing options...
Whitepinkbun Posted June 8, 2011 Share Posted June 8, 2011 Ummmm i dont know whats gone wrong but when ever my pet dies it respawns where my map npcs are ment to be and they never appeared on the map… xD any clues? Besides that it works ok lol... Link to comment Share on other sites More sharing options...
RyokuHasu Posted June 8, 2011 Author Share Posted June 8, 2011 O.o im not entirely shure whats wrong with it… maby its just left over pets from last time you were on and loged out of shutdown the server. if thats the case you might need my newest tut.http://www.touchofdeathforums.com/smf/index.php/topic,72532.0.htmlIt cleans up any and all pets that shouldnt be there. Link to comment Share on other sites More sharing options...
Sr_Sirius Posted June 9, 2011 Share Posted June 9, 2011 I have a bug; when summon my pet with my item, if i try to summon another time press the same item, the item is dupe each time i double click on item, its only my problem?Thanks Link to comment Share on other sites More sharing options...
RyokuHasu Posted June 9, 2011 Author Share Posted June 9, 2011 O.o… hmmm...Post your SpawnPet sub please.ALSO... did you attempt the optional part? =P Link to comment Share on other sites More sharing options...
Sr_Sirius Posted June 9, 2011 Share Posted June 9, 2011 This is my SpawnPet sub:```Sub SpawnPet(ByVal index As Long, ByVal MapNum As Long, npcNum As Long)Dim PlayerMap As LongDim i As IntegerDim PetSlot As Byte 'Prevent multiple pets for the same owner If TempPlayer(index).TempPetSlot > 0 Then Call GiveInvItem(index, npcNum, 0) Exit Sub End If PlayerMap = GetPlayerMap(index) PetSlot = 0 For i = 1 To MAX_MAP_NPCS If Map(PlayerMap).Npc(i) = 0 Then PetSlot = i Exit For End If Next If PetSlot = 0 Then Call GiveInvItem(index, npcNum, 0) Call PlayerMsg(index, "The map is too crowded for you to call on your pet!", Red) Exit Sub End If 'create the pet for the map Map(PlayerMap).Npc(PetSlot) = npcNum MapNpc(PlayerMap).Npc(PetSlot).Num = npcNum 'set its Pet Data MapNpc(PlayerMap).Npc(PetSlot).IsPet = YES MapNpc(PlayerMap).Npc(PetSlot).PetData.Name = GetPlayerName(index) & "'s " & Npc(npcNum).Name MapNpc(PlayerMap).Npc(PetSlot).PetData.Owner = index 'If Pet doesn't exist with player, link it to the player If Player(index).Pet.SpriteNum <> npcNum Then Player(index).Pet.SpriteNum = npcNum Player(index).Pet.Name = GetPlayerName(index) & "'s " & Npc(npcNum).Name End If TempPlayer(index).TempPetSlot = PetSlot 'cache the map for sending Call MapCache_Create(PlayerMap) 'save the map SaveMap (PlayerMap) 'send the update For i = 1 To Player_HighIndex If IsPlaying(i) Then If GetPlayerMap(i) = GetPlayerMap(index) Then SendMap i, PlayerMap End If End If Next Select Case GetPlayerDir(index) Case DIR_UP Call SpawnNpc(PetSlot, PlayerMap, GetPlayerX(index), GetPlayerY(index) - 1) Case DIR_DOWN Call SpawnNpc(PetSlot, PlayerMap, GetPlayerX(index), GetPlayerY(index) + 1) Case DIR_LEFT Call SpawnNpc(PetSlot, PlayerMap, GetPlayerX(index) + 1, GetPlayerY(index)) Case DIR_RIGHT Call SpawnNpc(PetSlot, PlayerMap, GetPlayerX(index), GetPlayerY(index) - 1) End Select'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 IfNextEnd Sub```And yes, i add the optional part for dont remove the items. Link to comment Share on other sites More sharing options...
RyokuHasu Posted June 9, 2011 Author Share Posted June 9, 2011 @Sr_Sirius:> This is my SpawnPet sub:> ```> Sub SpawnPet(ByVal index As Long, ByVal MapNum As Long, npcNum As Long)> > Dim PlayerMap As Long> Dim i As Integer> Dim PetSlot As Byte> > 'Prevent multiple pets for the same owner> If TempPlayer(index).TempPetSlot > 0 Then> Call GiveInvItem(index, npcNum, 0) ' this was sposed to b removed> Exit Sub> End If> > PlayerMap = GetPlayerMap(index)> PetSlot = 0> > For i = 1 To MAX_MAP_NPCS> If Map(PlayerMap).Npc(i) = 0 Then> PetSlot = i> Exit For> End If> Next> > If PetSlot = 0 Then> Call GiveInvItem(index, npcNum, 0) ' this was sposed to be removed> Call PlayerMsg(index, "The map is too crowded for you to call on your pet!", Red)> Exit Sub> End If> > 'create the pet for the map> Map(PlayerMap).Npc(PetSlot) = npcNum> MapNpc(PlayerMap).Npc(PetSlot).Num = npcNum> > 'set its Pet Data> MapNpc(PlayerMap).Npc(PetSlot).IsPet = YES> MapNpc(PlayerMap).Npc(PetSlot).PetData.Name = GetPlayerName(index) & "'s " & Npc(npcNum).Name> MapNpc(PlayerMap).Npc(PetSlot).PetData.Owner = index> > 'If Pet doesn't exist with player, link it to the player> If Player(index).Pet.SpriteNum <> npcNum Then> Player(index).Pet.SpriteNum = npcNum> Player(index).Pet.Name = GetPlayerName(index) & "'s " & Npc(npcNum).Name> End If> TempPlayer(index).TempPetSlot = PetSlot> 'cache the map for sending> Call MapCache_Create(PlayerMap)> 'save the map> SaveMap (PlayerMap)> > 'send the update> For i = 1 To Player_HighIndex> If IsPlaying(i) Then> If GetPlayerMap(i) = GetPlayerMap(index) Then> SendMap i, PlayerMap> End If> End If> Next> > Select Case GetPlayerDir(index)> Case DIR_UP> Call SpawnNpc(PetSlot, PlayerMap, GetPlayerX(index), GetPlayerY(index) - 1)> Case DIR_DOWN> Call SpawnNpc(PetSlot, PlayerMap, GetPlayerX(index), GetPlayerY(index) + 1)> Case DIR_LEFT> Call SpawnNpc(PetSlot, PlayerMap, GetPlayerX(index) + 1, GetPlayerY(index))> Case DIR_RIGHT> Call SpawnNpc(PetSlot, PlayerMap, GetPlayerX(index), GetPlayerY(index) - 1)> End Select> > 're-warp the players on the map> For 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 If> Next> End Sub> > ```And yes, i add the optional part for dont remove the items.yes I see, you didnt replace the spawn pet sub a 2nd time. (like it said to);3 use this, its the EXACT same as the one in te optional section```Sub SpawnPet(ByVal index As Long, ByVal MapNum As Long, npcNum As Long)Dim PlayerMap As LongDim i As IntegerDim PetSlot As Byte 'Prevent multiple pets for the same owner If TempPlayer(index).TempPetSlot > 0 Then Exit Sub End If PlayerMap = GetPlayerMap(index) PetSlot = 0 For i = 1 To MAX_MAP_NPCS If Map(PlayerMap).Npc(i) = 0 Then PetSlot = i Exit For End If Next If PetSlot = 0 Then Call PlayerMsg(index, "The map is too crowded for you to call on your pet!", Red) Exit Sub End If 'create the pet for the map Map(PlayerMap).Npc(PetSlot) = npcNum MapNpc(PlayerMap).Npc(PetSlot).Num = npcNum 'set its Pet Data MapNpc(PlayerMap).Npc(PetSlot).IsPet = YES MapNpc(PlayerMap).Npc(PetSlot).PetData.Name = GetPlayerName(index) & "'s " & Npc(npcNum).Name MapNpc(PlayerMap).Npc(PetSlot).PetData.Owner = index 'If Pet doesn't exist with player, link it to the player If Player(index).Pet.SpriteNum <> npcNum Then Player(index).Pet.SpriteNum = npcNum Player(index).Pet.Name = GetPlayerName(index) & "'s " & Npc(npcNum).Name End If TempPlayer(index).TempPetSlot = PetSlot 'cache the map for sending Call MapCache_Create(PlayerMap) 'save the map SaveMap (PlayerMap) 'send the update For i = 1 To Player_HighIndex If IsPlaying(i) Then If GetPlayerMap(i) = GetPlayerMap(index) Then SendMap i, PlayerMap End If End If Next Select Case GetPlayerDir(index) Case DIR_UP Call SpawnNpc(PetSlot, PlayerMap, GetPlayerX(index), GetPlayerY(index) - 1) Case DIR_DOWN Call SpawnNpc(PetSlot, PlayerMap, GetPlayerX(index), GetPlayerY(index) + 1) Case DIR_LEFT Call SpawnNpc(PetSlot, PlayerMap, GetPlayerX(index) + 1, GetPlayerY(index)) Case DIR_RIGHT Call SpawnNpc(PetSlot, PlayerMap, GetPlayerX(index), GetPlayerY(index) - 1) End Select'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 IfNextEnd Sub```Enjoy my 1/2 of the pet system XDPS: ;D I have both types of pet summon items in my game at the same time. Link to comment Share on other sites More sharing options...
Whitepinkbun Posted June 10, 2011 Share Posted June 10, 2011 @RyokuHasu:> O.o im not entirely shure whats wrong with it… maby its just left over pets from last time you were on and loged out of shutdown the server. if thats the case you might need my newest tut.> > http://www.touchofdeathforums.com/smf/index.php/topic,72532.0.html> > It cleans up any and all pets that shouldnt be there.Ok so I don't know why its happening… but i know what is happening when i walk on to a map with my pet it overwrites the NPC in that maps 1st slot... Ive made a few changes but i don't think ive done anything to make it do that... at the moment ive solved the problem by puttin my npcs in the 30th slot going backwards but im concerned about what will happen when i have more then me on the game >.< any ideas why it would be doin something like this... ok if not ill just make pet unsummon when going from map to map lol Link to comment Share on other sites More sharing options...
RyokuHasu Posted June 10, 2011 Author Share Posted June 10, 2011 there is a check for too many NPCs that will deny you your summon. so dont worry. =PIt was created in the original Tut. as long as your mods dont kill it, it should be fine. Link to comment Share on other sites More sharing options...
eldestripador Posted July 3, 2011 Share Posted July 3, 2011 I have an error … When I hit the item from the pet, the pet isn't spawn.Can it be my fault error? Link to comment Share on other sites More sharing options...
harvest24 Posted September 13, 2011 Share Posted September 13, 2011 when i close server and open server again my pet born in map how to fix that ? Link to comment Share on other sites More sharing options...
harvest24 Posted September 13, 2011 Share Posted September 13, 2011 aw mybadhttp://www.touchofdeathforums.com/smf/index.php/topic,72532.0.htmlit is xD Link to comment Share on other sites More sharing options...
Gwen Posted September 13, 2011 Share Posted September 13, 2011 modify button….... USE IT! Link to comment Share on other sites More sharing options...
harvest24 Posted September 13, 2011 Share Posted September 13, 2011 @uıןÉÂpuÇÂÊÂƃ:> modify button….... USE IT!how to do that ! Link to comment Share on other sites More sharing options...
Gwen Posted September 14, 2011 Share Posted September 14, 2011 At the top of your post you just did are a few buttons. One of them says modify. Move the mouse to this button and click on it. Then you can add more text or "modify" your post without double posting. Once you are done press the post button Link to comment Share on other sites More sharing options...
harvest24 Posted September 14, 2011 Share Posted September 14, 2011 nice bro i can do xD Link to comment Share on other sites More sharing options...
RyokuHasu Posted October 22, 2011 Author Share Posted October 22, 2011 Made Minor updated to make this work with Lightning's updated pet system.If this is going to be on the tutorial Index then I should get it working again. =P Link to comment Share on other sites More sharing options...
Mondo Posted April 8, 2012 Share Posted April 8, 2012 Awesome, I'll give this one a go too! :)Much appreciated! :D Link to comment Share on other sites More sharing options...
Zopto Posted April 14, 2012 Share Posted April 14, 2012 all work fine for me exept when pet walking it is so bugy…. 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