Pyrex Posted April 28, 2008 Posted April 28, 2008 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
GunsAndRoses Posted April 28, 2008 Posted April 28, 2008 (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 April 28, 2008 by GunsAndRoses
AdmiralAlkex Posted April 28, 2008 Posted April 28, 2008 Open the helpfile and read about things like PixelSearch() MouseClick() or ControlClick() While...WEnd .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface
Pyrex Posted April 28, 2008 Author Posted April 28, 2008 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?
GunsAndRoses Posted April 28, 2008 Posted April 28, 2008 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
everseeker Posted April 28, 2008 Posted April 28, 2008 (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 April 28, 2008 by everseeker Everseeker
GunsAndRoses Posted April 28, 2008 Posted April 28, 2008 (edited) For Ommiting a parameter you must use: "" or -1 (I think, maybe im wrong) Edited April 28, 2008 by GunsAndRoses
Pyrex Posted April 28, 2008 Author Posted April 28, 2008 (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 April 28, 2008 by Pyrex
GunsAndRoses Posted April 28, 2008 Posted April 28, 2008 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.
Pyrex Posted April 28, 2008 Author Posted April 28, 2008 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?
GunsAndRoses Posted April 28, 2008 Posted April 28, 2008 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
Pyrex Posted April 28, 2008 Author Posted April 28, 2008 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
GunsAndRoses Posted April 28, 2008 Posted April 28, 2008 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
Pyrex Posted April 28, 2008 Author Posted April 28, 2008 Ok thanks that worked. Now for the $coord = PixelSearch( 0, 0, 20, 300, 0xFF0000 ) What are the 0, 0, 20, 300, for?
Pain Posted April 29, 2008 Posted April 29, 2008 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.
Pyrex Posted April 29, 2008 Author Posted April 29, 2008 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?
Pain Posted April 29, 2008 Posted April 29, 2008 set the pixels (left, top, right, bottom) you can get them with AutoIt Window Info Tool
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now