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
Check if creature is on the screen.
Results 1 to 6 of 6

Thread: Check if creature is on the screen.

  1. #1
    Junior Member
    Join Date
    Oct 2014
    Posts
    10

    Check if creature is on the screen.

    I have a problem determining whether creature is on the screen or not. When i read battlelist structure i can check creature's position and comapre it with my position, to check if creature is on the screen. The problem is that once creature goes off screen battlelist structure keeps creature's last coordinates. If i try to compare them with my position, I will get wrong results.

    When battlelist window is opened I can check if creature is displayed there but how could I check if creature is on the screen when battlelist window is closed?

  2. #2
    Senior Member
    Join Date
    Jan 2012
    Posts
    417
    each creature object in the battle list used to have a "Is Valid" property: 1 meaning valid, 0 otherwise.

  3. #3
    Junior Member
    Join Date
    Oct 2014
    Posts
    10
    Quote Originally Posted by Blequi View Post
    each creature object in the battle list used to have a "Is Valid" property: 1 meaning valid, 0 otherwise.
    Thank you, found it .

  4. #4
    Those are still the correct offsets?

    PHP Code:
                UInt32 OFFSET_CREATURE_ID 0;
                
    UInt32 OFFSET_CREATURE_TYPE 3;
                
    UInt32 OFFSET_CREATURE_NAME 4;
                
    UInt32 OFFSET_CREATURE_Z 36;
                
    UInt32 OFFSET_CREATURE_Y 40;
                
    UInt32 OFFSET_CREATURE_X 44;
                
    UInt32 OFFSET_CREATURE_IS_WALKING 80;
                
    UInt32 OFFSET_CREATURE_DIRECTION 84;
                
    UInt32 OFFSET_CREATURE_OUTFIT 100;
                
    UInt32 OFFSET_CREATURE_OUTFIT_HEAD 104;
                
    UInt32 OFFSET_CREATURE_OUTFIT_BODY 108;
                
    UInt32 OFFSET_CREATURE_OUTFIT_LEGS 112;
                
    UInt32 OFFSET_CREATURE_OUTFIT_FEET 116;
                
    UInt32 OFFSET_CREATURE_OUTFIT_ADDON 120;
                
    UInt32 OFFSET_CREATURE_LIGHT 124;
                
    UInt32 OFFSET_CREATURE_LIGHT_COLOR 128;
                
    UInt32 OFFSET_CREATURE_HP_BAR 140;
                
    UInt32 OFFSET_CREATURE_WALK_SPEED 144;
                
    UInt32 OFFSET_CREATURE_IS_VISIBLE 148;
                
    UInt32 OFFSET_CREATURE_SKULL 152;
                
    UInt32 OFFSET_CREATURE_PARTY 156;
                
    UInt32 OFFSET_CREATURE_WARICON 164;
                
    UInt32 OFFSET_CREATURE_ISBLOCKING 168;
                
    UInt32 OFFSET_CREATURE_WITHINVIEW 172
    Quote Originally Posted by Blequi View Post
    each creature object in the battle list used to have a "Is Valid" property: 1 meaning valid, 0 otherwise.

  5. #5
    Senior Member
    Join Date
    Jan 2012
    Posts
    417
    Quote Originally Posted by brunopbarrote View Post
    Those are still the correct offsets?

    PHP Code:
                UInt32 OFFSET_CREATURE_ID 0;
                
    UInt32 OFFSET_CREATURE_TYPE 3;
                
    UInt32 OFFSET_CREATURE_NAME 4;
                
    UInt32 OFFSET_CREATURE_Z 36;
                
    UInt32 OFFSET_CREATURE_Y 40;
                
    UInt32 OFFSET_CREATURE_X 44;
                
    UInt32 OFFSET_CREATURE_IS_WALKING 80;
                
    UInt32 OFFSET_CREATURE_DIRECTION 84;
                
    UInt32 OFFSET_CREATURE_OUTFIT 100;
                
    UInt32 OFFSET_CREATURE_OUTFIT_HEAD 104;
                
    UInt32 OFFSET_CREATURE_OUTFIT_BODY 108;
                
    UInt32 OFFSET_CREATURE_OUTFIT_LEGS 112;
                
    UInt32 OFFSET_CREATURE_OUTFIT_FEET 116;
                
    UInt32 OFFSET_CREATURE_OUTFIT_ADDON 120;
                
    UInt32 OFFSET_CREATURE_LIGHT 124;
                
    UInt32 OFFSET_CREATURE_LIGHT_COLOR 128;
                
    UInt32 OFFSET_CREATURE_HP_BAR 140;
                
    UInt32 OFFSET_CREATURE_WALK_SPEED 144;
                
    UInt32 OFFSET_CREATURE_IS_VISIBLE 148;
                
    UInt32 OFFSET_CREATURE_SKULL 152;
                
    UInt32 OFFSET_CREATURE_PARTY 156;
                
    UInt32 OFFSET_CREATURE_WARICON 164;
                
    UInt32 OFFSET_CREATURE_ISBLOCKING 168;
                
    UInt32 OFFSET_CREATURE_WITHINVIEW 172
    I don't know. I'm not tracking Tibia updates anymore.

  6. #6
    Senior Member
    Join Date
    Mar 2009
    Location
    Brazil
    Posts
    266

Posting Permissions

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