stentorianvoice Posted February 15, 2009 Posted February 15, 2009 Hi Guys, This will probably be very simple to solve if solvable. I'm trying to send some clicks to a 3D game "Last Chaos" and the clicks do not register in the application. The mouse doesn't move either. I've noticed the mouse does move and the clicks are sent to *other windows* but just not this game window. Here's a bit of what I am working on. Any advice would be most appreciated. while 1 $coord = PixelSearch(0,0,1024,768,$BlueMob) $n = @error if $n = 1 then Sleep(1000) Else Beep(5000, 100); found enemy $notfound = 1 $clickcount = 0 While $notfound $x = Random($coord[0], $coord[0]+35, 1) ; click not the name, but the actual monster $y = Random($coord[1], $coord[1]+35, 1) Sleep(100); MouseClick("left", $x, $y, 2, 10); attack the mob $clickcount = $clickcount + 1 $test = PixelGetColor(567,43); is the health bar up? if $test = 0x4c2423 Then $notfound = 0; if yes exit loop as auto attack is set if $clickcount >= 10 Then Beep(500, 100); "couldn't click enemy" $clickcount = 0 Exitloop 1 EndIf sleep(100) WEnd sleep(10000);wait 10 seconds EndIf Wend
Manjish Posted February 15, 2009 Posted February 15, 2009 #BlueMob is not defined.. what color r u searching? [font="Garamond"]Manjish Naik[/font]Engineer, Global Services - QPSHoneywell Automation India LimitedE-mail - Manjish.Naik@honeywell.com
stentorianvoice Posted February 15, 2009 Author Posted February 15, 2009 Sorry just a snippet, $BlueMob = "0x0089AA" PixelSearch works, as I get a beep saying that something is found. When I select another window to the side of the game (in windowed mode) the mouse moves to that location correctly. But when the game window is active it doesn't move.
BrettF Posted February 15, 2009 Posted February 15, 2009 It is possible that the game has bot protection... Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version!
stentorianvoice Posted February 15, 2009 Author Posted February 15, 2009 That's what I was thinking too. No ways to get around that I wonder.
stentorianvoice Posted February 15, 2009 Author Posted February 15, 2009 Worked it out, if anyone is interested, just run the AutoiIt script with #requireadmin
Manjish Posted February 15, 2009 Posted February 15, 2009 Oh so it means that ur script needed admin right to execute.. By any chance u using Vista?? very irritating OS it is.. if u ask me.. [font="Garamond"]Manjish Naik[/font]Engineer, Global Services - QPSHoneywell Automation India LimitedE-mail - Manjish.Naik@honeywell.com
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