Tari Posted August 24, 2006 Posted August 24, 2006 (edited) Ok i want to make this script for a game that attack when you select a character. I got that to work but now i want to release my creation an make a possibilty to let the users select their resolution. I made the GUI and did my best on making it work but now it just runs bots resolutions at the same time . Could anyone plz help me with this thx in advance. --------------------------------------------------------------------------------------------------------------------------------------------------------- expandcollapse popupGlobal $Paused HotKeySet("{F11}", "TogglePause") HotKeySet("{F10}", "Terminate") $delay1 = InputBox("Delay1", "How much delay after the first attack? (in ms so 1 sec = 1000)", "", "") $delay2 = InputBox("Delay2", "How much delay after the second attack? (in ms so 1 sec = 1000)", "", "") $delay3 = InputBox("Delay3", "How much delay after the third attack? (in ms so 1 sec = 1000)", "", "") $delay4 = InputBox("Delay4", "How much delay after the fourth attack? (in ms so 1 sec = 1000)", "", "") #region #include <GuiConstants.au3> GuiCreate("Resolution selection", 248, 160,-1, -1 , BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS)) $Label_1 = GuiCtrlCreateLabel("What is your ingame resolution?", 40, 30, 170, 20) $res_1 = GuiCtrlCreateRadio("1024x768", 30, 70, 90, 20) $res_2 = GuiCtrlCreateRadio("1280x1024", 130, 70, 90, 20) $ok = GuiCtrlCreateButton("Start", 30, 100, 190, 40) GuiSetState() While 1 $msg = GuiGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $ok If BitAnd(GUICtrlRead($res_1),$GUI_CHECKED) = $GUI_CHECKED Then Do If PixelGetColor( 454 , 45 ) = 0xFFC6C6 Then ControlSend("SRO_Client", "", "", "1") Sleep ($delay1) ControlSend("SRO_Client", "", "", "2") Sleep ($delay2) ControlSend("SRO_Client", "", "", "3") Sleep ($delay3) ControlSend("SRO_Client", "", "", "4") Sleep ($delay4) EndIf Until PixelGetColor( 775 , 755 ) = 0xFFFF00 ElseIf BitAnd(GUICtrlRead($res_2),$GUI_CHECKED) = $GUI_CHECKED Then Do If PixelGetColor( 582 , 45 ) = 0xFFC6C6 Then ControlSend("SRO_Client", "", "", "1") Sleep ($delay1) ControlSend("SRO_Client", "", "", "2") Sleep ($delay2) ControlSend("SRO_Client", "", "", "3") Sleep ($delay3) ControlSend("SRO_Client", "", "", "4") Sleep ($delay4) EndIf Until PixelGetColor( 775 , 755 ) = 0xFFFF00 EndIf EndSelect WEnd Exit #endregion Func TogglePause() $Paused = NOT $Paused While $Paused sleep(100) ToolTip('Script is "Paused"',0,0) WEnd ToolTip("") EndFunc Func Terminate() Exit 0 EndFunc Edited August 24, 2006 by Tari
Valuater Posted August 24, 2006 Posted August 24, 2006 (edited) Do If PixelGetColor( 454 , 45 ) = 0xFFC6C6 Then .... Until PixelGetColor( 775 , 755 ) = 0xFFFF00 ???????? maybe expandcollapse popupGlobal $Paused HotKeySet("{F11}", "TogglePause") HotKeySet("{F10}", "Terminate") $delay1 = InputBox("Delay1", "How much delay after the first attack? (in ms so 1 sec = 1000)", "", "") $delay2 = InputBox("Delay2", "How much delay after the second attack? (in ms so 1 sec = 1000)", "", "") $delay3 = InputBox("Delay3", "How much delay after the third attack? (in ms so 1 sec = 1000)", "", "") $delay4 = InputBox("Delay4", "How much delay after the fourth attack? (in ms so 1 sec = 1000)", "", "") #region #include <GuiConstants.au3> GUICreate("Resolution selection", 248, 160, -1, -1, BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS)) $Label_1 = GUICtrlCreateLabel("What is your ingame resolution?", 40, 30, 170, 20) $res_1 = GUICtrlCreateRadio("1024x768", 30, 70, 90, 20) $res_2 = GUICtrlCreateRadio("1280x1024", 130, 70, 90, 20) $ok = GUICtrlCreateButton("Start", 30, 100, 190, 40) GUISetState() While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $ok If BitAND(GUICtrlRead($res_1), $GUI_CHECKED) = $GUI_CHECKED Then $Xpos = 454 $Ypos = 45 Else $Xpos = 775 $Ypos = 755 EndIf Do If PixelGetColor($Xpos, $Ypos) = 0xFFC6C6 Then ControlSend("SRO_Client", "", "", "1") Sleep($delay1) ControlSend("SRO_Client", "", "", "2") Sleep($delay2) ControlSend("SRO_Client", "", "", "3") Sleep($delay3) ControlSend("SRO_Client", "", "", "4") Sleep($delay4) EndIf Until PixelGetColor($Xpos, $Ypos) = 0xFFFF00 EndSelect WEnd Exit #endregion Func TogglePause() $Paused = Not $Paused While $Paused Sleep(100) ToolTip('Script is "Paused"', 0, 0) WEnd ToolTip("") EndFunc ;==>TogglePause Func Terminate() Exit 0 EndFunc ;==>Terminate and $Ypos = 45... 45 is a small area 8) Edited August 24, 2006 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