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
How to get object information from Tibia's memory
Page 1 of 5 123 ... LastLast
Results 1 to 10 of 49

Thread: How to get object information from Tibia's memory

  1. #1

    How to get object information from Tibia's memory

    Instead of reading the Tibia.dat file, there's a way to read the information from Tibia's memory.

    The structure of the data is like this:
    Code:
    struct TibiaObject {
        int width; //used to be height
        int height; // used to be width, which was wrong
        int unknown1; // dunno what this is yet.. i think it's not read from tibia.dat
        int layers; // i think this is like, spriteOffset or something like that
        int patternX; // dunno, not read from tibia.dat afaik
        int patternY; // dunno, not read from tibia.dat afaik
        int patternDepth; //used to be rare
        int phase; // used to be anim count
        WORD* sprites; //points to an array of sprites, each element being of WORD size, and its packed
        // and the number of sprites, is, width * height * layers * patternX * patterhnY * patternDepth * phase
        TibiaObjFlags flags;
        int walkSpeed; // ground tiles slow or speed your char up, zero is unwalkable
        int textLimit; //if its readable or writable
        int lightRadius; //or intensity
        int lightColor; 
        int shiftX; // offset from the right side of the spot where the sprite is shown ->
        int shiftY; // offset from the bottom side of the spot where the sprite is shown \/
        int height; //objects like parcels, when walked over, have have a diff. height
        int automap; //colors in the "minimap"
        TibiaObjlensHelp lensHelp; // defines which msg is shown then you use the Client Help of tibia
    }
    for the flags:
    Code:
    enum TibiaObjFlags {
            None = 0;
            WalkSpeed = 1;
            TopOrder1 = 0x2; //
            TopOrder2 =0x4;
            TopOrder3 =0x8;
            IsContainer = 0x10; // is actually container
            IsStackable = 0x20; //stack was thought to be 0x10 before, its 0x20 though
            IsCorpse = 0x40;
            IsUsable = 0x80;
            IsRune = 0x100; // contains charges?
            IsWritable = 0x200;
            IsReadable = 0x400;
            IsFluidContainer = 0x800; //fluid containers..
            IsSplash = 0x1000;
            Blocking = 0x2000; // objects that you cant walk over
            IsImmovable = 0x4000;
            BlocksMissiles = 0x8000; // walls
            BlocksPath = 0x10000;
            IsPickupable = 0x20000; // can this be put into other containers?
            IsHangable = 0x40000;
            IsHangableHorizontal = 0x80000;
            IsHangableVertizcal = 0x100000;
            IsRotatable = 0x200000;
            IsLightSource = 0x400000;
            Floorchange = 0x800000;
            IsShifted = 0x1000000;
            HasHeight = 0x2000000;
            IsLayer = 0x4000000;
            IsIdleAnimation = 0x8000000;
            HasAutoMapColor = 0x10000000;
            HasHelpLens = 0x20000000;
            IsGround = 0x40000000;
    }
    for the actions:
    Code:
    enum TibiaObjLensHelp {
            IsLadder = 0x44C;
            IsSewer = 0x44D;
            IsDoor = 0x450;
            IsDoorWithLock = 0x451;
            IsRopeSpot = 0x44E;
            IsSwitch = 0x44F;
            IsStairs = 0x452;
            IsMailbox = 0x453;
            IsDepot = 0x454;
            IsTrash = 0x455;
            IsHole = 0x456;
            HasSpecialDescription = 0x457;
            IsReadOnly = 0x458;
    }
    I'll post more findings soon.

    Read my next posts to find out how to use this.

    EDIT: Fixed struct, added more findings.
    EDIT: More findings, and actions, is HELPLENS, not actions, these define what help it should show for mailboxes, ladders, depots, etc.
    EDIT: changed the names of some stuff for the real ones.
    EDIT: Added IsContainer, and placed where it should be, note that all the values after IsContainer have been changed.
    EDIT: modified nubmer of sprites formula

  2. #2
    Programmer
    Join Date
    Mar 2007
    Posts
    770

    How to get object information from Tibia's memory

    Sweetness!

  3. #3

    How to get object information from Tibia's memory

    Well, nice work and what now we do with this ?

  4. #4
    Senior Member
    Join Date
    Mar 2007
    Posts
    218

    How to get object information from Tibia's memory

    really nice work


    Quote Originally Posted by Xyllo
    Well, nice work and what now we do with this ?
    w8 till he give us an adress? :icon11:

  5. #5
    Senior Member
    Join Date
    Jun 2007
    Posts
    604

    How to get object information from Tibia's memory

    This is very nice, thanks a lot man!!
    btw, you know if changing objects properties from this list will change the client behavior, for example to walk over parcels and such?

  6. #6
    Programmer
    Join Date
    Mar 2007
    Posts
    770

    How to get object information from Tibia's memory

    Quote Originally Posted by zionz
    This is very nice, thanks a lot man!!
    btw, you know if changing objects properties from this list will change the client behavior, for example to walk over parcels and such?
    NG Walks over fire iirc, i assume he uses this function

  7. #7

    How to get object information from Tibia's memory

    any example how to read this info from item in player hand? Just where to start

  8. #8
    Senior Member
    Join Date
    Mar 2007
    Posts
    1,323

    How to get object information from Tibia's memory

    Cam, you're the man!

  9. #9

    How to get object information from Tibia's memory

    Lol sorry, i posted so fast i forgot to put the starting address:
    0x8E30020 <-- there it is

    And yes, the Blocking bit in the TibiaObjFlags is what you must unset to walk over parcels. The id of the parcel is DB0. The address I gave you starts with items with ID=100=0x64, not from zero.

    Now help me figure out what those unknowns mean!

    EDIT: Actually, it's not 0x8E300200.... there is a pointer! Since 0E300000 in my computer is the start of the memory region, there must be a pointer somewhere, so i searched for it, and its 0x5D18F6. So, to get the address of where you must start reading its like this:

    int* mem_region = 0x5D18F6;
    int starting_address = *mem_region + 0x20;

  10. #10
    Senior Member
    Join Date
    Mar 2007
    Posts
    376

    How to get object information from Tibia's memory

    Quote Originally Posted by Cameri
    Lol sorry, i posted so fast i forgot to put the starting address:
    0x8E30020 <-- there it is

    And yes, the Blocking bit in the TibiaObjFlags is what you must unset to walk over parcels. The id of the parcel is DB0. The address I gave you starts with items with ID=100=0x64, not from zero.

    Now help me figure out what those unknowns mean!

    EDIT: Actually, it's not 0x8E300200.... there is a pointer! Since 0E300000 in my computer is the start of the memory region, there must be a pointer somewhere, so i searched for it, and its 0x5D18F6. So, to get the address of where you must start reading its like this:

    int* mem_region = 0x5D18F6;
    int starting_address = *mem_region + 0x20;
    So how would you use it?
    starting_address + itemID + Flag

    that doesn't really make sense, but...
    starting_address + Flag + hmmz?

Posting Permissions

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