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
Tibia [10.33] Battlelist Structure
Results 1 to 5 of 5

Thread: Tibia [10.33] Battlelist Structure

  1. #1
    Junior Member
    Join Date
    Oct 2009
    Posts
    14

    Tibia [10.33] Battlelist Structure

    Hello

    I've spent some hours trying to figure out the battelist structure for the latest Tibia client. Last time I did this kind of stuff was some years ago, so there have been some changed which I've noticed

    There is some values that are still unknown for me. Does anyone of you know what they can be?

    Code:
    private class Offset
    {
        public const uint Id                    = 0x00;
        public const uint Type                  = 0x03;
        public const uint Name                  = 0x04;
        public const uint PositionZ             = 0x24;
        public const uint PositionY             = 0x28;
        public const uint PositionX             = 0x2C;
        public const uint DisplacementY         = 0x30;
        public const uint DisplacementX         = 0x34;
        public const uint Direction             = 0x38;
        
        // Seems to be set to a specific time after each movement of the creature
        // If the creature moves straight they are set to the same value
        // If the creature moves diagonally they are set to different values. UnknownB is always 564 (for my character atleast) greater than UnknownA.
        // My guess is that these are being set to the time when the creature can make a new movement
        // UnknownA is for the time the creature can make a straight move
        // UnknownB is for the time the creature can make a diagonal move
        // (Or the other way around - Is the delay greater when making 2 diagonal moves or when making 2 straight moves?)
        public const uint UnknownA = 0x3C; 
        public const uint UnknownB = 0x40;
    
        public const uint WalkingDirectionY     = 0x44; // 0x20 if moved in Y otherwise 0x00
        public const uint WalkingDirectionX     = 0x48; // 0x20 if moved in X otherwise 0x00
        public const uint GroundSpeed           = 0x4C; 
        public const uint IsWalking             = 0x50;            
        public const uint LastWalkedDirection   = 0x54;
    
        // These seems to change when (other) players changes floor
        // Almost always one of the values:
        // 0x0, 0x7FFFFFFF, 0xFFFFFFFF. So some kind of bit masking/shifting/or similiar?
        public const uint UnknownC = 0x58;
        public const uint UnknownD = 0x5C;
    
        public const uint LookType              = 0x60;
        public const uint LookHead              = 0x64;
        public const uint LookBody              = 0x68;
        public const uint LookLegs              = 0x6C;
        public const uint LookFeet              = 0x70;
        public const uint LookAddon             = 0x74;
        public const uint LookMount             = 0x78;
        public const uint LightRadius           = 0x7C;
        public const uint LightColor            = 0x80;
    
        public const uint UnknownE = 0x84;
        
        public const uint ShowBlackBorderUntilThisTime= 0x88; // Better name? :)
        public const uint HPPercent             = 0x8C;
        public const uint WalkSpeed             = 0x90;
        public const uint IsBlocking            = 0x94;
        public const uint SkullFlag             = 0x98;
        public const uint PartyFlag             = 0x9C;
        public const uint GuildWarFlag          = 0xA0;
        public const uint IsVisible             = 0xA4;
        public const uint BorderColorRed        = 0xA8;
        public const uint BorderColorGreen      = 0xAC;
        public const uint BorderColorBlue       = 0xB0;
        public const uint BorderVisible         = 0xB4;
        public const uint NumInGuildOrParty     = 0xB8;
        public const uint TypeB                 = 0xBC;
    }
    Last edited by gurka; 01-28-2014 at 04:21 PM.

  2. #2
    Kudos for doing it alone, not as bunch of kids here ripping someone's code.

  3. #3
    Junior Member
    Join Date
    Oct 2009
    Posts
    14
    Quote Originally Posted by szulak View Post
    Kudos for doing it alone, not as bunch of kids here ripping someone's code.
    Hehe, well I just updated my old code which I put together by checking TibiaAPI and this forum, so I can't say that I made it all by myself. Most of the new stuff (from Offset.LookMount and onwards) I figured out myself though

    Btw: Does anyone know exacly what WalkingDirectionY/X is used for - and why is the value 0x00 or 0x20? Why not just a boolean (0x00/0x01)?

  4. #4
    Senior Member
    Join Date
    Jan 2012
    Posts
    417
    Quote Originally Posted by gurka View Post
    Btw: Does anyone know exacly what WalkingDirectionY/X is used for - and why is the value 0x00 or 0x20? Why not just a boolean (0x00/0x01)?
    0x20 is the default sprite size. I think it's used in the game screen drawing loop as a kind of multiplication factor or offset.

    ex: draw the sprite in the pixel "topixel(global_pox_x) + walk_dir_x" from the game screen. The same can be applied to y.

    I would not say I'm completely sure, but it does a lot of sense to be used there.

  5. #5
    Junior Member
    Join Date
    Oct 2009
    Posts
    14
    Quote Originally Posted by Blequi View Post
    0x20 is the default sprite size. I think it's used in the game screen drawing loop as a kind of multiplication factor or offset.

    ex: draw the sprite in the pixel "topixel(global_pox_x) + walk_dir_x" from the game screen. The same can be applied to y.

    I would not say I'm completely sure, but it does a lot of sense to be used there.
    Ahh. That makes sense. Would have been easier to figure out if I had displayed the value in base 10.

    Another thing: My Creature class has this guess (atleast 0x00, 0x01 and 0x02 were guesses):
    Code:
    /*
     * 0x00: Player
     * 0x01: NPC (unfriendly)
     * 0x02: NPC (friendly)
     * 0x03: Summon (mine)
     * 0x04: Summon (not mine)
     */
    public uint TypeB;
    Which, after decompiling the flash client, can be confirmed with this:
    Code:
    private function set _3575610type(param1:int) : void {
        if(!(param1 == TYPE_PLAYER) && !(param1 == TYPE_MONSTER) && !(param1 == TYPE_NPC) && !(param1 == TYPE_SUMMON_OWN) && !(param1 == TYPE_SUMMON_OTHERS))
        [...]
    }
    I also found these variables in the decompiled flash client:
    Code:
    protected var m_NumberOfPVPHelpers:uint = 0;
    protected var m_IsTrapper:Boolean = false;
    protected var m_IsUnpassable:Boolean = false;
    We have an offset to "IsBlocking" which I guess corresponds to "m_IsUnpassable". What is "m_IsTrapper"? Also, "m_NumberOfPVPHelpers": Maybe any of these are one of my unknowns?
    Last edited by gurka; 01-28-2014 at 04:35 PM.

Posting Permissions

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