# Forum > MMO > ArcheAge > ArcheAge Bots and Programs > [Bot] Razzor's BOT

## razzor2008

Hello !

First, I want to apologize in advance for my bad english.

Here is my first bot i've just made. *I've just finished to learn Autoit scripting and this is my first try.*

Actually, It's a really basic script made in 3 hours but I want to upgrade it as more as I can.

I also want to add, that a part of this script is not mine, the "Pause" function is from Elzie's bot at his begining.



```
#cs ----------------------------------------------------------------------------

 AutoIt Version : 3.3.12.0
 Auteur:         Razzor2008

 Fonction du Script :
	Modèle de Script AutoIt.

#ce ----------------------------------------------------------------------------

;==================================================================
;========================   INCLUDES   ============================
;==================================================================

#RequireAdmin
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>

;==================================================================
;==========================  GUI  =================================
;==================================================================

#Region ### START Koda GUI section ### Form=
Global $Form1 = GUICreate("MyB", 383, 210, 192, 124)
Global $Button1 = GUICtrlCreateButton("Start BOT", 144, 72, 99, 41)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

;==================================================================
;========================  VARIABLES  =============================
;==================================================================

HotKeySet ("^q","quit") ;If Ctrl+Q, close the bot
HotKeySet ("^p","pause") ; If Ctrl+P, pause the bot
Global $quit = False
Global $pause = False


;==================================================================
;========================     CODE    =============================
;==================================================================


While Not $quit
 $nMsg = GUIGetMsg()
	Switch $nMsg
		Case $GUI_EVENT_CLOSE
		Exit

		Case $Button1 ; Bot start
			Sleep(5000)
			combat()
 EndSwitch
WEnd


;==================================================================
;========================  FONCTIONS  =============================
;==================================================================



Func combat()
	Local $hWnd = WinWait("[CLASS:ArcheAge]", "", 3) ; handle of AA window
Do
		If $hWnd = True Then
			ControlSend ($hWnd, "[CLASS:ArcheAge]", "", "{TAB}f") ;start fighting and looting at the same time
			Sleep(2000)
			ControlSend ($hWnd, "[CLASS:ArcheAge]", "", "&f")
			Sleep(5000)
			ControlSend ($hWnd, "[CLASS:ArcheAge]", "", "éf")
			Sleep(2000)
			ControlSend ($hWnd, "[CLASS:ArcheAge]", "", "éf")
			Sleep(2000)
			ControlSend ($hWnd, "[CLASS:ArcheAge]", "", "éf")
			Sleep(2000)
			ControlSend ($hWnd, "[CLASS:ArcheAge]", "", "f") ;end of the cycle
			search()
		EndIf
	Until $pause = True

EndFunc

Func search() ; function research mobs
		Local $hWnd = WinWait("[CLASS:ArcheAge]", "", 3)
		Opt("SendKeyDownDelay", 1250)
		ControlSend ($hWnd, "[CLASS:ArcheAge]", "", "e")
		Opt("SendKeyDownDelay", 5)
EndFunc

Func quit() ; function stop the bot
        $quit = True
		MsgBox(0,"Closing","Good-Bye")
		GUISetState(@SW_SHOW)
		Exit
EndFunc

Func pause() ; function pause the bot
        $Pause = NOT $Pause
        While $Pause
        ToolTip("Paused")
        sleep(100)
	  WEnd
        ToolTip("")

EndFunc
```

----------

