Jump to content

help plz


1hit
 Share

Recommended Posts

ok im making a bot that searches for the colors that i put in and it moves the mouse to it and clicks on it

but now i want to add something where it finds it and moves the mouse over it and then checks to see if the mouse cursor changed(when you put the mouse cursor over a monster it changes into a sword)

so is there a way to do this?

this is my script if it helps:

; Script Start - Add your code below here
Dim $Color_One = 0xE1B196;monster color 
Dim $Color_Two = 0x98512D;monster color
Dim $Color1_tolerance = 12 
Dim $Color2_tolerance = 14
Opt("MouseCoordMode", 0); Read the help file for "Opt" to see if you need to keep the '2' a '2', '1', or '0'
Opt("PixelCoordMode", 0); Read the help file for "Opt" to see if you need to keep the '2' a '2', '1', or '0'
Hotkeyset("{HOME}","start")
Hotkeyset("{END}","stop")

Global $stop

Func start()
WinActivate ( 'SRO_Client' )
Sleep ( 300 )
$stop = NOT $stop
While $stop
; Script Start - Add your code below here

$PxSrch_One = PixelSearch(288,281,669,553, $Color_One, $Color1_tolerance, 2)
$PxSrch_Three = PixelSearch(288,281,669,553, $Color_Two, $Color2_tolerance, 2)
If Not @error And IsArray($PxSrch_One) Then
Sleep(100)
MouseClick("left", $coord[0],$coord[1],1, 0)
Sleep(75)
Send("1")
Sleep(75)
Send("1")
Sleep(400)
EndIf
WEnd
EndFunc

Func stop()
Exit
EndFunc

While 1
Sleep(50)
WEnd
Link to comment
Share on other sites

Try using "MouseGetCursor ( )", or if that does not work[very likely], try testing out whether the mouse is a bitmap.

If it is, use "PixelGetColor ( x , y )" to get the color of the pixel.

If the mouse is not a bitmap, i can't think of anything to help.

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...