Jump to content

game bot


Recommended Posts

hi guys im making a bot for Ran online and i was wondering if i used this script here

$window = "Ran Client" ;put window name here

$color = 0000 ;put color here

WinActivate($window)

WinWaitActive($window)

;sometimes it takes a second to activate it

$size = WinGetPos($window)

While 1

$spot = PixelSearch(0,0,$size[2],$size[3],$color) ;2 is width, 3 is height, i believe

if (@error=1) Then

MsgBox(0,"oh no","cant find color!") ;comment this line and the next out, and comment the continueloop, if you want it to just keep looping if it catn find it

Exit

;ContinueLoop

EndIf

;you might also want to move the mouse there first, it looks cooler

MouseClick("left",$spot[0],$spot[1])

WEnd

then wut do i need to add to make the bot press "Q" everytime my blood is at a specific spot

and how do i make a hotkey to start and stop the bot.

plz help

Link to comment
Share on other sites

  • Moderators

Opt('WinTitleMatchMode', 2)
Opt('PixelCoordMode', 2); Using 2 because your using client size
Opt('MouseCoordMode', 2); Using 2 because your using client size
Local $window = "Ran Client";put window name here
Local $size = WinGetPos($window)
Local $color = 0x000000;put color here
If IsArray($size) Then
    While 1
        If Not WinActive($window) Then WinActivate($window)
        $spot = PixelSearch(0, 0 , $size[2] ,$size[3] ,$color);2 is width, 3 is height, i believe
        If Not @error And IsArray($spot) Then
            MouseClick("left",$spot[0],$spot[1])
        Else
            MsgBox(0,"oh no","cant find color!")
        EndIf
        Sleep(10)
    WEnd
Else
    MsgBox(0, 'Error', 'WinGetPos Did not Return An Array')
EndIf

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

can i ask more

i want to finish this bot witout the bot maker

how do i set it so the mouse will start seacrhin for the color from the center then soread out

cuz my char is wandering off

and if i want to make the mouse click like an inch lower then where it saw the color

hope its possible

Link to comment
Share on other sites

ahh i got everything but this part

how do u make a specific check on a spot and if the cord is not the color it had b4 then u press a key

use for hp healing

nvm hehe

got it

this program rocks almost as hard as u guys

Edited by SouthVietBoiX
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...