Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > AutoIt
You last visited: Today at 02:27

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Help .. Calculate Is if in range of attack?

Discussion on Help .. Calculate Is if in range of attack? within the AutoIt forum part of the Coders Den category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Aug 2012
Posts: 20
Received Thanks: 5
Help .. Calculate Is if in range of attack?

Hi all... I am new using autoit...
I try create one bot .. for now all is ok ... but, i try to attack enemy if is in distance of my attack range.. i use the Memoryread for read the cord.. of my position and position of my enemy .. ok example my cord is x= 1193.75 y= 197.25

Ok.. How calculate if is in my range of attack? :S if my range example is 20

I only search for attack all enemy in this range :.. 1203.75,127.25 ... 1173.75,177.25 .. is in range of 20... help me pliss? :s
how calculate if my enemy if in this range
edmer is offline  
Old 10/23/2017, 19:19   #2
 
elite*gold: 0
Join Date: Apr 2011
Posts: 363
Received Thanks: 167
$dy = Enemy_Y - Player_Y
$dx = Enemy_X - Player_X
$dz = Enemy_Z - Player_Z
$3dDistance = sqrt($dy*dy + $dx*$dx + $dz*$dz) //on 3d games
$2dDistance = sqrt($dx*$dx + $dy*$dy)//2d games
elmarcia is offline  
Old 10/24/2017, 19:40   #3
 
elite*gold: 0
Join Date: Aug 2012
Posts: 20
Received Thanks: 5
Ty Bro !! i go to test :3
edmer is offline  
Old 10/31/2017, 09:43   #4
 
elite*gold: 0
Join Date: Feb 2014
Posts: 132
Received Thanks: 31
Quote:
Originally Posted by edmer View Post
Ty Bro !! i go to test :3
its work ??? share you script pls
lenclstr746 is offline  
Old 11/01/2017, 09:47   #5
 
elite*gold: 100
Join Date: Apr 2008
Posts: 860
Received Thanks: 1,487
Quote:
Originally Posted by lenclstr746 View Post
its work ???
Of course this works. Its just basic maths. It applys for all games, you just need to figure out where to get the 2d or 3d coordinates from.
florian0 is offline  
Reply


Similar Threads Similar Threads
calculate the account attack 5517
02/23/2013 - CO2 Private Server - 4 Replies
how can i calculate my account attack by another way how the source calculate my character final attack points because in my source most characters attack 70k:80k "+12 2 soc 2sdg -7 super"and i think that is very high ?
plesa all Help For Attack Fire is Attack fire for 300 help for atack
08/07/2011 - CO2 Private Server - 0 Replies
plase help attck its for soruce Kimo 5375 no Tails
How to find a bias attack speed, run and attack range
06/02/2011 - Last Chaos - 3 Replies
While I can not understand how to find it attackspeed =* action-> DE4 runningspeed =* action-> DDC attackrange =* action-> DE0 attackrange2 =* status-> 1094A4 Help me please
info needed, how to calculate pet stats or attack/evasion
01/10/2011 - Battle of the Immortals - 4 Replies
Hi, there is a way to calculate pet stats and attack/evasion of a pet that need to grown up? i explain better, i have a pet lvl 1, and i would like to know how it will be at alvl 100 for example... so how many stats it will get per lvl and how much attack and evasion/accuracy it will have on that lvl also... Thanks in advice for help
[Help] Calculate damage Player-Mob
05/23/2009 - CO2 Private Server - 4 Replies
Does someone can explain me how to calculate the damage to a MobTarget including: Character Level, MaxAtk & MinAtk Mob Level, Defence & Dodge Or a link to eudemons database to look into the damage calculation could help me! Thanks for reply :)



All times are GMT +1. The time now is 02:27.


Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2025 elitepvpers All Rights Reserved.