Register for your free account! | Forgot your password?

Go Back   elitepvpers > General Gaming > General Gaming Discussion
You last visited: Today at 23:57

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

 

help with autoit script

Reply
 
Old   #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   #17
 
elite*gold: 0
Join Date: Jun 2008
Posts: 428
Received Thanks: 289
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   #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   #19
 
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   #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   #21
 
elite*gold: 0
Join Date: Jan 2010
Posts: 507
Received Thanks: 203
Why you guys doesnt code the bot


Shishidump is offline  
Reply



« Previous Thread | Next Thread »

Similar Threads
Autoit Script als nicht Autoit erkennbar machen
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....
22 Replies - AutoIt
AutoIt script
Can some1 who knows smth about AutoIt and creating scripts make a short script that only would drink hp potion when there is less than 80% hp ? Lets...
16 Replies - Rappelz



All times are GMT +1. The time now is 23:57.


Powered by vBulletin®
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Abuse
Copyright ©2017 elitepvpers All Rights Reserved.