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 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 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
Containers??????
Page 1 of 2 12 LastLast
Results 1 to 10 of 18

Thread: Containers??????

  1. #1
    Junior Member
    Join Date
    Feb 2016
    Posts
    9

    Containers??????

    Hello
    I was trying to find out container pointer address, but I wasted whole day and once I found pointer which was working only with 3 bps, second time I tried to find it - i couldn't, pointer scan result is 0 everytime I try to scan...
    I'm learning on Tibia 10.90
    Can anyone help with this? :/
    I don't mean "do it", just tell what am I doing wrong...

    Thank you!!

  2. #2
    Junior Member
    Join Date
    Mar 2016
    Posts
    9
    I'll tell you what I gather from MSVC std library source code plus the help of a few guys here (Ty DarkStar and Stiju).

    Tibia containers are stored in a red black tree (msvc std::map implementation) as mentioned by DarkStar here and Stiju here.

    The container address, points to the address of a structure with the following format (Delphi syntax):

    Code:
      TTreeEntry = record
        Proxy, Head: longword; //Head's node address
        Count: longint; //Tree's node count
      end;
    The head points to a tree node, which is another structure with the following format:

    Code:
      TTreeNode = record
        Left, Parent, Right: longword; //Address of Left, Parent and Right nodes.
        Color: byte; //Red or black color
        IsNil: boolean;
        ContainerData: record //Key/Value pair
          Key, Address: longword; //Key is the container index, Address is the container address.
        end;
      end;
    The head is not the tree root, instead, head's parent is.
    Now, with the root address (Head.Parent) in hands, you'll be able create a method to traverse the whole tree. All nodes uses the same structure as the head does. The leaf node points to the tree head. So, to check whether a leaf has been reached, you can either use the IsNil value, as well as compare the right and left with the head address.
    Last edited by Brunocg; 03-08-2016 at 04:43 AM.

  3. #3
    Junior Member
    Join Date
    Feb 2016
    Posts
    9
    Thank you for your reply,
    After reading posts in thread from link in your post I'm thinking if my Visual Studio Enterprise 2015 will work too. Im using C#.
    Another problem is that...how to find address. Once I have found it, on second try I had 0 result from pointer scan...

  4. #4
    Junior Member
    Join Date
    Mar 2016
    Posts
    9
    Well, If I was able to do it with Delphi, Im pretty sure you can do it with C# or almost any other language.

    Btw, the current container address is:

    Containers_PointerAddress = $B7A2A4;

    Check whether you are finding the right address.

    I hope that helps.
    Last edited by Brunocg; 03-08-2016 at 01:30 PM.

  5. #5
    Senior Member
    Join Date
    Jan 2012
    Posts
    417
    Quote Originally Posted by crackgm View Post
    Thank you for your reply,
    After reading posts in thread from link in your post I'm thinking if my Visual Studio Enterprise 2015 will work too. Im using C#.
    Another problem is that...how to find address. Once I have found it, on second try I had 0 result from pointer scan...
    How to find Container pointer:


    1. Search for the number of opened containers:
      1. Close all containers and search for 0
      2. Open a single container and search for 1
      3. Open another container and search for 2
      4. Repeat this process until you find a single address

    2. Pointer scan for this address with Max level = 1, increasing this number until you find a single pointer

  6. #6
    Junior Member
    Join Date
    Feb 2016
    Posts
    9
    Ok so I've found single address which actually works - shows the number of opened containers, that's good. But when I'm looking for pointer I get result = 0...
    (Tibia 10.90)
    http://postimg.org/image/ct5qqlfen/
    http://postimg.org/image/fk38euc5t/
    http://postimg.org/image/pnpzit6s7/

    I started from max level 1, up to 10... and nothing. What am I doing wrong?

  7. #7
    Senior Member
    Join Date
    Jan 2012
    Posts
    417
    using Cheat Engine 6.4, with this config at pointer scan window


    I get this result

  8. #8
    Junior Member
    Join Date
    Feb 2016
    Posts
    9
    Ohh, I got it, so the pointer address to containers is this without any offset?
    And this address is pointer to this structure?
    C#
    Code:
      struct TTreeEntry {
    	  UInt32 Proxy, Head;
    	  Int32 count;
      }
    And how to "use" this addres with it?
    like this:
    Code:
      TTreeEntry tr = new TTreeEntry();
      tr.Head = 0x77A2A4;
    OR like this:
    Code:
      TTreeEntry *tr = 0x77A2A4;
    Because I don't really get the idea how it's possible to get whole structure from one address :/





    AAAAAAAnd another thing - I have to inject dll into tibia?
    Last edited by crackgm; 03-08-2016 at 03:52 PM.

  9. #9
    Senior Member
    Join Date
    Jan 2012
    Posts
    417
    Quote Originally Posted by crackgm View Post
    Because I don't really get the idea how it's possible to get whole structure from one address :/
    First, you must read about data structures like trees using nodes (not arrays) https://en.wikipedia.org/wiki/Binary_tree to understand the inner work of similar structures.

    Quote Originally Posted by crackgm View Post
    AAAAAAAnd another thing - I have to inject dll into tibia?
    No, you don't need to inject into Tibia. If you understand how the std::map structure works to iterate through the nodes collection, doesn't matter if you are injected or not, because you can code it to work in both ways.

    Advice: I would say it's a bit advanced for your current skills, so be prepared for the challenge.

  10. #10
    Junior Member
    Join Date
    Feb 2016
    Posts
    9
    Quote Originally Posted by Blequi View Post
    First, you must read about data structures like trees using nodes (not arrays) https://en.wikipedia.org/wiki/Binary_tree to understand the inner work of similar structures.



    No, you don't need to inject into Tibia. If you understand how the std::map structure works to iterate through the nodes collection, doesn't matter if you are injected or not, because you can code it to work in both ways.

    Advice: I would say it's a bit advanced for your current skills, so be prepared for the challenge.
    Thank you
    actually I know what is binary tree/blackred tree etc. I'm studying informatics etc, but I'm not good at reverse engineering :P

Posting Permissions

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