skipperpoop Posted January 11, 2006 Share Posted January 11, 2006 Hi, I've been trying to make a program that automatically pushes set keys when the Health meter drops below a certain point (in th game Conquer Online). The set keys would be the hotkeys for health/mana potions. Here' what I got: ; Script Start - Add your code below here Global $Paused HotKeySet("{END}", "Quit") HotKeySet("{HOME}", "pause") HotKeySet("{INSERT}", "start") Func start() $bLoop = 1 While $bLoop = 1 If PixelGetColor(66,724) = 0x940810 Then Sleep(200) Else Send("F1") EndIf If PixelGetColor(26,724) = 0x940810 Then Sleep(200) Else Send("F1") EndIf WEnd EndFunc Func pause() $Paused = Not $Paused While $Paused Sleep(100) Wend EndFunc Func Quit() EXIT EndFunc If msgbox(1, "bot", "Press [iNSERT] to start. [HOME] will pause the bot. [END] quits the program.") = 2 Then EXIT Else $Paused = Not $Paused While $Paused Sleep(100) Wend EndIf ------------------------------------------------------------------------------ Ok, so when I run it, it searches the whole screen instead of the designated coordinates. I think this, because when it is running, the player/monster names (which are normally mouse-over) are blinking rapidly. I've tried PixelSearch with the same results. Can anyone help me please? I know this is a noob question, but I've searched the forums and haven't found an answer.... Thanks Link to comment Share on other sites More sharing options...
Thatsgreat2345 Posted January 12, 2006 Share Posted January 12, 2006 u coudl try Global $Paused HotKeySet("{End}", "TogglePause") HotKeySet("{Home}", "Terminate") HotKeySet("{Insert}", "ShowMessage") msgbox(1, "bot", "Press [INSERT] to start. [HOME] will pause the bot. [END] quits the program.") Func TogglePause() $Paused = NOT $Paused While $Paused sleep(100) ToolTip('Script is "Paused"',0,0) WEnd ToolTip("") EndFunc Func Terminate() Exit 0 EndFunc Func ShowMessage() while 1 $coord = PixelSearch( 66, 724, 66, 724, 0x940810 ) If @error Then send("{f1}") else sleep(200) endif $coord1 = PixelSearch(26,724,26,724, 0x940810) If @error Then send("{f1}") Else sleep(200) endif wend EndFunc Link to comment Share on other sites More sharing options...
gigiiiii Posted October 22, 2019 Share Posted October 22, 2019 no work T_T Link to comment Share on other sites More sharing options...
Recommended Posts