Sign in to follow this  
Followers 0
Pyrex

MU Online bot

18 posts in this topic

Hey I was wondering how to make an MU online bot? It's a mmorpg game. I just want the mouse to double click on a certain colour and keep clicking even if it misses. That should be a perfect bot. Thanks

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

PixelSearch

Edited by Pain

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

Well some functions you might want are as follows:

PixelSearch()

MouseClick()

@Error (Macro)

And then do something like this: (Non-working, an example)

While 1
$Co = PixelSearch($x, $y, $x, $, 0x00000) (Use the actual parameters)
If Not @error then
MouseClick("left", $Co[0], $Co[1], 5, 1)
Else
MouseClick("left")
Endif
WEnd
Edited by GunsAndRoses

Share this post


Link to post
Share on other sites

Ok I just made a script!

CODE
$coord = PixelSearch( 0, 0, 20, 300, 0xFF0000 )

MouseClick("left")

MouseClick("left")

Doesn't work, but do I need to be in-game for it to work or?

Share this post


Link to post
Share on other sites

I doubt that'll work.

Try this:

While 1
$coord = PixelSearch( 0, 0, 20, 300, 0xFF0000 )
If IsArray($Coord) Then
MouseClick("left", $coord[0], $coord[1])
Else
MouseClick("left")
EndIf
WEnd

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

I doubt that'll work.

Try this:

While 1
$coord = PixelSearch( 0, 0, 20, 300, 0xFF0000 )
If IsArray($Coord) Then
MouseClick("left", $coord[0], $coord[1],2)
Else
MouseClick("left",,,2)
EndIf
WEnd

Added a ,2 because he wanted to doubleclick

(does that last line work? Is that the correct convention for ommitting a parameter?)

Edited by everseeker

Everseeker

Share this post


Link to post
Share on other sites

#8 ·  Posted (edited)

For Ommiting a parameter you must use: "" or -1

(I think, maybe im wrong)

Edited by GunsAndRoses

Share this post


Link to post
Share on other sites

#9 ·  Posted (edited)

While 1
$coord = PixelSearch( 0, 0, 20, 300, 0xFF0000 )
If IsArray($Coord) Then
MouseClick("left", $coord[0], $coord[1],2)
Else
MouseClick("left",,,2)
EndIf
WEnd

Actually, is there a way I can get a specific colour from the game? Cause that colour is normal red.

Also, how do I get the bot to work if my game is maximized?

And will it be able to get around GameGuard? Or is there a way to start it up after GameGuard has loaded?

Edited by Pyrex

Share this post


Link to post
Share on other sites

While 1
$coord = PixelSearch( 0, 0, 20, 300, 0xFF0000 )
If IsArray($Coord) Then
MouseClick("left", $coord[0], $coord[1],2)
Else
MouseClick("left",,,2)
EndIf
WEnd

Actually, is there a way I can get a specific colour from the game? Cause that colour is normal red.

Also, how do I get the bot to work if my game is maximized?

And will it be able to get around GameGuard? Or is there a way to start it up after GameGuard has loaded?

PixelGetColor() Will retrieve the color of a mouse point.

Depends if it can get past game guard. Maybe.

Share this post


Link to post
Share on other sites

PixelGetColor() Will retrieve the color of a mouse point.

Depends if it can get past game guard. Maybe.

Ok, well I had a look at the pixelgetcolor but how do I find out the coordinates of the color I want to get the # number of?

Share this post


Link to post
Share on other sites

Use this. Just put your mouse over the color, and press home.

HotKeySet("{HOME}", "GetColor")
While 1
WEnd

Func GetColor()
$Pos= MouseGetPos()
$Clr = PixelGetColor($Pos[0], $Pos[1]
Msgbox(0, "", $Clr)
ClipPut($Clr)
EndFunc

Share this post


Link to post
Share on other sites

Use this. Just put your mouse over the color, and press home.

HotKeySet("{HOME}", "GetColor")
While 1
WEnd

Func GetColor()
$Pos= MouseGetPos()
$Clr = PixelGetColor($Pos[0], $Pos[1]
Msgbox(0, "", $Clr)
ClipPut($Clr)
EndFunc
On the bottom of autoit I just get this message when I press home.

>"C:\Program Files\AutoIt3\SciTE\..\autoit3.exe" /ErrorStdOut "C:\Documents and Settings\Dick\Desktop\Autoit\color.au3" 
C:\Documents and Settings\Dick\Desktop\Autoit\color.au3 (7) : ==> Error parsing function call.: 
$Clr = PixelGetColor($Pos[0], $Pos[1] 
$Clr = PixelGetColor($Pos[0], $Pos[1^ ERROR
>Exit code: 1   Time: 2.928

Share this post


Link to post
Share on other sites

Oops, forgot a ) after it.

HotKeySet("{HOME}", "GetColor")
While 1
WEnd

Func GetColor()
$Pos= MouseGetPos()
$Clr = PixelGetColor($Pos[0], $Pos[1])
Msgbox(0, "", $Clr)
ClipPut($Clr)
EndFunc

Sorry :D

Share this post


Link to post
Share on other sites

Ok thanks that worked.

Now for the

$coord = PixelSearch( 0, 0, 20, 300, 0xFF0000 )

What are the 0, 0, 20, 300, for?

Share this post


Link to post
Share on other sites

form the helpfile

PixelSearch ( left, top, right, bottom, color [, shade-variation] [, step]] )

0=left coordinate of rectangle.

0=top coordinate of rectangle.

20=right coordinate of rectangle.

300=bottom coordinate of rectangle.

0xFF0000=color it should search for.

the rectangle is where it should search.

Share this post


Link to post
Share on other sites

form the helpfile

PixelSearch ( left, top, right, bottom, color [, shade-variation] [, step]] )

0=left coordinate of rectangle.

0=top coordinate of rectangle.

20=right coordinate of rectangle.

300=bottom coordinate of rectangle.

0xFF0000=color it should search for.

the rectangle is where it should search.

How do I get it to search within my monitor?

Share this post


Link to post
Share on other sites

set the pixels (left, top, right, bottom)

you can get them with AutoIt Window Info Tool

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