I thought someone will find it useful.
Here is how it looks in-game:
Packed with Stiju's Injector (only .exe, if you want sources of it check petitcoeur's sources, or orginal author's upload. I think they're unnecessary,i see no reason for modify that, it's just working as it should work :P)
ManaBar has diffrent colour, depends on your mana level (like HP bar).
DLL source of course included :>
Thx for [s]small[/s] BIG help from petitcoeur.
Compiled with Code::Blocks, project file included.
And always remember: OpenSource is a way to go
Of course, hello DarkstaR!
EDIT: How to get address for CURRENT_HP_BAR_DRAWING_CREATURE:
1. Load Tibia in Olly, Log in, etc...
2. Set breakpoint at PRINT_NAME_PATCH_ADDR (in 8.62, it's 0x4F14F3)
3. Tibia has stopped! Let's look at the screen:
In the stack window, we have arguments for this func. It's not clearly shown in ASM by PUSHes, because color arguments are the same as for DrawRect a little higher, so not everything is removed from the stack.
As you see, the last argument is 0. Can you see the "PUSH 0" command in the code? The next "PUSH EAX" must be a pointer to Creature's name! Let's set a breakpoint at it.
Indeed, it's a creature name. Let's see what value EAX contains then.
Code:
MOV EAX,DWORD PTR SS:[EBP-30]
ADD EAX,4
Remember PrintNamePatched from my source?
Code:
int creatureID = *(int*)(lpText - 4); //You can ofc use tCreature structure
That means "EBP-0x30" is a pointer to CreatureID! Let's check EBP value...It's 0x12E108.
In conclusion: 0x12E108 - 0x30 = pointer to creatureID of currently drawn creature.