HotKeySet("{F5}", "quit")
$pw = InputBox("enter password", "enter your password", "","*",150,80)
$wowdir = "D:\Spiele\World of Warcraft" ;your wow dir
$gatherbuddyexe = "Gatherbuddy_Goldseller.exe" ;gatherbuddy exe (Gatherbuddy_Goldseller.exe or Gatherbuddy.exe)
$gatherbuddydir = "D:\Bot\Gatherbuddy\Gatherbuddy" ;gatherbuddy dir
Dim $posx[10]
$posx[1] = 1602 ;position x of the window
Dim $posy[10]
$posy[1] = 4 ;position y of the window
Dim $resw[10]
$resw[1] = 242 ;resolution weight of the window
Dim $resh[10]
$resh[1] = 194 ;resolution height of the window
Dim $acc[30]
$acc[1] = "" ;accname
Dim $charslot[10]
$charslot[1] = 1 ;charslot
$maxaccounts = 1 ;number of accounts
For $i = 1 To $maxaccounts
$file = FileOpen($wowdir&"\WTF\Config.wtf", 0)
$szFile = $wowdir&"\WTF\Config.wtf"
While 1
$line = FileReadLine($file)
If @error = -1 Then ExitLoop
$linetmp = StringLeft($line, 24)
If $linetmp = 'SET lastCharacterIndex "' Then
$linetmp = $line
ExitLoop
EndIf
WEnd
FileClose($file)
$file = FileOpen($wowdir&"\WTF\Config.wtf", 0)
While 1
$lineacc = FileReadLine($file)
If @error = -1 Then
$linetmpacc = "fail"
FileWriteLine($szFile, 'SET accountName "'&$acc[$i]&'"')
ExitLoop
EndIf
$linetmpacc = StringLeft($lineacc, 17)
If $linetmpacc = 'SET accountName "' Then
$linetmpacc = $lineacc
ExitLoop
EndIf
WEnd
FileClose($file)
$charslot[$i] -= 1
$szText = FileRead($szFile,FileGetSize($szFile))
$szText = StringReplace($szText, $linetmp, 'SET lastCharacterIndex "'&$charslot[$i]&'"')
FileDelete($szFile)
FileWrite($szFile, $szText)
Sleep(100);
$szFile = $wowdir&"\WTF\Config.wtf"
$szText = FileRead($szFile,FileGetSize($szFile))
$szText = StringReplace($szText, $linetmpacc, 'SET accountName "'&$acc[$i]&'"')
FileDelete($szFile)
FileWrite($szFile, $szText)
Sleep(100);
ShellExecute("wow.exe", "", $wowdir)
Sleep(8000)
$hwnd = WinGetHandle("World of Warcraft")
Sleep(500)
ControlSend($hwnd, "", "", $pw)
ControlSend($hwnd, "", "", "{enter}")
Sleep(7000)
ControlSend($hwnd, "", "", "{enter}")
Sleep(20000)
WinMove($hwnd, "", $posx[$i], $posy[$i], $resw[$i], $resh[$i])
ShellExecute($gatherbuddyexe, "", $gatherbuddydir)
Sleep(4000)
ControlClick("Gatherbuddy", "", "[INSTANCE:2]")
Next
Exit
Func quit()
Exit
EndFunc