I am trying to get address of creature in custom client in Tibia. There are 2 actions which can be made to creature: Follow and Attack. Both of them are static addresses. Whenever i do one of the action Follow/Attack, then some address is showing in that static address.It means that address which is showing is id of the creature.... and here is my problem - i cannot find creatureID... i found by string NPC name, then found his XYZ, then i explored Memory View to find that address, but i am failing all the time, it seems like this address is nowhere near this memory region. https://i.stack.imgur.com/8Yry7.jpg https://i.stack.imgur.com/IFvsw.jpg https://i.stack.imgur.com/aTFQG.jpg
1 Answers
I'm assuming you're using otclient.
In this case, you MUST check it's source code in every thing you do!
For Otclient: https://github.com/edubart/otclient/blob/master/src/client/creature.h#L148
For OTCv8: https://github.com/OTCv8/otcv8-dev/blob/master/src/client/creature.h#L212
Why would you try to reverse a public source without checking it's code?
So as you can see, creatureID is above creaturename.
One step further... I'm also assuming you're trying to read the entity list as you're in Rookgard temple with NPC Cipfried.
You should find the same structure for all or almost all thing objects, which include: https://github.com/edubart/otclient/search?q=%22%3A+public+Thing%22
I think you should take a look at how the map works in this game: https://github.com/edubart/otclient/blob/master/src/client/map.cpp
Specially the m_KnownCreatures which is basically, the battle list (aka entity list).
The m_KnownCreatures is a dynamic pointer with a list of dynamic pointers. So the way you're trying you will fail.
In my case, I've created a hook to Map::getCreatureById(uint32 id)
then I'm able to see every new creature added to the list in real time and don't call my code if nothing is being added.
I hope this makes sense... It's all I can help as your question is not very detailed I don't really know what you're trying to do exactly.

- 531
- 5
- 23