Sign in to follow this  
Followers 0
lee90

Help with Auto-pot Bot

6 posts in this topic

I'm trying to make an auto-pot bot .. the bot will help me to click and to drink pot when the hp is low at certain point..

i have created 2 scripts;

a)auto click bot

b)auto pot bot,

however, i have no idea how to combine it together to make it works :)

Auto click Bot

Do
    $pass = InputBox ("Password", "Please enter your password","","*",180,150)
    If $pass <> "1234" Then
        MsgBox (0,"Warning" , "Password Invalid" & @CRLF & "")
    EndIf
Until $pass == "1234"

MsgBox (0,"Credit" , "Created by lee90 aka 老人一个 (BETA)")
WinActivate("xxx.exe", "")
WinMove("xxx.exe", "", 0, 0)
Global $UnPaused 
HotKeySet("{F4}", "TogglePause") 
HotKeySet("{ESC}", "Terminate") 

While 1 
    Sleep(100) 
    ToolTip("Press F4 to start..        Esc to quit..",0,0) 
WEnd 

Func TogglePause() 
    $UnPaused = NOT $UnPaused 
    While $UnPaused 
        ToolTip("Press F4 to Pause     Credit: lee90 aka xxx",0,0) 
        AutoItSetOption ("MouseClickDelay",100)
        MouseClick ( "left" , 320, 433 , 1 , 0 )
MouseClick ( "left" , 186, 164, 1 , 0 )
MouseClick ( "left" , 186, 460 , 1 , 0 )
MouseClick ( "left" , 740, 154 , 1 , 0 )
MouseClick ( "left" , 465, 154 , 1 , 0 )
MouseClick ( "left" , 203, 333 , 1 , 0 )
MouseClick ( "left" , 205, 343 , 1 , 0 )

      Sleep(100) 
    WEnd 
EndFunc 

Func Terminate() 
    Exit 0 
EndFunc

Auto pot Bot

Do
$coord = PixelSearch (118, 47, 120, 49, 0x083042, 1, 1)
If Not @error then 
    MouseClick("right", 38, 64, 1, 0)
EndIf
Until ProcessClose ("xxx.exe")=True

Can anyone help me to combine this 2 bot together? Thank You.

Share this post


Link to post
Share on other sites



If you make it a function, you could call it every While-loop.

Func pixsearch()

<copy-paste code here> WITHOUT Do-Until!!

EndFunc

And type after Sleep(100): "pixsearch()"

Then every loop you execute that pixelsearch function.


My active project(s): A-maze-ing generator (generates a maze)

My archived project(s): Pong3 (Multi-pinger)

Share this post


Link to post
Share on other sites

I still dont understand :)

Can u help me to combine it? Hehe

Share this post


Link to post
Share on other sites

In your code you know to make functions.

so:

Func searchpix()
   $coord = PixelSearch (118, 47, 120, 49, 0x083042, 1, 1)
   If Not @error then 
       MouseClick("right", 38, 64, 1, 0)
   EndIf
EndFunc

Paste this code below all other code.

Then past "searchpix()" above "Sleep(100)".

This will make the script search the pixel every 100ms.


My active project(s): A-maze-ing generator (generates a maze)

My archived project(s): Pong3 (Multi-pinger)

Share this post


Link to post
Share on other sites

tried, but it keeps on helping me to drink pot even though my hp is full =o=

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