Xav Posted January 11, 2008 Share Posted January 11, 2008 ne1 know like to active script press key i did think it was hotkey but it dont work like when its done it's reapeting non stops . Whats the func PLZ ? HotKeySet("7" ,"Owned") Func owned() Sleep(10) $Game = NOT $Game If $Game Then ToolTip('Press (F9) to Exit Game Bot',0,0) While $Game $Head1 = PixelSearch( 1,1,1023,767, 0x7B7542 ) If IsArray($Head1) Then MouseClick("Left",$head1[0], $head1[1],1,0) $Head2 = PixelSearch( 1,1,1023,767, 0x212410 ) If IsArray($Head2) Then MouseClick("Left",$head2[0], $head2[1],1,0) WEnd ToolTip("") EndFunc Link to comment Share on other sites More sharing options...
Brickoneer Posted January 11, 2008 Share Posted January 11, 2008 (edited) I couldn't quite understand what you are trying to do, but if I'm not mistaken, you are looking for a hotkey to start/stop a certain function? If so, is something like this what you are looking for? HotKeySet("7", "owned") While 1 If $game Then ToolTip('Press (F9) to Exit Game Bot', 0, 0) $Head1 = PixelSearch(1, 1, 1023, 767, 0x7B7542) If IsArray($Head1) Then MouseClick("Left", $Head1[0], $Head1[1], 1, 0) $Head2 = PixelSearch(1, 1, 1023, 767, 0x212410) If IsArray($Head2) Then MouseClick("Left", $Head2[0], $Head2[1], 1, 0) Else ToolTip("") EndIf sleep(10) WEnd Func owned() $game = Not $game EndFunc ;==>owned Edited January 11, 2008 by Brickoneer Link to comment Share on other sites More sharing options...
Xav Posted January 11, 2008 Author Share Posted January 11, 2008 (edited) I couldn't quite understand what you are trying to do, but if I'm not mistaken, you are looking for a hotkey to start/stop a certain function? If so, is something like this what you are looking for? HotKeySet("7", "owned") While 1 If $game Then ToolTip('Press (F9) to Exit Game Bot', 0, 0) $Head1 = PixelSearch(1, 1, 1023, 767, 0x7B7542) If IsArray($Head1) Then MouseClick("Left", $Head1[0], $Head1[1], 1, 0) $Head2 = PixelSearch(1, 1, 1023, 767, 0x212410) If IsArray($Head2) Then MouseClick("Left", $Head2[0], $Head2[1], 1, 0) Else ToolTip("") EndIf sleep(10) WEnd Func owned() $game = Not $game EndFunc ;==>owned Get an eror on this and it's IF $GAME ... :S I think i found the func sec ill post Edited January 11, 2008 by Xav Link to comment Share on other sites More sharing options...
Xav Posted January 11, 2008 Author Share Posted January 11, 2008 This is working its staying on Global $Paused HotKeySet("{PAUSE}", "TogglePause") HotKeySet("{ESC}", "Terminate") HotKeySet("7" ,"Owned") Func owned() Sleep(10) $Game = NOT $Game If $Game Then ToolTip('Press (F9) to Exit Game Bot',0,0) While $Game $Head1 = PixelSearch( 1,1,1023,767, 0x7B7542 ) If IsArray($Head1) Then MouseClick("Left",$head1[0], $head1[1],1,0) $Head2 = PixelSearch( 1,1,1023,767, 0x212410 ) If IsArray($Head2) Then MouseClick("Left",$head2[0], $head2[1],1,0) WEnd ToolTip("") EndFunc While 1 Sleep(100) WEnd ; Func TogglePause() $Paused = NOT $Paused While $Paused sleep(100) ToolTip('Script is "Paused"',0,0) WEnd ToolTip("") EndFunc Func Terminate() Exit 0 EndFunc 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