Sign in to follow this  
Followers 0
skipperpoop

Auto-potion bot for Conquer Online

2 posts in this topic

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

Share this post


Link to post
Share on other sites



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

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0