Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/iano/public_html/tpforums-vb5/forum/includes/class_core.php on line 5842

PHP Warning: Use of undefined constant MYSQL_NUM - assumed 'MYSQL_NUM' (this will throw an Error in a future version of PHP) in ..../includes/init.php on line 165

PHP Warning: Use of undefined constant MYSQL_ASSOC - assumed 'MYSQL_ASSOC' (this will throw an Error in a future version of PHP) in ..../includes/init.php on line 165

PHP Warning: Use of undefined constant MYSQL_BOTH - assumed 'MYSQL_BOTH' (this will throw an Error in a future version of PHP) in ..../includes/init.php on line 165

PHP Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in ..../includes/functions_navigation.php on line 588

PHP Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in ..../includes/functions_navigation.php on line 612

PHP Warning: Use of undefined constant misc - assumed 'misc' (this will throw an Error in a future version of PHP) in ..../global.php(29) : eval()'d code(6) : eval()'d code on line 1

PHP Warning: Use of undefined constant index - assumed 'index' (this will throw an Error in a future version of PHP) in ..../global.php(29) : eval()'d code(6) : eval()'d code on line 1

PHP Warning: Use of undefined constant misc - assumed 'misc' (this will throw an Error in a future version of PHP) in ..../includes/class_bootstrap.php(1422) : eval()'d code(4) : eval()'d code on line 1

PHP Warning: Use of undefined constant index - assumed 'index' (this will throw an Error in a future version of PHP) in ..../includes/class_bootstrap.php(1422) : eval()'d code(4) : eval()'d code on line 1

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 6

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 6

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 6

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 6

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 85

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 6

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 6

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 85

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 6

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 6

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 6

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 6
[C++ Source]The mighty Mana Bar
Page 1 of 3 123 LastLast
Results 1 to 10 of 21

Thread: [C++ Source]The mighty Mana Bar

  1. #1
    Junior Member
    Join Date
    Sep 2010
    Posts
    11

    [C++ Source]The mighty Mana Bar

    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.





  2. #2

    RE: [C++ Source]The mighty Mana Bar

    Cool

  3. #3
    Senior Member
    Join Date
    Apr 2008
    Posts
    689

    RE: [C++ Source]The mighty Mana Bar

    code::blocks is actually just an IDE

  4. #4

    RE: [C++ Source]The mighty Mana Bar

    Not cool, haha

    good work.

  5. #5
    Junior Member
    Join Date
    Sep 2010
    Posts
    11

    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

    Thx for BIG help from petitcoeur.
    Are you satisfied now?

  6. #6

    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

  7. #7
    Senior Member
    Join Date
    Jan 2010
    Location
    Venezuela
    Posts
    366

    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!.

  8. #8
    Junior Member
    Join Date
    Nov 2010
    Posts
    17

    RE: [C++ Source]The mighty Mana Bar

    How to see what value "EAX" or "EBP" contains?

  9. #9
    Junior Member
    Join Date
    Sep 2010
    Posts
    11

    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.


  10. #10
    Junior Member
    Join Date
    Jun 2010
    Posts
    1

    RE: [C++ Source]The mighty Mana Bar

    i changed the adrr to 8.5 and compiled but it didnt worked...
    could u help?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •