Jump to content

Recommended Posts

Posted

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
Posted

#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
Posted

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.

Posted

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

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
×
×
  • Create New...