Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Sr_Sirius

Members
  • Posts

    140
  • Joined

  • Last visited

    Never

Everything posted by Sr_Sirius

  1. 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) 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 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.
  2. 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
  3. In in modGameLogic under sub add Code: [Select] Dim i As Integer at the top What sub you mean? i think miss a pieace of tutorial.
  4. This code is adapted to EO 2.0?
  5. Im mongol, why offend me?
  6. @MiszMasz: > Up@ > I doesn't work :/ Item number is 2, npc number is 2 too. > In modItem: > > >! Case 2 > 'Item Num 2 = Pet NPC Num 2 > Exit Sub > When I clicked on the script item nothing happens :/ Try to remove the '
  7. Really nice features for remake in EO 2.0, really thanks for you work miguu :)
  8. totally awesome work Robin, congrats. Regards
  9. I have a lot of lag, my ping see a 500 ping on local server… and the movement of npcs and player is very laggy without animation. Any idea of what happens?
  10. One question, the actual PVO version, is situable a good base for start a game?
×
×
  • Create New...