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

[EO] Lightning's Pet System [Completely Bug-Free!]


Yxxe
 Share

Recommended Posts

@jadsonkk:

> I am brasilian, your tutorial very good!!!!!

Thank you very much!

I was also wondering whether anyone would want to translate this tutorial into their respective language, for other users for which English isn't their first language.

Thanks,

Lightning
Link to comment
Share on other sites

  • Replies 304
  • Created
  • Last Reply

Top Posters In This Topic

@Sekaru:

> Google translator. Duh. You may want to also translate it for your Libyan friends Lightning ;D.

I'm not relying on that rubbish. ;) And no, my Libyan friends don't need it at the moment, they have other problems to sort out.
Link to comment
Share on other sites

@Helladen:

> I figured it out. I had the PetRec below the PlayerRec.

Well done! ;)

@Yukiyo:

> There's one bug in this really, when your pet kills the npc, it doesn't handle the experience rollover that you get.
>
> Edit: And the fact that the pet doesn't continue to follow you when you go to a new map, which is an easy fix.

Thanks for that, I'll add it to the tutorial.
Link to comment
Share on other sites

@Dami:

> hmm… question.
>
> you use mapnpc for this right?
>
> what would happen if the max number, which is 20 by default, would be met?
>
> is it not better to make a whole seperate class of npc for this?
>
> just wondering :P
>
> Dami

```
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
```
Once the limit is reached, the player is unable to call their pet.

In regards to having a separate spot for pets only, you would only need to edit the spots in MapNpc, and send them to the client. You would also need to make sure that the pets are rendered.
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share


×
×
  • Create New...