Register for your free account! | Forgot your password?

Go Back   elitepvpers > General Gaming > General Gaming Discussion
You last visited: Today at 15:43

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

Advertisement



help with autoit script

Discussion on help with autoit script within the General Gaming Discussion forum part of the General Gaming category.

Reply
 
Old 07/09/2011, 00:52   #16
 
elite*gold: 0
Join Date: May 2010
Posts: 42
Received Thanks: 1
Quote:
Originally Posted by karraksc View Post
Try it like this:

func Died()
WinActivate("Hero","")
sleep(10000) ;10 sec delay
MouseClick("left" ,836,635,1,1) ; add a 10ms delay to move mouse
endfunc

While 1
if HP=0 then died() ; use any method to find out if you are dead and handle it
Wend
gives me an error with the HP thing.
if i delete the if statement and only call the Died() function then it still doesn't work. only moves the cursor to the position but doesn't click


btw i use Win7 64-bit
ikjahaa is offline  
Old 07/09/2011, 02:29   #17
 
karraksc's Avatar
 
elite*gold: 0
Join Date: Jun 2008
Posts: 447
Received Thanks: 296
Post

Quote:
Originally Posted by ikjahaa View Post
gives me an error with the HP thing.
if i delete the if statement and only call the Died() function then it still doesn't work. only moves the cursor to the position but doesn't click


btw i use Win7 64-bit
the line with the HP=0 is only an example where you'd replace it with whatever routine you plan on using to tell when you are dead. I originally used a getpixelcolor check to see when the red ran out of the HP bar. This is what I used to check the HP

func IsAlive()
while $test=0xB1251C ; Red on HP bar
sleep(1000) ; Wait one second then test if dead
$test=pixelgetcolor(129,33,$id) ;B1251C=Alive else =Dead
WEnd ; exit only if HP bar is empty (dead)
endfunc

func Died()
WinActivate("Hero","")
Sleep(10000) ;Wait for timer to run out
MouseClick("left",836,635,1,1)
endfunc

While 1
isAlive() ; Loops as long as char is alive, checks every 1 second
Died() ; only gets here if char died, so revive
wend ;loop back thru and monitor HP
karraksc is offline  
Old 07/10/2011, 18:14   #18
 
elite*gold: 0
Join Date: May 2010
Posts: 42
Received Thanks: 1
Quote:
Originally Posted by karraksc View Post
the line with the HP=0 is only an example where you'd replace it with whatever routine you plan on using to tell when you are dead. I originally used a getpixelcolor check to see when the red ran out of the HP bar. This is what I used to check the HP

func IsAlive()
while $test=0xB1251C ; Red on HP bar
sleep(1000) ; Wait one second then test if dead
$test=pixelgetcolor(129,33,$id) ;B1251C=Alive else =Dead
WEnd ; exit only if HP bar is empty (dead)
endfunc

func Died()
WinActivate("Hero","")
Sleep(10000) ;Wait for timer to run out
MouseClick("left",836,635,1,1)
endfunc

While 1
isAlive() ; Loops as long as char is alive, checks every 1 second
Died() ; only gets here if char died, so revive
wend ;loop back thru and monitor HP
i understand but i think there is a problem with the mouseclick event.
it doesn't click within hero, in other ( actieve ) programs it does.

just make me a bot that simply clicks in hero. like moving your charecter.
i'll find the solution in that.
ps. test it please
ikjahaa is offline  
Old 07/10/2011, 19:06   #19
 
schlat's Avatar
 
elite*gold: 0
Join Date: Nov 2008
Posts: 365
Received Thanks: 276
Little tip:
1. winhotkey is not correctly working with hero
2. Use WinActive for u while routine otherwise the bot hits your mouse/keys even if hero is not in the foreground
3. mouseclick with x/y/z position are constant! This means if your hero window is at a other position u will click at the wrong position
4. mouseclick and keypress events needs some hold down time (my experience between 30-50ms) ohterwise the event gets lost and hero doesnt recognize anything
5. if you use mouseclick make a dynamic routine which reads and proove the position to click

Good Luck!
schlat is offline  
Old 07/10/2011, 21:32   #20
 
elite*gold: 0
Join Date: May 2010
Posts: 42
Received Thanks: 1
Quote:
Originally Posted by schlat View Post
Little tip:
1. winhotkey is not correctly working with hero
2. Use WinActive for u while routine otherwise the bot hits your mouse/keys even if hero is not in the foreground
3. mouseclick with x/y/z position are constant! This means if your hero window is at a other position u will click at the wrong position
4. mouseclick and keypress events needs some hold down time (my experience between 30-50ms) ohterwise the event gets lost and hero doesnt recognize anything
5. if you use mouseclick make a dynamic routine which reads and proove the position to click

Good Luck!
ty , i'll try this
ikjahaa is offline  
Old 07/11/2011, 17:29   #21
 
elite*gold: 0
Join Date: Jan 2010
Posts: 507
Received Thanks: 203
Why you guys doesnt code the bot
Shishidump is offline  
Reply


Similar Threads Similar Threads
Autoit Script als nicht Autoit erkennbar machen
02/22/2013 - AutoIt - 22 Replies
Hallo es haben wiele bestimmt schon gesehn das w0uter mal eine Anleitung gepostet hat wie man ein Autoit script so umbaut das es keins mehr ist. Die anleitung ist aber leider weg :( Dann habe ich mich selber rangesetz und was ausprobiert aber hat nichts gebracht. Dann habe ich geguckt bis wohin sein script geht als ... (kA wie man das nent halt das im hex editor ganz links diese 0x zahlen) und davor habe ich ein ha genauso eins gemacht und verglichen. Am anfang habe ich bemerkt es fengt...



All times are GMT +1. The time now is 15:43.


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.