Results 1 to 3 of 3

Thread: Problem to read Tibia GUI structure

  1. #1
    Junior Member
    Join Date
    Jul 2009
    Posts
    22

    Problem to read Tibia GUI structure

    Hey guys,

    I'm trying to read tibia's game window width.

    All code:
    https://gist.github.com/henqqqcs/08255fa362dc8c897be2

    Code:
                Process tibia = Process.GetProcessesByName("Tibia")[0];
                ProcessModule module = tibia.MainModule;
                IntPtr handle = tibia.Handle;
    
                //base address
                UInt32 baseAdr = Convert.ToUInt32(module.BaseAddress.ToInt32());
                Console.WriteLine("Base address            : " + baseAdr.ToString("X"));
    
                //experience addres -> working!
                UInt32 xpAddr = 0x534660;
                Console.WriteLine("Experience (working)    : " + Convert.ToString(ReadInt32(handle, xpAddr + baseAdr)));
    
                //gui pointer from MemoryScanner of 
                UInt32 guiPointer = 0x534970;
                Console.WriteLine("Gui pointer address     : " + guiPointer.ToString("X"));
    
                //game window container
                UInt32 gWindowContainer = guiPointer + 0x30;
                
                //game window width 0x38 -> not working
                UInt32 gWindowWidth = gWindowContainer + 0x38;
                Console.WriteLine("Game width (not working): " + Convert.ToString(ReadInt32(handle, gWindowWidth + baseAdr)));
    
                Console.ReadLine();
    My cheat engine(addresses are correct):


    My console:



    I have no ideia why game window width value is not correct.
    Somebody can give a clue?

    Thanks
    Last edited by henqqq; 01-11-2016 at 01:38 AM.

  2. #2
    Senior Member
    Join Date
    Jul 2011
    Posts
    120
    You can test with Cheat Engine; CTRL+ALT+L
    Code:
    local guiPointerAddress = 0x5C4970
    
    realAdr = readInteger(guiPointerAddress )
    realAdr = readInteger(realAdr + 0x30)
    realAdr = readInteger(realAdr + 0x38)
    
    print(realAdr)

  3. #3
    Junior Member
    Join Date
    Jul 2009
    Posts
    22
    Lua code on Cheat Engine, Nice!

    I fugured it out.

    Code:
                Process tibia = Process.GetProcessesByName("Tibia")[0];
                ProcessModule module = tibia.MainModule;
                Handle = tibia.Handle;
    
                
                //base address
                int baseAdr = module.BaseAddress.ToInt32();
                Console.WriteLine("Base address                : " + baseAdr.ToString("X"));
    
                //experience addres -> working!
                int xpAddr = 0x534660;
                Console.WriteLine("Experience (working)        : " + Convert.ToString(ReadInt32(xpAddr + baseAdr)));
    
                //gui pointer from MemoryScanner of 
                int guiAdr = 0x534970;
                Console.WriteLine("Gui pointer address         : " + guiAdr.ToString("X"));
    
                //get the valus (pointer?) inside guiAdr + the value inside baseAddr
                guiAdr = ReadInt32(guiAdr + baseAdr);
                Console.WriteLine("Gui pointer value           : " + guiAdr.ToString("X"));
    
                //game window container
                int gWindowContainer = ReadInt32(guiAdr + 0x30);
                Console.WriteLine("gWindow Container address   : " + gWindowContainer.ToString("X"));
    
                Console.WriteLine("|-----------------------------------------------------------");
                Console.WriteLine("|-------------------- Gui dimensions -----------------------");
                Console.WriteLine("|-----------------------------------------------------------");
                //read offsets {0x1c, 0x20, 0x30, 0x34, 0x38, 0x3c};
                //Game window container width
                int gWindowContainerWidth = ReadInt32(gWindowContainer + 0x1c);
                Console.WriteLine("Game window container width : " + gWindowContainerWidth);
    
                //Game window container height
                int gWindowContainerHeight = ReadInt32(gWindowContainer + 0x20);
                Console.WriteLine("Game window container height: " + gWindowContainerHeight);
    
                //Game window container top offset
                int gWindowContainerTopOffset = ReadInt32(gWindowContainer + 0x30);
                Console.WriteLine("Game window container top   : " + gWindowContainerTopOffset);
    
                //Game window container left offset
                int gWindowContainerLeftOffset = ReadInt32(gWindowContainer + 0x34);
                Console.WriteLine("Game window container left  : " + gWindowContainerLeftOffset);
    
                //game window width 
                int gWindowWidth = ReadInt32(gWindowContainer + 0x38);
                Console.WriteLine("Game width                  : " + gWindowWidth);
    
                //game window height 
                int gWindowHeight = ReadInt32(gWindowContainer + 0x3c);
                Console.WriteLine("Game height                 : " + gWindowContainerHeight);
    
                Console.ReadLine();

Posting Permissions

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