Ethereal401 Posted July 13, 2009 Share Posted July 13, 2009 My goal here is instead of using timers or a specified number of clicks, is to take a color from the screen (healthbar) and use that to determine rather or not to stop swinging. This is what I have now.... expandcollapse popupDim $a, $b, $c $c = InputBox( "Question", "How long would you like to rest? (1 sec = 1000)", "120000" ) $a = 0 $b = InputBox( "Question", "How many times would you like to swing?", "10" ) $Weapon = 1 Sleep ( 10000 ) while 1 sleep ( 100 ) Call ("EquipAttack") sleep ( 500 ) Call("Attack") sleep ( 500 ) Call ("Rest") WEnd Func EquipAttack() Sleep(1000) ;send ("{1} - {4}") ; Weapon Send("{" & $Weapon & "}") $Weapon = $Weapon + 1 If $Weapon = 2 Then $Weapon = 1 EndIf Send ( "r" ) Sleep ( 1000 ) Sleep(1000) EndFunc Func Attack() Do sleep ( 100 ) Mouseclick ( "Left" ) sleep ( 100 ) sleep ( 100 ) sleep ( 1000 ) sleep ( 500 ) sleep ( 1000 ) $a = $a + 1 Until $a = $b $a = 0 EndFunc Func Rest() Send ( "R" ) Sleep ( 1500 ) Send ( "0" ) Sleep ( 1500 ) Mouseclick ( "Left" ) Sleep ( 1500 ) Sleep ( 1500 ) Send ( "R" ) Sleep ( 1500 ) Send ( "0" ) Sleep ( 1500 ) Mouseclick ( "Left" ) Sleep ( 1500 ) Sleep ( $c ) Send ( "w" ) Sleep ( 1500 ) Sleep ( 1500 ) Sleep ( 2000 ) EndFunc I would like to make a message box pop up to tell me to place the mouse cursor over the health bar, and when that pixel changes than stop left clicking. Link to comment Share on other sites More sharing options...
dantay9 Posted July 13, 2009 Share Posted July 13, 2009 I think PixelGetColor is what you are looking for. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now