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
Attack In Progress Address - Page 2
Page 2 of 2 FirstFirst 12
Results 11 to 14 of 14

Thread: Attack In Progress Address

  1. #11
    Junior Member
    Join Date
    Mar 2012
    Posts
    5
    Quote Originally Posted by Wesker View Post
    if red square & effect
    if red square & projectile sprite
    Quote Originally Posted by XtrmJash View Post
    2. Incoming drawscreentext where X,Y of the text packet is near to the creatures sprites X,Y.
    These are decent options. How do I go about reading this information from the client? What addresses would I read?

  2. #12
    Senior Member
    Join Date
    Jan 2008
    Location
    Cambridge, England
    Posts
    725
    Quote Originally Posted by xyon View Post
    These are decent options. How do I go about reading this information from the client? What addresses would I read?
    You'd have to create a proxy of some description, good examples can be found within TibiaAPI (look for the event AddScreenTExt or similar) and BlackD Proxy. I can't go into much more detail as unfortunately I just don't know, sorry!

    RedSqaure is in the battle list FYI, so you can find that quite easily just by reading battle list, then for each creature if redsquare == 1 do your ting.

    Another method is perhaps to do this:

    Listen for red square. When red square found:

    1. Store red square creatures addresses/offsets in a set of variables.
    2. Read these variables one by one (especially health variable) every X ms.
    3. If HP decreases in the creature which has red square, chances are you've probably done damage to it, so do whatever you wanted to do.

    Possible limitations include that this won't work if you don't do any melee damage / damage without casting spells, and you can't be 100% certain it was you who did the damage, it's also possible that (if you're trying to make a spell casting system) you could end up getting red skulls using your bot quite easily... If you have a target and another player SDs it, you will cast a spell as you are attacking it and it lost health, if that player then kills it between SDing it and you finishing the spell casting, you will still cast your spell.
    Last edited by XtrmJash; 03-06-2013 at 03:34 PM.

  3. #13
    Senior Member
    Join Date
    Jan 2012
    Posts
    417
    Quote Originally Posted by XtrmJash View Post
    RedSqaure is in the battle list FYI, so you can find that quite easily just by reading battle list, then for each creature if redsquare == 1 do your ting.
    until 9.81, red square property were not in the battle list. The property found in the battle list is black square

  4. #14
    Junior Member
    Join Date
    Mar 2012
    Posts
    5
    Quote Originally Posted by Blequi View Post
    until 9.81, red square property were not in the battle list. The property found in the battle list is black square
    Target ID still exists. You simply find the monster with the same ID as target ID and you've found your red square.

    Quote Originally Posted by XtrmJash View Post
    1. Store red square creatures addresses/offsets in a set of variables.
    2. Read these variables one by one (especially health variable) every X ms.
    3. If HP decreases in the creature which has red square, chances are you've probably done damage to it, so do whatever you wanted to do.
    I'm already doing this. I'd like it to be more accurate. I want to find the bit of memory that fires when a projectile shoots out of my character. I'd like to know for certain that it's my attack and I'd like to know as early as possible when my attack actually sent.

    In case someone has a good solution to my real problem, rather than the stated problem, I'll state my real problem. I'm trying to make an auto-striker(sanner) that strikes as soon as I shoot an Assassin Star or bolt. Using the health reduction method works pretty well, but it feels like I can get it to be more accurate and faster. The attack delay resets after sending San, so the sooner after the first strike you use San, the better.

    As it stands right now, I shoot ammo, it takes about 200ms for it to see the health go down, then I San, then it waits 2 seconds before shooting ammo again. (Total cycle time 2.2 seconds) If I attack with only ammo, there is only a two second delay between each attack. (Total cycle time 2 seconds) If I attack, then wait 1 second before sanning, the situation gets worse. It will shoot ammo, wait a second, San, then wait two more seconds to shoot again. (Total cycle time 3 seconds)

    I'm trying to get the shooting and sanning as close together as possible so I can attack most effectively.

    If you simply just San every 2 seconds, sometimes the shooting blocks the San (you are exhausted), and sometimes the San blocks the shooting. I need to know the exact instant that the projectile is being fired to spell strike at the same time.

Tags for this Thread

Posting Permissions

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