This is a simple code to bot for RO2
it's work for me~
but you can try to modify it to get your code also~
Code:Global $Paused HotKeySet("{PAUSE}", "TogglePause") HotKeySet("{ESC}", "Terminate") WinWaitActive("Ragnarok Online2 - Legend of The Second","") ;~ Local $pos = MouseGetPos() ;~ MsgBox(0, "Mouse x,y:", $pos[0] & "," & $pos[1]) Local $mobs Local $HP send("{TAB}") Do $mobs = PixelGetColor(688, 164) $HP = PixelGetColor(517, 164) if Not($HP == 8506130) Then send("{9}") EndIf ;~ MsgBox(0, "The decimal color is", $var) ;~ MsgBox(0, "The hex color is", Hex($var, 6)) if ($mobs == 1313537) Then send("{TAB}") Sleep(500) Send("{1}") Sleep(500) Else Send("{1}") Sleep(500) EndIf until 1=2 Func TogglePause() $Paused = Not $Paused While $Paused Sleep(100) ToolTip('Script is "Paused"', 0, 0) WEnd ToolTip("") EndFunc Func Terminate() Exit 0 EndFunc