[C++ Source]The mighty Mana Bar
I thought someone will find it useful.
Here is how it looks in-game:
http://img404.imageshack.us/img404/1200/scree.png
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! :D
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:
http://img177.imageshack.us/img177/9906/screeee.png
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.
RE: [C++ Source]The mighty Mana Bar
RE: [C++ Source]The mighty Mana Bar
code::blocks is actually just an IDE
RE: [C++ Source]The mighty Mana Bar
Not cool, haha
good work.
RE: [C++ Source]The mighty Mana Bar
Don't focus on single words :S
Anyway, I've found out how you've got that addr. I'll update my post in a second :P
Quote:
Thx for BIG help from petitcoeur.
Are you satisfied now? ;)
RE: [C++ Source]The mighty Mana Bar
The only reason you really need help is your overcomplexifying the code tbh :P
With a little bit of ASM you can do it all in printName
RE: [C++ Source]The mighty Mana Bar
Quote:
Originally Posted by petitcoeur
AHAHA!
You owned me! You just found out how i found the address!
:P good job xDDD
DO NOT FIGHT AGAINS'T MY LITTLE BABY!.
RE: [C++ Source]The mighty Mana Bar
How to see what value "EAX" or "EBP" contains?
RE: [C++ Source]The mighty Mana Bar
Quote:
Originally Posted by Marsus90
How to see what value "EAX" or "EBP" contains?
Right left corner in Olly. It's clearly visible on the screenshot. EBP value is even highlighted with gray on the screenshot.
RE: [C++ Source]The mighty Mana Bar
i changed the adrr to 8.5 and compiled but it didnt worked...
could u help?