# Forum > MMO > ArcheAge > ArcheAge Bots and Programs >  Any chance of an english version of this script?

## stevenv

Been googling around and found this. I tried to copy and paste it but sadly some of the font that was from russian got messed up. I have no idea what it does but it seems like it does something cool 


[Ñêðèïò] [AutoIT] Áîò-êëèêåð íà ðää - Zhyk.Ru Forums



```
; разрешение экрана 1280х800 
; F10 запуск / остановка кача 

Opt("SendKeyDownDelay", 35) ; Глобальная задержка для удержания клавиши в нажатом состоянии 35мс 
Opt("PixelCoordMode", 2) 
Func _WinWaitActivate($title,$text,$timeout=0) 
WinWait($title,$text,$timeout) 
If Not WinActive($title,$text) Then WinActivate($title,$text) 
WinWaitActive($title,$text,$timeout) 
EndFunc 

ToolTip("started, wait aa", 0, 0) 
$COUNTER=0 
HotKeySet("{F10}","StartOrStop") ; хоткей старта и остановки если надо более одной копии скрипта запустить используйте другие клавиши 
HotKeySet("{F11}","Terminate") 
Global $STOP = True 
Global $AA_TITLE = "- ArcheAge " ; Название ОКНА клиента. Если используете мульти-окна переименовывайте их по-разному и в точности вписывайте название (лучше скопировать) 

Global $hp_color = 0x 
; В данном варианте скрипт привяжется через HWND к первому найденному окну. 
_WinWaitActivate($AA_TITLE ,"") 
Global $hWnd = WinActive($AA_TITLE ,"") 
sleep(1000) 

ToolTip("aa found!", 0, 0) 

Global $BUFF1_COUNT = TimerInit() 
Global $BUFF2_COUNT = TimerInit() 
Global $BUFF3_COUNT = TimerInit() 
Global $NeedShield = False 
Global $ShieldTryCount = 0 

Do 
Sleep(1000) 
Until $STOP = False 
While (1) 
Main() 
WEnd 

; CHECKING HP LEVEL =============================== 
Func CheckHP($xCoord, $Color) 
$y=37 
if PixelSearch($xCoord,$y,$xCoord+4,$y+4, $Color, 30, 1, $hWnd) <> 0 Then 
Return True 
Else 
Return False 
EndIf 
EndFunc 
Func hp90() 
Return CheckHP(242, 0x62983B) 
EndFunc 
Func hp75() 
Return CheckHP(191, 0x528C31) 
EndFunc 
Func hp50() 
Return CheckHP(135, 0x3E7E25) 
EndFunc 
Func hp25() 
Return CheckHP(70, 0x30741D) 
EndFunc 
; CHECKING MP LEVEL =============================== 
Func CheckMP($xCoord, $Color) 
$y=52 
if PixelSearch($xCoord,$y,$xCoord+4,$y+4, $Color, 30, 1, $hWnd) <> 0 Then 
Return True 
Else 
Return False 
EndIf 
EndFunc 
Func mp90() 
Return CheckMP(245, 0x4D76C8) 
EndFunc 
Func mp75() 
Return CheckMP(191, 0x4064C3) 
EndFunc 
Func mp50() 
Return CheckMP(135, 0x3351BC) 
EndFunc 
Func mp25() 
Return CheckMP(70, 0x304DBA) 
EndFunc 
; CHECK TARGET ================================== 
Func HaveTarget() 
; смотрим на полоску маны моба в нескольких местах 
$y = 52 
$Color = 0x304DBB 
$xCoord = 525 
$px1 = PixelSearch($xCoord,$y,$xCoord+2,$y+2, $Color, 20, 1, $hWnd) 
$xCoord = 573 
$px2 = PixelSearch($xCoord,$y,$xCoord+2,$y+2, $Color, 20, 1, $hWnd) 

if ($px1 <> 0) or ($px2 <> 0) Then 
Return True 
Else 
Return False 
EndIf 
EndFunc 
;================================================= == 
Func Main() 
If $STOP = False Then 


$df = TimerDiff($BUFF2_COUNT) 
If $df > 50000 Then 
$NeedShield = True 
$ShieldTryCount = 3 
$BUFF2_COUNT = TimerInit() 
EndIf 

; если есть цель 
If Not HaveTarget() Then 
; цели нет 
; проверим наше мп 
; если его мало запустим реген 
If (Not mp50()) Then 
While (Not mp50()) 
ControlSend($hWnd, "", "", "{0}") ; РЕГЕН МАНЫ или хп, ФЛЕЙТА 
Sleep(1600) 
$BUFF1_COUNT = TimerInit() 
WEnd 
Else 
; если же мп хватает 
; пошлем поворот чтобы найти цель 
Opt("SendKeyDownDelay", 700) 
ControlSend($hWnd, "", "", "d") 
Opt("SendKeyDownDelay", 35) 
EndIf 
EndIf 


if $NeedShield Then 
Sleep(200) 
ControlSend($hWnd, "", "", "{9}") ; Магический щит но можно оставлять слот пустым
Sleep(50) 
$ShieldTryCount = $ShieldTryCount - 1 
if ($ShieldTryCount <= 0) Then 
$NeedShield = False 
EndIf 
else 
Sleep(50) 
; только если нужно мп! 
if (Not mp75()) Then 
ControlSend($hWnd, "", "", "{8}") ; Поглощение энергии чтобы восполнять мп но можно оставлять слот пустым 
Sleep(50) 
EndIf 

ControlSend($hWnd, "", "", "{1}") ; место для скила 
Sleep(50) 
ControlSend($hWnd, "", "", "{2}") ; место для скила
Sleep(50) 
ControlSend($hWnd, "", "", "{3}") ; место для скила
Sleep(50) 
ControlSend($hWnd, "", "", "{4}") ; место для скила 
Sleep(50) 
ControlSend($hWnd, "", "", "{5}") ; место для скила
Sleep(50)
ControlSend($hWnd, "", "", "{6}") ; место для скила
Sleep(50)
ControlSend($hWnd, "", "", "{7}") ; место для скила
Sleep(50) 

ControlSend($hWnd, "", "", "f") ; Поднимаем дроп

EndIf 

Sleep(100) 

$COUNTER = $COUNTER + 1 


$text = "some" 
if hp90() Then 
$text="hp >90" 
ElseIf hp75() Then 
$text="hp >75" 
ElseIf hp50() Then 
$text="hp >50" 
ElseIf hp25() Then 
$text="hp >25" 
Else 
$text="hp LOW" 
EndIf 
if mp90() Then 
$text2="mp >90" 
ElseIf mp75() Then 
$text2="mp >75" 
ElseIf mp50() Then 
$text2="mp >50" 
ElseIf mp25() Then 
$text2="mp >25" 
Else 
$text2="mp LOW" 
EndIf 

if HaveTarget() Then 
$text3 = "YES" 
Else 
$text3 = "none" 
EndIf 


if $STOP = False Then 
ToolTip("buff2="& ($df) & " " & $text & " " & $text2 & " target=" & $text3, 0, 0) 
EndIf 

Else 
Sleep(100) 
EndIf 

EndFunc ;==>Main 

Func StartOrStop() 
If $STOP = True Then 

;On START action 
ToolTip("STARTED! Press F10 for stop", 0, 0) ; подсказка о состоянии работы скрипта в левом верхнем углу 
$STOP = False 
Else 
;On STOP action 
;ColorCheck() 
ToolTip("STOPPED! Press F10 for start", 0, 0) 
$STOP = True 
EndIf 
EndFunc 

Func Terminate() 
Exit 0 
EndFunc
```

