# Forum > MMO > ArcheAge > ArcheAge Bots and Programs > [Auto-Clicker] Rotating attack (autoit)

## patatjegroot

adjust the 7`s to the keys you want to click.
just add or delete the lines that are not enough or too many for you.
if you`re melee, better use the first for an arrow and let the mob come close if you have a nice spot between mobs.
(that`s why i`ve added a 5 second delay to make it come close enough, but change it to whatever you like)
jumping attacks can also move you too fast from your spot.
script starts automaticly on pause, so you have to press pause button to start.
also adjust the random time between "Left" cursor click for shorter or longer rotations.
i only seen autoit for a week or something and took some lines from everywhere.
no not from the other topic with a similar script without randoms.
actualy was already busy with it a couple of days, also with pixelsearch and running around, but pixelsearch doesn`t work in minimized and making it run around it wanders way off  :Big Grin: 

too bad it couldn`t find the yellow pixel around the mobs nameplate good enough, otherwise a maximized version could be more effective using tab and pixelsearch.
was using it also for something else but to make the story not too long if it isn`t already  :Big Grin: 
edit; something causing some issues so for me personly i remove the pause thing. think that`s not done right  :Big Grin: 
removed it in my own, but still same issue.
so there`s something making mouse not react sometimes when its minimized and also something else weird.
i dont know i`m a noob



```
#RequireAdmin

Global $g_bPaused = False
HotKeySet("{PAUSE}", "TogglePause")  ;start/pause
HotKeySet("{ESC}", "Terminate")      ;close 
Dim $a

If WinActive("[CLASS:ArcheAge]") Then
$a
Else
TogglePause()
EndIf

While 1
$a

$title = WinGetTitle("[CLASS:ArcheAge]", "")
ControlSend($title, "", "", "{TAB}")
Sleep(Random(250,350,1))


    $title = WinGetTitle("[CLASS:ArcheAge]", "")
  ControlSend($title, "", "", "{7}")        ; use arrow skill for melee
    Sleep(Random(600,825,1))
  ControlSend($title, "", "", "{7}")
    Sleep(Random(575,850,1))
  ControlSend($title, "", "", "{7}")
    Sleep(Random(600,950,1))
  ControlSend($title, "", "", "{7}")
    Sleep(Random(600,900,1))


    ControlSend($title, "", "", "{7}")
    Sleep(Random(600,850,1))
  
    ControlSend($title, "", "", "{7}")
    Sleep(Random(600,850,1))
  
    ControlSend($title, "", "", "{7}")
    Sleep(Random(600,850,1))
  
    ControlSend($title, "", "", "{7}")
    Sleep(Random(600,850,1))
  
    ControlSend($title, "", "", "{7}")
    Sleep(Random(600,850,1))
  
    ControlSend($title, "", "", "{7}")
    Sleep(Random(600,850,1))
  
    ControlSend($title, "", "", "{7}")
    Sleep(Random(600,850,1))
  
    ControlSend($title, "", "", "{7}")
    Sleep(Random(600,850,1))
  
    ControlSend($title, "", "", "{7}")
    Sleep(Random(600,850,1))
  
    ControlSend($title, "", "", "{7}")
    Sleep(Random(600,850,1))
  
    ControlSend($title, "", "", "{7}")
    Sleep(Random(600,850,1))

    ControlSend($title, "", "", "{7}")
    Sleep(Random(600,850,1))

    ControlSend($title, "", "", "{7}")
    Sleep(Random(600,850,1))

    ControlSend($title, "", "", "{7}")
    Sleep(Random(600,850,1))

  ControlSend($title, "", "", "{7}")
    Sleep(Random(600,850,1))
  
  ControlSend($title, "", "", "{f}")
    Sleep(Random(600,850,1))
  
  ControlSend($title, "", "", "{f}")
    Sleep(Random(1000,1250,1))

ControlSend($title, "", "", "{LEFT down}")
Sleep(Random(500,1000,1))
ControlSend($title, "", "", "{LEFT up}")
WEnd

Func loop()
$a
EndFunc

Func TogglePause()
    $g_bPaused = Not $g_bPaused
    While $g_bPaused
        Sleep(100)
        ToolTip('"Paused"', 0, 0)
    WEnd
    ToolTip("")
EndFunc   

Func Terminate()
    Exit
EndFunc
```

if you don`t want it to rotate delete the Left down Left up part.
it will give more loot though.

----------


## AutoScript

Nice work with the ControlSend comand and the turning bot. I thought of a rewrite on my scrip... glad you did this.

----------


## patatjegroot

thanks.
i see i made a typo in the first sleep  :Big Grin: 
so i don`t know if anyone tried to use it ;p
it had a sleep 71000,8000
supposed to be 7000,8000. so it`s changed now.
no clue how that 1 got there  :Big Grin: 

nvm, deleted that part and replaced with optional arrow shots instead of waiting.

too bad i don`t know how to count errors, otherwise it can be made with walking around i think.
so it would turn around after 5 pixelsearch errors for example.
can make it tab and pixelsearch on a ranged skill to look if anything is in the neighbourhood.
if else turn around and make it walk back longer then it took to make the 5 errors and you should be somewhere near the last mob attacked.
but that`s theory ;p
attacks can turn around your char also, but it will still return you to the last mob place.
but i think it walk a wrong direction eventualy, can`t test yet.
maybe someday, but cant promise.

managed to do it , but it`s not very more efficient than just standing still.
with some risks it will still get into a empty spot and walk around or get stuck.
and also showing too obvious botting behaviour.
so that`s a no go for now.

----------


## AutoScript

Well you could have a x, y cord and have the bot stay within so many meters of the starting location. Or just a simple memory reader showing cord will work. Would probably need to switch scrip language though. I think that just a simple GUI for killing a spawn location should not be to hard to do. Ill do some checking.

----------


## patatjegroot

that would be so nice with coordinates  :Big Grin: 
but isn`t it detectable ? by trion or whoever looks at exploits i mean.
i`m even more noob at c+  :Big Grin:  , like total noob  :Big Grin: 
but maybe, sometime hehe.
only the bannable thing worries me.
o yes and needs hackshield bypass.
that`s a bit too much for me  :Big Grin:  haha

was busy (for hours) with rotate and pixelsearch in ahk, but don`t know how to send keys in ahk to background screens.
and in autoit i don`t know how to use variables right so that it adds +1 to an error.
also the goto thing i miss in autoit. the +1 in ahk is easier for me and pixelsearch.
only need background sends.
then i just put the ranged skill pixel detect outside of the screen.
and you can do anything you want ;p
it`s basicly pixelsearch in a hidden window ;p




```
Global $error2 = 2
Global  $error0 = 0

$e1
While 1
$error0 += 1
if $error0 > $error2 then
$0
Else
$1
EndIf
Wend
```

i don`t get what`s wrong there ;p
needs to count error in autoit and if it gets bigger then 2 go to next thingy

----------

