#region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_icon=..\WoW_ico_64x64\Trade_Engineering.ico
#AutoIt3Wrapper_Res_Comment=Lazy Bot Relogger
#AutoIt3Wrapper_Res_Fileversion=1.0.0.0
#AutoIt3Wrapper_Res_Language=1049
#endregion ;**** Directives created by AutoIt3Wrapper_GUI ****
AutoItSetOption("WinTitleMatchMode", 4)
;AutoItSetOption("ExpandVarStrings", 0)
AutoItSetOption("SendKeyDelay", 20)
AutoItSetOption("SendKeyDownDelay", 20)
#include <GUIConstants.au3>
#include <EditConstants.au3>
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
Opt("GUIOnEventMode", 1)
$settings_ini = @ScriptDir & "\Settings.ini"
$char_ini = IniRead($settings_ini, "", "$char", "Персонаж")
#region Главное окно
$mainwindow = GUICreate($char_ini, 170, 215)
$settings = GUICtrlCreateButton("Настройки", 10, 155, 70)
$login = GUICtrlCreateButton("Логин", 10, 185, 70)
$relogger = GUICtrlCreateButton("Релоггер", 90, 185, 70)
$list = GUICtrlCreateList("", 2, 2, 166, 150)
$clicker = GUICtrlCreateButton("Кликер", 90, 155, 70)
GUICtrlSetOnEvent($login, "Login")
GUICtrlSetOnEvent($relogger, "Relogger")
GUICtrlSetOnEvent($settings, "Settings")
GUICtrlSetOnEvent($clicker, "Clicker")
GUISetOnEvent($GUI_EVENT_CLOSE, "Exiting")
GUISetState(@SW_SHOW, $mainwindow)
#endregion Главное окно
#region Настройки
$setwindow = GUICreate("Настройки", 260, 300)
$acc_ini = IniRead($settings_ini, "", "$acc", "Логин")
$pass_ini = IniRead($settings_ini, "", "$pass", "Пароль")
$char_ini = IniRead($settings_ini, "", "$char", "Персонаж")
$bnet_ini = IniRead($settings_ini, "", "$bnet", "")
$wowpath_ini = IniRead($settings_ini, "", "$browse_wow", "Путь к WoW")
$botpath_ini = IniRead($settings_ini, "", "$browse_bot", "Путь к Боту")
$bnet_nini = IniRead($settings_ini, "", "$bnet_n", "")
$lvl_ini = IniRead($settings_ini, "", "$lvl", "lvl")
$acc_input = GUICtrlCreateInput($acc_ini, 20, 20, 200, 20)
$pass_input = GUICtrlCreateInput($pass_ini, 20, 50, 200, 20, $ES_PASSWORD)
$wowpath = GUICtrlCreateInput($wowpath_ini, 20, 100, 200, 20)
$browse_button1 = GUICtrlCreateButton("...", 230, 100, 20, 20)
$botpath = GUICtrlCreateInput($botpath_ini, 20, 130, 200, 20)
$browse_button2 = GUICtrlCreateButton("...", 230, 130, 20, 20)
$char_input = GUICtrlCreateInput($char_ini, 20, 180, 120, 20)
$bnet_check = GUICtrlCreateCheckbox("Battlenet", 20, 220)
$bnet_ncheck = GUICtrlCreateCombo("", 100, 220, 40, 20)
$save = GUICtrlCreateButton("Сохранить", 140, 260, 80, 20)
GUICtrlSetData(16, "1|2|3|4|5", $bnet_nini)
$lvl_input = GUICtrlCreateInput($lvl_ini, 170, 180, 50, 20)
GUICtrlSetState(15, $bnet_ini)
GUISetOnEvent($GUI_EVENT_CLOSE, "Exiting")
GUICtrlSetOnEvent($browse_button1, "WoW_path")
GUICtrlSetOnEvent($browse_button2, "Bot_path")
GUICtrlSetOnEvent($save, "Save")
#endregion Настройки
#region Кликер
$clickwindow = GUICreate("Кликер", 141, 70, 258, 130)
$key = GUICtrlCreateInput("Кнопка", 10, 8, 50, 20)
$deley = GUICtrlCreateInput("Таймаут", 80, 8, 50, 20)
$start = GUICtrlCreateButton("Старт", 10, 40, 50, 20, $WS_GROUP)
$stop = GUICtrlCreateButton("Стоп", 80, 40, 50, 20, $WS_GROUP)
GUISetOnEvent($GUI_EVENT_CLOSE, "Exiting")
#endregion Кликер
#region Переменные
$acc = GUICtrlRead($acc_input)
$pass = GUICtrlRead($pass_input)
$char = GUICtrlRead($char_input)
$bnet = GUICtrlRead($bnet_check)
$browse_wow = GUICtrlRead($wowpath)
$browse_bot = GUICtrlRead($botpath)
$bnet_n = GUICtrlRead($bnet_ncheck)
$lvl = GUICtrlRead($lvl_input)
$winname = $acc
$str = StringLen($char)
$str2 = StringLeft($char, $str - 2)
$id = $str2 & " - " & $lvl
#endregion Переменные
Func WoW_path()
$browse_wow = FileOpenDialog("Open", "C:\", "(*.exe)", 1)
GUICtrlDelete($wowpath)
$path_input = GUICtrlCreateInput($browse_wow, 20, 100, 200, 20)
EndFunc ;==>WoW_path
Func Bot_path()
$browse_bot = FileOpenDialog("Open", "C:\", "(*.exe)", 1)
GUICtrlDelete($botpath)
$path_input = GUICtrlCreateInput($browse_bot, 20, 130, 200, 20)
EndFunc ;==>Bot_path
Func Save()
$acc = GUICtrlRead($acc_input)
$pass = GUICtrlRead($pass_input)
$char = GUICtrlRead($char_input)
$bnet = GUICtrlRead($bnet_check)
$browse_wow = GUICtrlRead($wowpath)
$browse_bot = GUICtrlRead($botpath)
$bnet_n = GUICtrlRead($bnet_ncheck)
$lvl = GUICtrlRead($lvl_input)
$winname = $acc
IniWrite($settings_ini, "", "$acc", $acc)
IniWrite($settings_ini, "", "$pass", $pass)
IniWrite($settings_ini, "", "$char", $char)
IniWrite($settings_ini, "", "$bnet", $bnet)
IniWrite($settings_ini, "", "$browse_wow", $browse_wow)
IniWrite($settings_ini, "", "$browse_bot", $browse_bot)
IniWrite($settings_ini, "", "$bnet_n", $bnet_n)
IniWrite($settings_ini, "", "$lvl", $lvl)
GUISetState(@SW_HIDE, $setwindow)
EndFunc ;==>Save
Func Settings()
GUISwitch($setwindow)
GUISetState(@SW_SHOW, $setwindow)
EndFunc ;==>Settings
Func Clicker()
GUISwitch($clickwindow)
GUISetState(@SW_SHOW, $clickwindow)
EndFunc ;==>Clicker
Func Exiting()
If @GUI_WinHandle = $mainwindow Then
Exit (0)
ElseIf @GUI_WinHandle = $clickwindow Then
GUISetState(@SW_HIDE, $clickwindow)
ElseIf @GUI_WinHandle = $setwindow Then
GUISetState(@SW_HIDE, $setwindow)
EndIf
EndFunc ;==>Exiting
Func Login()
GUICtrlSetData(6, @HOUR & ":" & @MIN & ":" & @SEC & " Запуск WoW")
Run($browse_wow)
Sleep(5000)
WinSetTitle("World of Warcraft", "", $winname)
Sleep(100)
WinMove($winname, "", 0, 0, 328, 270)
Sleep(5000)
GUICtrlSetData(6, @HOUR & ":" & @MIN & ":" & @SEC & " Логин")
Sleep(1000)
ClipPut($acc)
Sleep(500)
ControlSend($winname, "", 0, "{CTRLDOWN}v{CTRLUP}")
Sleep(1000)
ControlSend($winname, "", "", "{TAB}")
Sleep(1000)
ClipPut($pass)
Sleep(500)
ControlSend($winname, "", 0, "{CTRLDOWN}v{CTRLUP}")
Sleep(1000)
ControlSend($winname, "", "", "{ENTER}")
Sleep(3000)
If $bnet = $GUI_CHECKED Then
If $bnet_n = 1 Then
ControlSend($winname, "", "", "{ENTER}")
Sleep(3000)
ElseIf $bnet_n = 2 Then
ControlSend($winname, "", "", "{DOWN}")
Sleep(1000)
ControlSend($winname, "", "", "{ENTER}")
ElseIf $bnet_n = 3 Then
ControlSend($winname, "", "", "{DOWN 2}")
Sleep(1000)
ControlSend($winname, "", "", "{ENTER}")
ElseIf $bnet_n = 4 Then
ControlSend($winname, "", "", "{DOWN 3}")
Sleep(1000)
ControlSend($winname, "", "", "{ENTER}")
ElseIf $bnet_n = 5 Then
ControlSend($winname, "", "", "{DOWN 4}")
Sleep(1000)
ControlSend($winname, "", "", "{ENTER}")
EndIf
EndIf
Sleep(10000)
GUICtrlSetData(6, @HOUR & ":" & @MIN & ":" & @SEC & " Загрузка персонажа")
Sleep(1000)
ControlSend($winname, "", "", "{ENTER}")
Sleep(30000)
GUICtrlSetData(6, @HOUR & ":" & @MIN & ":" & @SEC & " Запуск бота")
Sleep(1000)
Run($browse_bot)
;ControlClick("Select process", "Attach", "[CLASS:WindowsForms10.Window.8.app.0.378734a; INSTANCE:2]","left")
;Sleep(5000)
GUICtrlSetData(6, @HOUR & ":" & @MIN & ":" & @SEC & " Выберите процесс")
WinWait("Ready", $char)
Sleep(5000)
$title = WinGetHandle("[CLASS:WindowsForms10.Window.8.app.0.378734a]", $id)
Sleep(1000)
ControlClick($title, "Start botting", "[CLASS:WindowsForms10.Window.8.app.0.378734a; INSTANCE:13]", "left")
Sleep(1000)
GUICtrlSetData(6, @HOUR & ":" & @MIN & ":" & @SEC & " Готово")
Sleep(1000)
EndFunc ;==>Login
Func Relogger()
While 1
GUICtrlSetData(6, @HOUR & ":" & @MIN & ":" & @SEC & " Релоггер запущен")
Sleep(1000)
Do
Sleep(100)
$var = Ping("www.mail.ru", 1000)
Until $var
$title2 = WinGetHandle("[CLASS:WindowsForms10.Window.8.app.0.378734a]", $id)
$line = ControlCommand($title2, "", "[CLASS:WindowsForms10.RichEdit20W.app.0.378734a; INSTANCE:1]", "GetLineCount", "")
$txt = ControlCommand($title2, "", "[CLASS:WindowsForms10.RichEdit20W.app.0.378734a; INSTANCE:1]", "GetLine", $line - 1)
$result = StringRegExp($txt, "Bot stopped", 0)
$result2 = StringRegExp($txt, "Please ress before starting the bot", 0)
$result3 = StringRegExp($txt, "this is not optional!", 0)
$result4 = StringRegExp($txt, "Please enter the world", 0)
$result5 = StringRegExp($txt, "Attached", 0)
$result6 = StringRegExp($txt, "Please login", 0)
If $result3 = 1 Then
$title2 = WinGetHandle("[CLASS:WindowsForms10.Window.8.app.0.378734a]", $id)
ControlClick($title2, "Stop botting", "[CLASS:WindowsForms10.Window.8.app.0.378734a; INSTANCE:13]", "left")
GUICtrlSetData(6, @HOUR & ":" & @MIN & ":" & @SEC & " Перезапуск")
ControlClick($title2, "Start botting", "[CLASS:WindowsForms10.Window.8.app.0.378734a; INSTANCE:13]", "left")
ElseIf $result = 1 Then
$title2 = WinGetHandle("[CLASS:WindowsForms10.Window.8.app.0.378734a]", $id)
GUICtrlSetData(6, @HOUR & ":" & @MIN & ":" & @SEC & " Запуск бота")
ControlClick($title2, "Start botting", "[CLASS:WindowsForms10.Window.8.app.0.378734a; INSTANCE:13]", "left")
ElseIf $result4 = 1 Or $result6 = 1 Then
$title2 = WinGetHandle("[CLASS:WindowsForms10.Window.8.app.0.378734a]", $id)
GUICtrlSetData(6, @HOUR & ":" & @MIN & ":" & @SEC & " Дисконект")
Sleep(5000)
ControlSend($winname, "", "", "{ENTER}")
Sleep(1000)
ControlSend($winname, "", "", "{Backspace 50}")
Sleep(5000)
GUICtrlSetData(6, @HOUR & ":" & @MIN & ":" & @SEC & " Логин")
Sleep(1000)
ClipPut($acc)
Sleep(500)
ControlSend($winname, "", 0, "{CTRLDOWN}v{CTRLUP}")
Sleep(1000)
ControlSend($winname, "", "", "{TAB}")
Sleep(1000)
ClipPut($pass)
Sleep(500)
ControlSend($winname, "", 0, "{CTRLDOWN}v{CTRLUP}")
Sleep(1000)
If $bnet = $GUI_CHECKED Then
If $bnet_n = 1 Then
ControlSend($winname, "", "", "{ENTER}")
Sleep(3000)
ElseIf $bnet_n = 2 Then
ControlSend($winname, "", "", "{DOWN}")
Sleep(1000)
ControlSend($winname, "", "", "{ENTER}")
ElseIf $bnet_n = 3 Then
ControlSend($winname, "", "", "{DOWN 2}")
Sleep(1000)
ControlSend($winname, "", "", "{ENTER}")
ElseIf $bnet_n = 4 Then
ControlSend($winname, "", "", "{DOWN 3}")
Sleep(1000)
ControlSend($winname, "", "", "{ENTER}")
ElseIf $bnet_n = 5 Then
ControlSend($winname, "", "", "{DOWN 4}")
Sleep(1000)
ControlSend($winname, "", "", "{ENTER}")
EndIf
EndIf
ControlSend($winname, "", "", "{ENTER}")
Sleep(10000)
GUICtrlSetData(6, @HOUR & ":" & @MIN & ":" & @SEC & " Загрузка персонажа")
Sleep(1000)
ControlSend($winname, "", "", "{ENTER}")
Sleep(30000)
ElseIf $result5 = 1 Then
$title2 = WinGetHandle("[CLASS:WindowsForms10.Window.8.app.0.378734a]", $id)
GUICtrlSetData(6, @HOUR & ":" & @MIN & ":" & @SEC & " Запуск бота")
ControlClick($title2, "Start botting", "[CLASS:WindowsForms10.Window.8.app.0.378734a; INSTANCE:13]", "left")
EndIf
WEnd
EndFunc ;==>Relogger
While 1
Sleep(10)
WEnd