helpwins Posted September 5, 2010 Posted September 5, 2010 is the any way to make this run better???? expandcollapse popupGlobal $Paused HotKeySet("{PAUSE}", "TogglePause") HotKeySet("{ESC}", "Terminate") HotKeySet("+!d", "ShowMessage") ;Shift-Alt-d send("{PAUSE}") MouseClick("left",617,498,1,0) sleep(1000) MouseClick("left",598,509,2,0) sleep(1600) ;;;; Body of program would go here ;;;; While 1 ;1 $color = 0x000000 $var = PixelGetColor( 253 , 182 ) If $var = $color Then ;click something MouseClick("left", 951, 614, 1, 0) sleep(2000) MouseClick("left", 814, 645, 1, 0) Sleep(20000) MouseClick("left",617,498,1,0) sleep(1000) MouseClick("left",598,509,2,0) sleep(1600) Else ;click something else $color = 0x8c0808 $var = PixelGetColor( 471,183 ) If $var = $color Then ;click something MouseClick("left", 661, 653, 1, 0) Sleep(2000) Else ;click something else sleep(6000) MouseClick("left", 661, 653, 1, 0) Sleep(2000) EndIf EndIf ;2 $color = 0x000000 $var = PixelGetColor( 253 , 182 ) If $var = $color Then ;click something MouseClick("left", 951, 614, 1, 0) sleep(2000) MouseClick("left", 814, 645, 1, 0) Sleep(20000) MouseClick("left",617,498,1,0) sleep(1000) MouseClick("left",598,509,2,0) sleep(1600) Else ;click something else $color = 0x8c0808 $var = PixelGetColor( 471,183 ) If $var = $color Then ;click something MouseClick("left", 571, 653, 1, 0) Sleep(2000) Else ;click something else sleep(6000) MouseClick("left", 661, 653, 1, 0) Sleep(2000) EndIf EndIf ;3 $color = 0x000000 $var = PixelGetColor( 253 , 182 ) If $var = $color Then ;click something MouseClick("left", 951, 614, 1, 0) sleep(2000) MouseClick("left", 814, 645, 1, 0) Sleep(20000) MouseClick("left",617,498,1,0) sleep(1000) MouseClick("left",598,509,2,0) sleep(1600) Else ;click something else $color = 0x8c0808 $var = PixelGetColor( 471,183 ) If $var = $color Then ;click something MouseClick("left", 571, 653, 1, 0) Sleep(2000) Else ;click something else sleep(6000) MouseClick("left", 661, 653, 1, 0) Sleep(2000) EndIf EndIf WEnd ;;;;;;;; Func TogglePause() $Paused = NOT $Paused While $Paused sleep(0) ToolTip('Script is "Paused"',0,0) WEnd ToolTip("") EndFunc Func Terminate() Exit 0 EndFunc Func ShowMessage() MsgBox(4096,"","This is a message.") EndFunc
Fubarable Posted September 5, 2010 Posted September 5, 2010 (edited) In what way is it not running well? In other words, what's your specific question? Edit: one thing you can do is get rid of all that repetition. When you see a lot of repetition in your code, you should think of creating a Func to encapsulate it. You're still having a time of it creating your aqworlds bot, aren't ya. Luck! Edited September 5, 2010 by Fubarable
legoman1 Posted September 6, 2010 Posted September 6, 2010 You're still having a time of it creating your aqworlds bot, aren't ya.I'm pretty sure thats against the rules.lollegoman
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