ich machs schnell und fass mich kurz. Da ich das Interesse verloren habe an dem Hack/ Bot weiter zu arbeiten, werde ich die Source releasen. Ich habe lediglich den Link zu meinem FTP- Server entfernt, sodass ihr den Versionschecker entfernen müsst, um den Hack zu benutzen.
Außerdem enthält der Bot noch extern eingebundene Includedateien wie
Code:
#include <DownloadUpdate.au3> #include <ThanksChecker.au3> #include <CheckThanks.au3> #include <Pointer.au3>
Den Rest werde ich hier nicht mit einbinden, da das noch alte UDF's sind, die nicht von mir sind.
Die Source ist ein reines Labyrinth und Krebs in meinen Augen. Ich weiß selber nichtmehr wie ich damit klar gekommen bin. Solltet ihr Spaß dran haben, könnt ihr den Hack modifizieren und releasen, allerdings möchte ich, dass mein Name irgendwo vorkommt.
Source
Code:
;Autor: Logtetsch
#RequireAdmin
if ProcessExists ("TClient.exe") = false Then
MsgBox (48,"Error","Cannot find 4Story!")
Exit
EndIf
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <ListViewConstants.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <DownloadUpdate.au3>
#include <ThanksChecker.au3>
#include <CheckThanks.au3>
#include <Pointer.au3>
#Include <GuiListView.au3>
#include <crypt.au3>
#Include <Timers.au3>
Global $OrginalFileMD5[2]
$OrginalFileMD5[0] = "0x23AC07E7498B8D358F44270CD93A4F90"
$OrginalFileMD5[1] = "0x6E0DB382B733E05408EA6BF2CFB557B7"
#region Abfragen
Global Const $szTitle = "Logtetsch [EG] Free Edition Farm/ -Levelbot 7.1.1"
Const $szDatabaseURL = "Mein alter FTP Server um nach neuen Versionen zu prüfen"
Const $szData = BinaryToString(InetRead($szDatabaseURL))
Const $szVersion = _StringBetween($szData, '[ver]','[/ver]')
Const $szStatus = _StringBetween($szData, '[Off]','[/Off]')
Const $szThread = _StringBetween($szData, "[url]","[/url]")
Const $szMessage = _StringBetween($szData, "[msg]","[/msg]")
if Not (IsArray($szVersion) And IsArray($szStatus) And IsArray($szThread) And IsArray($szMessage)) Then
MsgBox (48,"Error","Cannot find Database. Mainserver is probably offline!")
Exit
EndIf
If $szStatus[0] <> 0 Then
MsgBox (48,"Error","Bot is offline at the moment!")
Exit
EndIf
if $szVersion[0] <> $szTitle Then
MsgBox (64,"Information","A new version was found! Download will start in a few seconds.",5)
_DownloadUpdate("http://logtetschdatabase.1x.de/Bot[EG].rar","Bot[EG].rar")
exit
EndIf
if $szMessage[0] <> "" Then MsgBox (64,"Information",$szMessage[0])
#endregion
Global $4StoryData
Local $ReadPath = RegRead ("HKEY_CURRENT_USER\Software\4StoryPath", "Path")
if @error Then
_4StoryPath()
Else
$4StoryData = $ReadPath
EndIf
Local $ReadPath = RegRead ("HKEY_CURRENT_USER\Software\4StoryPath", "Path")
if @error Then
_4StoryPath()
Else
$4StoryData = $ReadPath
EndIf
#region Pointer
Const $szProcessName = "TClient.exe"
Const $dwBaseAddress = 0x006EFFFC
Const $dwChatModuleAddress = 0x6F11CC
Const $nOffset_Invincile[4] = [0, 0x680, 0x1F4, 0x434]
Const $nOffset_Shop[3] = [0, 0x318, 0x128]
Const $nOffset_Chat[4] = [0, 0x1E4, 0x118, 0x2B8]
Const $nOffset_Zoom[3] = [0, 0x16D0, 0x188]
Const $nOffset_Skill[3] = [0, 0xAA8, 0x45C]
Const $nOffset_Gold[3] = [0, 0xAA8, 0xB48]
Const $nOffset_Silber[3] = [0, 0xAA8, 0xB4C]
Const $nOffset_Bronze[3] = [0, 0xAA8, 0xB50]
Const $nOffset_CharX1[4] = [0, 0x334, 0x1D0, 0x84]
Const $nOffset_CharX2[4] = [0, 0x680, 0x1F4, 0x44]
Const $nOffset_CharY1[4] = [0, 0x328, 0x204, 0x8C]
Const $nOffset_CharY2[4] = [0, 0x680, 0x1F4, 0x4C]
Const $nOffset_CharZ1[4] = [0, 0x328, 0x204, 0x88]
Const $nOffset_CharZ2[4] = [0, 0x680, 0x1F4, 0x48]
Const $nOffset_CharView[2] = [0, 0x881028]
Const $nOffset_CharTilt[2] = [0, 0x8817BE]
Const $nOffset_MobX[3] = [0, 0x754, 0x84]
Const $nOffset_MobY[3] = [0, 0x754, 0x8C]
Const $nOffset_MobZ[3] = [0, 0x754, 0x88]
Const $nOffset_InventarOpen[3] = [0, 0x2E8, 0x128]
Const $nOffset_InventarX[3] = [0, 0x2E8, 0x15C]
Const $nOffset_InventarY[3] = [0, 0x2E8, 0x160]
Const $nOffset_ItemCount[4] = [0, 0x2E8, 0x1D4, 0x10]
#endregion
#Region ### START Koda GUI section ### Form=C:\Users\Marco\Desktop\Marco\Hacks\Projekt Free\Second Projekt\Forms\Botform.kxf
$Form1 = GUICreate($szTitle, 407, 580, 192, 114)
$m_Menu = GUICtrlCreateMenu ("Options")
$m_LevelMenu = GUICtrlCreateMenu ("TCD-File Settings (Levelbot)")
$m_PatchTCD = GUICtrlCreateMenuItem ("Patch files",$m_LevelMenu)
$m_UnpachTCD = GUICtrlCreateMenuItem ("Unpatch files",$m_LevelMenu)
$m_Menu1 = GUICtrlCreateMenuItem ("Check", $m_Menu)
$m_MenuInfo = GUICtrlCreateMenu ("Info")
$m_EarnCheck = GUICtrlCreateMenuItem ("Earn check", $m_MenuInfo)
$grp_Position = GUICtrlCreateGroup("Positions", 5, 5, 395, 330)
$lvw_Position = GUICtrlCreateListView("X|Y|Z|Mobs|Tilt|View", 20, 30, 365, 225, BitOR($LVS_NOSORTHEADER, $LVS_SHOWSELALWAYS, $LVS_SINGLESEL, $LVS_REPORT))
GUICtrlSendMsg(-1, $LVM_SETEXTENDEDLISTVIEWSTYLE, 0, BitOR($LVS_EX_FULLROWSELECT, $LVS_EX_GRIDLINES))
For $i = 0 To 5
GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, $i, 75)
Next
$btn_AddPosition = GUICtrlCreateButton("Add position", 20, 260, 110, 25)
$btn_DeletePosition = GUICtrlCreateButton("Delete postition", 135, 260, 110, 25)
$btn_DeleteAllPosition = GUICtrlCreateButton("Clear all", 275, 260, 110, 25)
$btn_LoadList = GUICtrlCreateButton("Load list", 20, 300, 110, 25)
$btn_SaveList = GUICtrlCreateButton("Save list", 135, 300, 110, 25)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$grp_Settings = GUICtrlCreateGroup("Settings", 5, 340, 395, 140)
$chb_Invincible = GUICtrlCreateCheckbox("Invincible", 20, 365, 97, 17)
GUICtrlSetFont (-1, 8.5, 400, 4)
$chb_Skillfreeze = GUICtrlCreateCheckbox ("Skillfreeze | Recomment for levelbot", 125, 365, 200, 17)
GUICtrlSetFont (-1, 8.5, 400, 4)
$chb_Autosell = GUICtrlCreateCheckbox("Autosell", 20, 390, 97, 17)
$chb_Repetitions = GUICtrlCreateCheckbox("Repetitions", 20, 415, 97, 17)
$inp_Autosell = GUICtrlCreateInput("20", 125, 385, 36, 21, BitOR ($ES_CENTER, $ES_NUMBER))
GUICtrlSetState (-1, $GUI_DISABLE)
$inp_Repetitions = GUICtrlCreateInput("999", 125, 415, 36, 21, BitOR ($ES_CENTER, $ES_NUMBER))
GUICtrlSetState (-1, $GUI_DISABLE)
$lbl_Autosell = GUICtrlCreateLabel("Standart 20", 175, 390, 206, 12)
$lbl_Repetitions = GUICtrlCreateLabel("Set repetitions.", 175, 420, 206, 12)
$chb_Spotwait = GUICtrlCreateCheckbox("Set Spotwait", 20, 440, 97, 17)
$inp_Spotwait = GUICtrlCreateInput("7", 125, 440, 36, 21, BitOR ($ES_CENTER, $ES_NUMBER))
GUICtrlSetState (-1, $GUI_DISABLE)
$lbl_Spotwait = GUICtrlCreateLabel("Standart = 7 seconds", 175, 445, 211, 12)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$grp_Bot = GUICtrlCreateGroup("Settings2", 5, 490, 395, 70)
$btn_Farm_Bot = GUICtrlCreateCheckbox("Farmbot", 305, 515, 70, 25)
$btn_Lvl_Bot = GUICtrlCreateCheckbox ("Levelbot",225, 515, 70, 25)
$btn_Information = GUICtrlCreateButton("Information", 15, 515, 95, 25)
$btn_Credits = GUICtrlCreateButton("Credits", 120, 515, 95, 25)
GUICtrlCreateGroup("", -99, -99, 1, 1)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
Global $gGold = 0, $gSilber = 0, $gBronze = 0
Global $vGold = 0, $vSilber = 0, $vBronze = 0
Global $lv_Standitem = 0
Global $lw_Handle = GUICtrlGetHandle ($lvw_Position)
Global $ProcessID = 0, $Handle = 0, $nSkill
While Sleep (10)
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $m_Menu1
$Handle = _MemoryOpen ($ProcessID)
Local $ReadTx = _MemoryPointerRead($dwBaseAddress, $Handle, $nOffset_InventarX)
Local $ReadTy = _MemoryPointerRead($dwBaseAddress, $Handle, $nOffset_InventarY)
MsgBox (0,"",$ReadTx[1])
MsgBox (0,"",$ReadTy[1])
if not @error Then
if IsArray ($Handle) Then
MsgBox (0,"Information - Check","There are no errors!")
Else
MsgBox (48,"Information - Check","Errorcode: 5" & @LF &"No Array!" & @LF & "Please contact me with the errorcode!")
EndIf
Else
MsgBox (48,"Information -Check","Errorcode: 2" & @LF &"No Array!" & @LF & "Please contact me with the errorcode!")
EndIf
Case $chb_Skillfreeze
if $ProcessID > 0 Then
if IsArray ($Handle) Then
Local $SkillRead = _MemoryPointerRead ($dwBaseAddress, $Handle, $nOffset_Skill, "WORD")
if IsArray ($SkillRead) Then
if $SkillRead[1] > 0 Then
$nSkill = $SkillRead[1]
EndIf
EndIf
EndIf
EndIf
Case $chb_Spotwait
if GUICtrlRead ($chb_Spotwait) = $GUI_CHECKED Then
GUICtrlSetState ($inp_Spotwait, $GUI_ENABLE)
Else
GUICtrlSetState ($inp_Spotwait, $GUI_DISABLE)
EndIf
Case $m_EarnCheck
MsgBox (64,"Info","You earned " & $gGold & " rune " & $gSilber & " luna " & $gBronze & " bronze ")
Case $btn_Information
MsgBox (64,"Information","Your Version: " & $szTitle)
Case $btn_Credits
MsgBox (64,"Information","A very big thanks to KDeluxe for his help!" & @LF & "Credits: KDeluxe" & @LF & "www.elitepvpers.com/forum/4Story" )
Case $btn_AddPosition
_AddPosition()
Case $btn_DeletePosition
_GUICtrlListView_DeleteItemsSelected($lvw_Position)
case $btn_LoadList
Local $f_File, $f_FileOpen, $f_FileItem
$f_File = FileOpenDialog ("Load list",@ScriptDir, "(*.*)", 3)
$f_FileOpen = FileOpen ($f_File)
if $f_FileOpen <> -1 Then
While True
$f_FileItem = FileReadLine ($f_FileOpen)
if @error then ExitLoop
GUICtrlCreateListViewItem ($f_FileItem, $lvw_Position)
WEnd
FileClose ($f_FileOpen)
EndIf
case $btn_SaveList
Local $f_File, $f_FileOpen, $f_FileItem, $lv_ItemCount, $sHanle, $lv_Item
$f_File = FileSaveDialog ("Save list",@ScriptDir,"Text (*.txt)", 2)
$sHanle = GUICtrlGetHandle ($lvw_Position)
$lv_ItemCount = _GUICtrlListView_GetItemCount ($sHanle)
$f_FileOpen = FileOpen ($f_File, 2)
For $i = 0 to $lv_ItemCount - 1
$lv_Item = _GUICtrlListView_GetItemTextString($sHanle, $i)
FileWriteLine ($f_FileOpen, $lv_Item)
Next
FileClose ($f_FileOpen)
case $btn_DeleteAllPosition
if MsgBox (52,"Information","Are you sure you want delete all items?") = 6 then _GUICtrlListView_DeleteAllItems($lvw_Position)
Case $chb_Autosell
If GUICtrlRead($chb_Autosell) == $GUI_CHECKED Then
GUICtrlSetState($inp_Autosell, $GUI_ENABLE)
Else
GUICtrlSetState($inp_Autosell, $GUI_DISABLE)
EndIf
Case $chb_Repetitions
If GUICtrlRead($chb_Repetitions) == $GUI_CHECKED Then
GUICtrlSetState ($inp_Repetitions, $GUI_ENABLE)
Else
GUICtrlSetState ($inp_Repetitions, $GUI_DISABLE)
EndIf
Case $m_PatchTCD
if ProcessExists ("TClient.exe") Then
if MsgBox (52,"Error","4Story must be closed to patch the files! Do you want restart 4Story?") = 6 Then ProcessClose ("TClient.exe")
EndIf
Do
Sleep (100)
Until ProcessExists ("TClient.exe") = False
FileCopy (@ScriptDir & "\Data\PatchTCD\TSkill.tcd", $4StoryData & "\Tcd\", 1)
FileCopy (@ScriptDir & "\Data\PatchTCD\TMon.tcd", $4StoryData & "\Tcd\",1)
if not @error Then
MsgBox (64,"Info","Successfully patched!")
EndIf
Run ($4StoryData & "\4Story.exe")
Case $m_UnpachTCD
if ProcessExists ("TClient.exe") Then
if MsgBox (52,"Error","4Story must be closed to patch the files! Do you want close 4Story?") = 6 Then ProcessClose ("TClient.exe")
EndIf
Do
Sleep (100)
Until ProcessExists ("TClient.exe") = False
FileCopy (@ScriptDir & "\Data\OrginalTCD\TSkill.tcd", $4StoryData & "\Tcd\",1)
FileCopy (@ScriptDir & "\Data\OrginalTCD\TMon.tcd", $4StoryData & "\Tcd\",1)
if not @error Then
MsgBox (64,"Info","Successfully patched!")
EndIf
Run ($4StoryData & "\4Story.exe")
Exit
Case $chb_Invincible
if GUICtrlRead ($chb_Invincible) == $GUI_CHECKED Then
if IsArray ($Handle) Then
_MemoryPointerWrite ($dwBaseAddress, $Handle, $nOffset_Invincile, 0)
EndIf
EndIf
EndSwitch
if $ProcessID = 0 Then
$ProcessID = ProcessExists ("TClient.exe")
if $ProcessID = 0 then
MsgBox (48,"Error","Cannot open TClient.exe")
Else
$Handle = _MemoryOpen ($ProcessID)
if not IsArray ($Handle) Then
MsgBox (48,"Error","Cannot open memory")
EndIf
EndIf
EndIf
if GUICtrlRead ($btn_Farm_Bot) == $GUI_CHECKED Then
GUICtrlSetState ($btn_Lvl_Bot, $GUI_DISABLE)
Local $CheckFileMon = _Crypt_HashFile ($4StoryData & "\Tcd\TMon.tcd", $CALG_MD5)
Local $CheckFileSkill = _Crypt_HashFile ($4StoryData & "\Tcd\TSkill.tcd", $CALG_MD5)
if $CheckFileMon <> $OrginalFileMD5[0] Or $CheckFileSkill <> $OrginalFileMD5[1] Then
MsgBox (48,"Error","Cannot find original .tcd files! Please use the unpatch button!")
GUICtrlSetState ($btn_Farm_Bot, $GUI_UNCHECKED)
Else
_FBot()
EndIf
if @error Then
MsgBox (48,"Error","Cannot run the botfunction!")
EndIf
Else
GUICtrlSetState ($btn_Lvl_Bot, $GUI_ENABLE)
EndIf
if GUICtrlRead ($btn_Lvl_Bot) == $GUI_CHECKED Then
Local $lv_ItemCount = _GUICtrlListView_GetItemCount (GUICtrlGetHandle ($lvw_Position))
if $lv_ItemCount > 0 Then
GUICtrlSetState ($btn_Farm_Bot, $GUI_DISABLE)
_LBot()
Else
MsgBox (48,"Error","Cannot find position!")
GUICtrlSetState ($btn_Lvl_Bot, $GUI_UNCHECKED)
GUICtrlSetState ($btn_Farm_Bot, $GUI_ENABLE)
EndIf
if @error Then
MsgBox (48,"Error","Cannot run the botfunction!")
EndIf
Else
GUICtrlSetState ($btn_Farm_Bot, $GUI_ENABLE)
EndIf
if $ProcessID = 0 Then
$ProcessID = ProcessExists ("TClient.exe")
if $ProcessID > 0 Then
$Handle = _MemoryOpen ($ProcessID)
EndIf
EndIf
if GUICtrlRead ($chb_Skillfreeze) == $GUI_CHECKED Then
if $ProcessID > 0 Then
if IsArray ($Handle) Then
if $nSkill > 0 Then
_MemoryPointerWrite ($dwBaseAddress, $Handle, $nOffset_Skill, $nSkill, "WORD")
EndIf
EndIf
EndIf
EndIf
WEnd
Func _AddPosition()
if IsArray ($Handle) Then
$rData_Mobs = InputBox ("Add mobs","How many mobs stay here?")
if not @error Then
$rData_CharX = _MemoryPointerRead($dwBaseAddress, $Handle, $nOffset_CharX1, "float")
$rData_CharY = _MemoryPointerRead($dwBaseAddress, $Handle, $nOffset_CharY1, "float")
$rData_CharZ = _MemoryPointerRead($dwBaseAddress, $Handle, $nOffset_CharZ1, "float")
$rData_CharT = _MemoryPointerRead($dwBaseAddress, $Handle, $nOffset_CharTilt)
$rData_CharV = _MemoryPointerRead($dwBaseAddress, $Handle, $nOffset_CharView)
if IsArray ($rData_CharX) and IsArray ($rData_CharY) and IsArray ($rData_CharZ) and IsArray ($rData_CharT) and IsArray ($rData_CharV) Then
GUICtrlCreateListViewItem( Round($rData_CharX[1], 2) & "|" & _
Round($rData_CharY[1], 2) & "|" & _
Round($rData_CharZ[1], 2) & "|" & _
$rData_Mobs & "|" & _
$rData_CharT[1] & "|" & _
$rData_CharV[1], $lvw_Position)
Else
MsgBox (48,"Error","Errorcode : ArrayP" & @LF & "Please contact the support with these errorcode!")
EndIf
EndIf
Else
MsgBox (48,"Error","Could not open process!")
EndIf
EndFunc
Func _InventoryCheck()
if GUICtrlRead ($chb_Autosell) == $GUI_CHECKED Then
if IsArray ($Handle) Then
$rData_Inventory = _MemoryPointerRead($dwBaseAddress, $Handle, $nOffset_ItemCount)
if IsArray ($rData_Inventory) Then
If $rData_Inventory[1] = 16 Then
_Autosell()
EndIf
EndIf
EndIf
EndIf
EndFunc
Func _Autosell()
if IsArray ($Handle) Then
$Sleep = GUICtrlRead($inp_Autosell)
ControlSend ("4Story_GSP","","","ö")
Sleep (10)
$a_ReadInventar = _MemoryPointerRead ($dwBaseAddress, $Handle, $nOffset_InventarOpen)
if IsArray ($a_ReadInventar) Then
if $a_ReadInventar[1] = 0 Then
ControlSend ("4Story_GSP","","","i")
EndIf
EndIf
_MemoryPointerWrite($dwBaseAddress, $Handle, $nOffset_Shop, 1)
$t_init = TimerInit()
While 1
if TimerDiff ($t_init) >= $Sleep then ExitLoop
WEnd
Local $Gold = _MemoryPointerRead ($dwBaseAddress, $Handle, $nOffset_Gold, "DWORD")
Local $Silber = _MemoryPointerRead ($dwBaseAddress, $Handle, $nOffset_Silber, "DWORD")
Local $Bronze = _MemoryPointerRead ($dwBaseAddress, $Handle, $nOffset_Bronze, "DWORD")
if IsArray ($Gold) And IsArray ($Silber) and IsArray ($Bronze) Then
$vGold = $Gold[1]
$vSilber = $Silber[1]
$vBronze = $Bronze[1]
EndIf
$ReadTx = _MemoryPointerRead($dwBaseAddress, $Handle, $nOffset_InventarX)
$ReadTy = _MemoryPointerRead($dwBaseAddress, $Handle, $nOffset_InventarY)
$pause = GUICtrlRead ($inp_Autosell)
if IsArray ($ReadTx) and IsArray ($ReadTy) Then
ControlClick ("4Story_GSP","","","left",2,$ReadTx[1] + 21, $ReadTy[1] + 50)
Sleep ($pause)
ControlSend("4Story_GSP", "", "", "{ENTER}")
Sleep ($pause)
ControlSend("4Story_GSP", "", "", "{ENTER}") ;Slot Nummer 1
ControlClick ("4Story_GSP","","","left",2,$ReadTx[1] + 56, $ReadTy[1] + 50)
Sleep ($pause)
ControlSend("4Story_GSP", "", "", "{ENTER}")
Sleep ($pause)
ControlSend("4Story_GSP", "", "", "{ENTER}") ;Slot Nummer 2
ControlClick ("4Story_GSP","","","left",2,$ReadTx[1] + 91, $ReadTy[1] + 50)
Sleep ($pause)
ControlSend("4Story_GSP", "", "", "{ENTER}")
Sleep ($pause)
ControlSend("4Story_GSP", "", "", "{ENTER}") ;Slot Nummer 3
ControlClick ("4Story_GSP","","","left",2,$ReadTx[1] + 126, $ReadTy[1] + 50)
Sleep ($pause)
ControlSend("4Story_GSP", "", "", "{ENTER}")
Sleep ($pause)
ControlSend("4Story_GSP", "", "", "{ENTER}") ;Slot Nummer 4
ControlClick ("4Story_GSP","","","left",2,$ReadTx[1] + 21, $ReadTy[1] + 85)
Sleep ($pause)
ControlSend("4Story_GSP", "", "", "{ENTER}")
Sleep ($pause)
ControlSend("4Story_GSP", "", "", "{ENTER}") ;Slot Nummer 5
ControlClick ("4Story_GSP","","","left",2,$ReadTx[1] + 56, $ReadTy[1] + 85)
Sleep ($pause)
ControlSend("4Story_GSP", "", "", "{ENTER}")
Sleep ($pause)
ControlSend("4Story_GSP", "", "", "{ENTER}") ;Slot Nummer 6
ControlClick ("4Story_GSP","","","left",2,$ReadTx[1] + 91, $ReadTy[1] + 85)
Sleep ($pause)
ControlSend("4Story_GSP", "", "", "{ENTER}")
Sleep ($pause)
ControlSend("4Story_GSP", "", "", "{ENTER}") ;Slot Nummer 7
ControlClick ("4Story_GSP","","","left",2,$ReadTx[1] + 126, $ReadTy[1] + 85)
Sleep ($pause)
ControlSend("4Story_GSP", "", "", "{ENTER}")
Sleep ($pause)
ControlSend("4Story_GSP", "", "", "{ENTER}") ;Slot Nummer 8
ControlClick ("4Story_GSP","","","left",2,$ReadTx[1] + 21, $ReadTy[1] + 120)
Sleep ($pause)
ControlSend("4Story_GSP", "", "", "{ENTER}")
Sleep ($pause)
ControlSend("4Story_GSP", "", "", "{ENTER}") ;Slot Nummer 9
ControlClick ("4Story_GSP","","","left",2,$ReadTx[1] + 56, $ReadTy[1] + 120)
Sleep ($pause)
ControlSend("4Story_GSP", "", "", "{ENTER}")
Sleep ($pause)
ControlSend("4Story_GSP", "", "", "{ENTER}") ;Slot Nummer 10
ControlClick ("4Story_GSP","","","left",2,$ReadTx[1] + 91, $ReadTy[1] + 120)
Sleep ($pause)
ControlSend("4Story_GSP", "", "", "{ENTER}")
Sleep ($pause)
ControlSend("4Story_GSP", "", "", "{ENTER}") ;Slot Nummer 11
ControlClick ("4Story_GSP","","","left",2,$ReadTx[1] + 126, $ReadTy[1] + 120)
Sleep ($pause)
ControlSend("4Story_GSP", "", "", "{ENTER}")
Sleep ($pause)
ControlSend("4Story_GSP", "", "", "{ENTER}") ;Slot Nummer 12
ControlClick ("4Story_GSP","","","left",2,$ReadTx[1] + 21, $ReadTy[1] + 155)
Sleep ($pause)
ControlSend("4Story_GSP", "", "", "{ENTER}")
Sleep ($pause)
ControlSend("4Story_GSP", "", "", "{ENTER}") ;Slot Nummer 13
ControlClick ("4Story_GSP","","","left",2,$ReadTx[1] + 56, $ReadTy[1] + 155)
Sleep ($pause)
ControlSend("4Story_GSP", "", "", "{ENTER}")
Sleep ($pause)
ControlSend("4Story_GSP", "", "", "{ENTER}") ;Slot Nummer 14
ControlClick ("4Story_GSP","","","left",2,$ReadTx[1] + 91, $ReadTy[1] + 155)
Sleep ($pause)
ControlSend("4Story_GSP", "", "", "{ENTER}")
Sleep ($pause)
ControlSend("4Story_GSP", "", "", "{ENTER}") ;Slot Nummer 15
ControlClick ("4Story_GSP","","","left",2,$ReadTx[1] + 126, $ReadTy[1] + 155)
Sleep ($pause)
ControlSend("4Story_GSP", "", "", "{ENTER}")
Sleep ($pause)
ControlSend("4Story_GSP", "", "", "{ENTER}") ;Slot Nummer 16
Sleep (25)
$rData_ChatActive = _MemoryPointerRead ($dwChatModuleAddress, $Handle, $nOffset_Chat)
if IsArray ($rData_ChatActive) Then
if $rData_ChatActive[1] == 1 Then
ControlSend("4Story_GSP", "", "", "{ENTER}")
EndIf
EndIf
_MemoryPointerWrite($dwBaseAddress, $Handle, $nOffset_InventarOpen, 0)
_MemoryPointerWrite($dwBaseAddress, $Handle, $nOffset_Shop, 0)
Return SetError(0, "", True)
EndIf
Local $sGold = _MemoryPointerRead ($dwBaseAddress, $Handle, $nOffset_Gold, "DWORD")
Local $sSilber = _MemoryPointerRead ($dwBaseAddress, $Handle, $nOffset_Silber, "DWORD")
Local $sBronze = _MemoryPointerRead ($dwBaseAddress, $Handle, $nOffset_Bronze, "DWORD")
if IsArray ($sGold) And IsArray ($sSilber) and IsArray ($sBronze) Then
Local $nBronze = $sBronze[1] - $vBronze[1]
if $nBronze <= 0 Then
$gBronze += 1000
$gSilber += 1
Else
$gBronze += $nBronze
EndIf
Local $nSilber = $sSilber[1] - $vSilber[1]
if $nSilber <= 0 Then
$gSilber += 1000
$gGold += 1
Else
$gSilber += $nSilber
EndIf
Local $nGold = $sGold[1] - $vGold[1]
EndIf
EndIf
EndFunc
Func _FBot()
_InventoryCheck()
$Handle = _MemoryOpen ($ProcessID)
if IsArray ($Handle) Then
Local $G = _MemoryPointerRead ($dwBaseAddress, $Handle, $nOffset_Gold, "DWORD")
Local $S = _MemoryPointerRead ($dwBaseAddress, $Handle, $nOffset_Silber, "DWORD")
Local $B = _MemoryPointerRead ($dwBaseAddress, $Handle, $nOffset_Bronze, "DWORD")
$aGold = $G[1]
$aSilber = $S[1]
$aBronze = $B[1]
Local $i_ItemCount = _GUICtrlListView_GetItemCount($lw_Handle) -1
if $i_ItemCount > 0 then
$gr_Repetitions = GUICtrlRead ($inp_Repetitions) - 1
if $gr_Repetitions <> 0 Then
For $i_a = 0 to $gr_Repetitions
For $i_b = $lv_Standitem to $i_ItemCount
if GUICtrlRead ($btn_Farm_Bot) == $GUI_UNCHECKED then ExitLoop
$lv_Standitem = $i_b
#region Porten
$i_ItemSelect = _GUICtrlListView_GetItemTextArray($lw_Handle, $i_b)
if $i_ItemSelect[0] > 0 Then
_MemoryPointerWrite ($dwBaseAddress, $Handle, $nOffset_CharX1, $i_ItemSelect[1], "float")
_MemoryPointerWrite ($dwBaseAddress, $Handle, $nOffset_CharX2, $i_ItemSelect[1], "float")
_MemoryPointerWrite ($dwBaseAddress, $Handle, $nOffset_CharY1, $i_ItemSelect[2], "float")
_MemoryPointerWrite ($dwBaseAddress, $Handle, $nOffset_CharY2, $i_ItemSelect[2], "float")
_MemoryPointerWrite ($dwBaseAddress, $Handle, $nOffset_CharZ1, $i_ItemSelect[3], "float")
_MemoryPointerWrite ($dwBaseAddress, $Handle, $nOffset_CharZ2, $i_ItemSelect[3], "float")
EndIf
#endregion
_MemoryPointerWrite ($dwBaseAddress, $Handle, $nOffset_Zoom, 1194713344, "DWORD")
#region Selecten und töten
Local $Mobspeicher[$i_ItemSelect[4]]
Local $Mobspeicherzaehler = 0
Local $t_init = TimerInit()
While $Mobspeicherzaehler <> $i_ItemSelect[4]
if GUICtrlRead ($btn_Farm_Bot) == $GUI_CHECKED then
Else
ExitLoop
EndIf
if TimerDiff ($t_init) >= 3500 Then ExitLoop
ControlSend ("4Story_GSP","","","{TAB}")
$Readmob = _MemoryPointerRead ($dwBaseAddress, $Handle, $nOffset_MobX, "float")
if IsArray ($Readmob) Then
if $Readmob[1] > 0 then
Local $aToString = _ArrayToString ($Mobspeicher,"")
If not StringInStr($aToString,$Readmob[1]) Then
$Mobspeicher[$Mobspeicherzaehler] = $Readmob[1]
$Mobspeicherzaehler = $Mobspeicherzaehler + 1
_MemoryPointerWrite ($dwBaseAddress, $Handle, $nOffset_MobX, 0, "float")
_MemoryPointerWrite ($dwBaseAddress, $Handle, $nOffset_MobY, 0, "float")
_MemoryPointerWrite ($dwBaseAddress, $Handle, $nOffset_MobZ, 0, "float")
$t_initW = TimerInit ()
While 1
if TimerDiff ($t_initW) >= 30 then ExitLoop
WEnd
EndIf
EndIf
EndIf
WEnd
#endregion
if GUICtrlRead ($btn_Farm_Bot) == $GUI_CHECKED then
Else
ExitLoop
EndIf
if $Mobspeicherzaehler > 0 Then
#region Einsammeln
Local $Mobeinsammelzaehler = 0
Local $Totmobspeicher[$Mobspeicherzaehler]
Local $ADZ = 0
Local $Address[$Mobspeicherzaehler]
Local $chb_sptstatus = 0
if GUICtrlRead ($chb_Spotwait) == $GUI_CHECKED Then
$i_timerE = TimerInit()
$chb_sptstatus = 1
EndIf
While $Mobeinsammelzaehler <> $Mobspeicherzaehler
if GUICtrlRead ($btn_Farm_Bot) == $GUI_CHECKED then
Else
ExitLoop
EndIf
if $chb_sptstatus = 1 then
if TimerDiff ($i_timerE) >= (GUICtrlRead ($inp_Spotwait) * 1000) then
ExitLoop
EndIf
EndIf
Sleep (300)
_InventoryCheck()
ControlSend ("4Story_GSP","","","x")
Local $Readmob2 = _MemoryPointerRead ($dwBaseAddress, $Handle, $nOffset_MobX, "float")
if IsArray ($Readmob2) Then
if $Readmob2[1] > 0 Then
Local $aToString2 = _ArrayToString ($Totmobspeicher, "")
Local $aToString3 = _ArrayToString ($Address, "")
if Not StringInStr($aToString2, $Readmob2[1]) then
if Not StringInStr ($aToString3, $Readmob2[0]) Then
$Totmobspeicher[$Mobeinsammelzaehler] = $Readmob2[1]
$Address[$ADZ] = $Readmob2[0]
$ReadCharX = _MemoryPointerRead ($dwBaseAddress, $Handle, $nOffset_CharX1, "float")
$ReadCharY = _MemoryPointerRead ($dwBaseAddress, $Handle, $nOffset_CharY1, "float")
$ReadCharZ = _MemoryPointerRead ($dwBaseAddress, $Handle, $nOffset_CharZ1, "float")
$ReadmobX = _MemoryPointerWrite ($dwBaseAddress, $Handle, $nOffset_MobX, $ReadCharX[1],"float")
$ReadmobY = _MemoryPointerWrite ($dwBaseAddress, $Handle, $nOffset_MobY, $ReadCharY[1],"float")
$ReadmobZ = _MemoryPointerWrite ($dwBaseAddress, $Handle, $nOffset_MobZ, $ReadCharZ[1],"float")
Sleep (50)
ControlSend ("4Story_GSP","","","z")
$Mobeinsammelzaehler = $Mobeinsammelzaehler + 1
$ADZ = $ADZ + 1
_InventoryCheck()
EndIf
EndIf
EndIf
EndIf
WEnd
if GUICtrlRead ($btn_Farm_Bot) == $GUI_CHECKED then
Else
ExitLoop
EndIf
_InventoryCheck()
Else
EndIf
#endregion
Next
if GUICtrlRead ($btn_Farm_Bot) == $GUI_UNCHECKED then ExitLoop
$lv_Standitem = 0
Next
EndIf
EndIf
EndIf
EndFunc
Func _LBot()
if IsArray ($Handle) Then
Local $repetitions = GUICtrlRead ($inp_Repetitions) -1
Local $Spawnwait = GUICtrlRead ($inp_Spotwait) -1
if $repetitions > 0 And $Spawnwait > 0 Then
Local $ItemCount = _GUICtrlListView_GetItemCount (GUICtrlGetHandle ($lvw_Position)) -1
if $ItemCount > 0 Then
For $i = 0 to $repetitions
if GUICtrlRead ($btn_Lvl_Bot) == $GUI_CHECKED Then
Else
ExitLoop
EndIf
For $j = 0 to $ItemCount
if GUICtrlRead ($btn_Lvl_Bot) == $GUI_CHECKED Then
Else
ExitLoop
EndIf
Local $Pos = _GUICtrlListView_GetItemTextArray (GUICtrlGetHandle ($lvw_Position), $j)
if $Pos[0] > 0 Then
_MemoryPointerWrite ($dwBaseAddress, $Handle, $nOffset_CharX1, $Pos[1], "float")
_MemoryPointerWrite ($dwBaseAddress, $Handle, $nOffset_CharX2, $Pos[1], "float")
_MemoryPointerWrite ($dwBaseAddress, $Handle, $nOffset_CharY1, $Pos[2], "float")
_MemoryPointerWrite ($dwBaseAddress, $Handle, $nOffset_CharY2, $Pos[2], "float")
_MemoryPointerWrite ($dwBaseAddress, $Handle, $nOffset_CharZ1, $Pos[3], "float")
_MemoryPointerWrite ($dwBaseAddress, $Handle, $nOffset_CharZ2, $Pos[3], "float")
EndIf
Local $Timer = TimerInit()
While Sleep (10)
if GUICtrlRead ($btn_Lvl_Bot) == $GUI_CHECKED Then
Else
ExitLoop
EndIf
if TimerDiff ($Timer) >= $Spawnwait * 1000 Then
ExitLoop
EndIf
Send ("1")
Local $Timer2 = TimerInit()
While Sleep (10)
if GUICtrlRead ($btn_Lvl_Bot) == $GUI_CHECKED Then
Else
ExitLoop
EndIf
if TimerDiff ($Timer2) >= 2100 Then ExitLoop
WEnd
WEnd
Next
Next
EndIf
EndIf
EndIf
EndFunc
Func _4StoryPath()
MsgBox(64,"Info","Please select your 4Story folder!")
Local $4StoryPath = FileSelectFolder("","")
if not @error Then
RegWrite ("HKEY_CURRENT_USER\Software\4StoryPath", "Path", "REG_MULTI_SZ", $4StoryPath)
EndIf
EndFunc






