Sign in to follow this  
Followers 0
Voidmaster

Help with a bot script

5 posts in this topic

#1 ·  Posted (edited)

I'm completely new to using AutoIt and desperately need some help. All I basically want this script to do is pixel seach, then left click the pixel when it finds it. I want it to be able to look for the first pixel, and if it can't find it, skip that and find the next one.

This is all I got so far

CODE

While 1 = 1

Find1()

Sleep(5000)

Find2()

Sleep(5000)

Find3()

WEnd

Func Find1()

PixelSearch(0, 0, 1280, 1024, 0xAA5300 [, 2] [, 2]] )

If isArray($Coords) then

MouseClick("Left",$Coords[0], $Coords[1],1,1)

EndIf

EndFunc

Func Find2()

PixelSearch(0, 0, 1280, 1024, 0xC66B00 [, 2] [, 2]] )

If isArray($Coords) then

MouseClick("Left",$Coords[0], $Coords[1],1,1)

EndIf

EndFunc

Func Find3()

PixelSearch(0, 0, 1280, 1024, 0x2FF731 [, 2] [, 2]] )

If isArray($Coords) then

MouseClick("Left",$Coords[0], $Coords[1],1,1)

EndIf

EndFunc

Func stop()

Global $show = 1

EndFunc

Any help is greatly appreciated, thanks :)

Edited by Voidmaster

Share this post


Link to post
Share on other sites



While 1 = 1
Find1()
Sleep(5000)
Find2()
Sleep(5000)
Find3()
WEnd

Func Find1()
$Coords = PixelSearch(0, 0, 1280, 1024, 0xAA5300 [, 2] [, 2]] )
If isArray($Coords) then
MouseClick("Left",$Coords[0], $Coords[1],1,1)
EndIf
EndFunc

Func Find2()
$Coords = PixelSearch(0, 0, 1280, 1024, 0xC66B00 [, 2] [, 2]] )
If isArray($Coords) then
MouseClick("Left",$Coords[0], $Coords[1],1,1)
EndIf
EndFunc


Func Find3()
$Coords = PixelSearch(0, 0, 1280, 1024, 0x2FF731 [, 2] [, 2]] )
If isArray($Coords) then
MouseClick("Left",$Coords[0], $Coords[1],1,1)
EndIf
EndFunc

Func stop()
Global $show = 1
EndFunc

You forgot to set $Coords to something

Share this post


Link to post
Share on other sites

Which game are you trying to make the bot for ? :)

Share this post


Link to post
Share on other sites

Tales of pirates. All my guy has to do is left click the monster after pixel searching for it about every 5 seconds

Share this post


Link to post
Share on other sites

hi,

how is the bot working out so far?

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