----------


## ev0

I google translated, you'll have to clean up things



```
; screen resolution of 1280x800 
; F10 start / stop leveling 


Opt ("SendKeyDownDelay", 35); Global delay to hold down the key 35ms 
Opt ("PixelCoordMode", 2) 
Func _WinWaitActivate ($ title, $ text, $ timeout = 0) 
WinWait ($ title, $ text, $ timeout) 
If Not WinActive ($ title, $ text) Then WinActivate ($ title, $ text) 
WinWaitActive ($ title, $ text, $ timeout) 
EndFunc 


ToolTip ("started, wait aa", 0, 0) 
$ COUNTER = 0 
HotKeySet ("{F10}", "StartOrStop"); hotkey start and stop if you need more than one copy of the script to run, use the other keys 
HotKeySet ("{F11}", "Terminate") 
Global $ STOP = True 
Global $ AA_TITLE = "- ArcheAge"; Name of the client window. If you are using multi-window rename them differently and include your name exactly (better copy) 


Global $ hp_color = 0x 
; In this embodiment, the script will bind through HWND to the first found the window. 
_WinWaitActivate ($ AA_TITLE, "") 
Global $ hWnd = WinActive ($ AA_TITLE, "") 
sleep (1000) 


ToolTip ("aa found!", 0, 0) 


Global $ BUFF1_COUNT = TimerInit () 
Global $ BUFF2_COUNT = TimerInit () 
Global $ BUFF3_COUNT = TimerInit () 
Global $ NeedShield = False 
Global $ ShieldTryCount = 0 


Do 
Sleep (1000) 
Until $ STOP = False 
While (1) 
Main () 
WEnd 


; CHECKING HP LEVEL =============================== 
Func CheckHP ($ xCoord, $ Color) 
$ y = 37 
if PixelSearch ($ xCoord, $ y, $ xCoord + 4, $ y + 4, $ Color, 30, 1, $ hWnd) <> 0 Then 
Return True 
Else 
Return False 
EndIf 
EndFunc 
Func hp90 () 
Return CheckHP (242, 0x62983B) 
EndFunc 
Func hp75 () 
Return CheckHP (191, 0x528C31) 
EndFunc 
Func hp50 () 
Return CheckHP (135, 0x3E7E25) 
EndFunc 
Func hp25 () 
Return CheckHP (70, 0x30741D) 
EndFunc 
; CHECKING MP LEVEL =============================== 
Func CheckMP ($ xCoord, $ Color) 
$ y = 52 
if PixelSearch ($ xCoord, $ y, $ xCoord + 4, $ y + 4, $ Color, 30, 1, $ hWnd) <> 0 Then 
Return True 
Else 
Return False 
EndIf 
EndFunc 
Func mp90 () 
Return CheckMP (245, 0x4D76C8) 
EndFunc 
Func mp75 () 
Return CheckMP (191, 0x4064C3) 
EndFunc 
Func mp50 () 
Return CheckMP (135, 0x3351BC) 
EndFunc 
Func mp25 () 
Return CheckMP (70, 0x304DBA) 
EndFunc 
; CHECK TARGET ================================== 
Func HaveTarget () 
; look at the mana bars mob in several places 
$ y = 52 
$ Color = 0x304DBB 
$ xCoord = 525 
$ px1 = PixelSearch ($ xCoord, $ y, $ xCoord + 2, $ y + 2, $ Color, 20, 1, $ hWnd) 
$ xCoord = 573 
$ px2 = PixelSearch ($ xCoord, $ y, $ xCoord + 2, $ y + 2, $ Color, 20, 1, $ hWnd) 


if ($ px1 <> 0) or ($ px2 <> 0) Then 
Return True 
Else 
Return False 
EndIf 
EndFunc 
; ================================================= == 
Func Main () 
If $ STOP = False Then 




$ df = TimerDiff ($ BUFF2_COUNT) 
If $ df> 50000 Then 
$ NeedShield = True 
$ ShieldTryCount = 3 
$ BUFF2_COUNT = TimerInit () 
EndIf 


; if there is objective 
If Not HaveTarget () Then 
; no purpose 
; check our MP 
; if it is a little run regen 
If (Not mp50 ()) Then 
While (Not mp50 ()) 
ControlSend ($ hWnd, "", "", "{0}"); REGEN Mana or xn FLUTE 
Sleep (1600) 
$ BUFF1_COUNT = TimerInit () 
WEnd 
Else 
; if enough MP 
; send turn to find the target 
Opt ("SendKeyDownDelay", 700) 
ControlSend ($ hWnd, "", "", "d") 
Opt ("SendKeyDownDelay", 35) 
EndIf 
EndIf 




if $ NeedShield Then 
Sleep (200) 
ControlSend ($ hWnd, "", "", "{9}"); Magic shield but you can leave the empty slot 
Sleep (50) 
$ ShieldTryCount = $ ShieldTryCount - 1 
if ($ ShieldTryCount <= 0) Then 
$ NeedShield = False 
EndIf 
else 
Sleep (50) 
; Only if you want to MP! 
if (Not mp75 ()) Then 
ControlSend ($ hWnd, "", "", "{8}"); The absorption of energy to make up for MP but you can leave the slot empty 
Sleep (50) 
EndIf 


ControlSend ($ hWnd, "", "", "{1}"); place for skill 
Sleep (50) 
ControlSend ($ hWnd, "", "", "{2}"); place for skill 
Sleep (50) 
ControlSend ($ hWnd, "", "", "{3}"); place for skill 
Sleep (50) 
ControlSend ($ hWnd, "", "", "{4}"); place for skill 
Sleep (50) 
ControlSend ($ hWnd, "", "", "{5}"); place for skill 
Sleep (50) 
ControlSend ($ hWnd, "", "", "{6}"); place for skill 
Sleep (50) 
ControlSend ($ hWnd, "", "", "{7}"); place for skill 
Sleep (50) 


ControlSend ($ hWnd, "", "", "f"); raise the drop 


EndIf 


Sleep (100) 


$ COUNTER = $ COUNTER + 1 




$ text = "some" 
if hp90 () Then 
$ text = "hp> 90" 
ElseIf hp75 () Then 
$ text = "hp> 75" 
ElseIf hp50 () Then 
$ text = "hp> 50" 
ElseIf hp25 () Then 
$ text = "hp> 25" 
Else 
$ text = "hp LOW" 
EndIf 
if mp90 () Then 
$ text2 = "mp> 90" 
ElseIf mp75 () Then 
$ text2 = "mp> 75" 
ElseIf mp50 () Then 
$ text2 = "mp> 50" 
ElseIf mp25 () Then 
$ text2 = "mp> 25" 
Else 
$ text2 = "mp LOW" 
EndIf 


if HaveTarget () Then 
$ text3 = "YES" 
Else 
$ text3 = "none" 
EndIf 




if $ STOP = False Then 
ToolTip ("buff2 =" & ($ df) & "" & $ text & "" & $ text2 & "target =" & $ text3, 0, 0) 
EndIf 


Else 
Sleep (100) 
EndIf 


EndFunc; ==> Main 


Func StartOrStop () 
If $ STOP = True Then 


; On START action 
ToolTip ("STARTED! Press F10 for stop", 0, 0); clue about the state of the script in the upper left corner 
$ STOP = False 
Else 
; On STOP action 
; ColorCheck () 
ToolTip ("STOPPED! Press F10 for start", 0, 0) 
$ STOP = True 
EndIf 
EndFunc 


Func Terminate () 
Exit 0 
EndFunc
```

----------


## insomniac420

That's just super simple easy Autoit syntax script for pixel detecting. That's like 5-10 minutes of code writing super simple.

----------


## TehMorbid

> That's just super simple easy Autoit syntax script for pixel detecting. That's like 5-10 minutes of code writing super simple.


Got it working. I'm the ubernoob when it comes to coding.

----------


## archlord12345

cool thx for it

----------


## psyphander

> Got it working. I'm the ubernoob when it comes to coding.


is there anyway that you can create a script for me that can target mobs and attck them , a mob farming scriipt? i have tried and failed multiple times its just not for me. for Archeage that is

----------

