Valuater Posted December 19, 2007 Posted December 19, 2007 (edited) sorry for double entry Just hit the delete button ( bottom right of YOUR post ************************************ Try to make it fancy expandcollapse popupOpt("MouseCoordMode", 2) ;1=absolute, 0=relative, 2=client Opt("PixelCoordMode", 2) ;1=absolute, 0=relative, 2=client HotKeySet("{F1}", "PK") HotKeySet("{F2}", "End") ;Elephant Pixels $Elephant = StringSplit("0x296163,0x089a08,0xbd9a18,0xc69a08,0xc65929,0xde6542,0xa52000,0x101421", ",") ;Mouseclick options. $button = "right" $clicks = 1 Dim $go = 0 While 1 $found = 1 If $go = 1 Then For $x = 1 To $Elephant[0] $search = PixelSearch(143, 143, 766, 467, $Elephant[$x], 10, 10) If Not @error Then $found = 2 Send("^a") MouseClick($button, $search[0], $search[1], $clicks) TrayTip("Congratulations", "You attacked Elephant (" & $x & ") with success", 0) EndIf Next If $found = 1 Then TrayTip("Error", "Cannot find correct color. Will try again in 5 seconds ", 0) $found = 10 EndIf EndIf Sleep(500 * $found/2) TrayTip("","",1) Sleep(500 * $found/2) WEnd Func PK() $go = Not $go EndFunc ;==>PK Func End() Exit EndFunc ;==>End ... not sure that the strinsplit with work with non-string numbers it will go when you press F1 it will "pause" if you press F1 again it will try to find the colors again after 5 seconds rather than exiting so quick 8) Edited December 19, 2007 by Valuater
SofaKingWeTardEd Posted December 19, 2007 Author Posted December 19, 2007 Just hit the delete button ( bottom right of YOUR post ************************************ Try to make it fancy expandcollapse popupOpt("MouseCoordMode", 2) ;1=absolute, 0=relative, 2=client Opt("PixelCoordMode", 2) ;1=absolute, 0=relative, 2=client HotKeySet("{F1}", "PK") HotKeySet("{F2}", "End") ;Elephant Pixels $Elephant = StringSplit("0x296163,0x089a08,0xbd9a18,0xc69a08,0xc65929,0xde6542,0xa52000,0x101421", ",") ;Mouseclick options. $button = "right" $clicks = 1 Dim $go = 0 While 1 $found = 1 If $go = 1 Then For $x = 1 To $Elephant[0] $search = PixelSearch(143, 143, 766, 467, $Elephant[$x], 10, 10) If Not @error Then $found = 2 Send("^a") MouseClick($button, $search[0], $search[1], $clicks) TrayTip("Congratulations", "You attacked Elephant (" & $x & ") with success", 0) EndIf Next If $found = 1 Then TrayTip("Error", "Cannot find correct color. Will try again in 5 seconds ", 0) $found = 10 EndIf EndIf Sleep(500 * $found/2) TrayTip("","",1) Sleep(500 * $found/2) WEnd Func PK() $go = Not $go EndFunc ;==>PK Func End() Exit EndFunc ;==>End ... not sure that the strinsplit with work with non-string numbers 8) Valuator, that works amazing!!! The main functions are done. Although currently only attacking 1 person of that colour when multiple of the character is there. But, only had AutoIt no more than 2 weeks
Valuater Posted December 19, 2007 Posted December 19, 2007 (edited) Welcome!! change the sleep for the elephant if found and it will attack again more quickly example... If Not @error Then $found = .5 8) Edited December 19, 2007 by Valuater
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