i added ini readinginto the mix after someone here posted an example where they had used it works nicely, and is easier to make changesfor other users who do not understand the source code.
New EEData.au3 setup. The above code block is my EEAutoPilot.settings
Code:
;EEBot - Data Source
#include 'EEMem.au3'
#Region======================================MISC FUNCTIONS==========================================================================
;~ Function-'Format'-Description-------------------------------------------------------
;~ Format Function Created by Blinko
;~ Description: Format( $value )
;~ This was made to imitate Visual Basic's Format Function.
;~ Where (Example Text1 = Format( Text1, "###,###" )
;~ If Text1.text = 1000
;~ then Format(Text1, "###,###") = 1,000
;~ However AutoIt doesnt have a function for this. So i made one up.
;~
;~ Usage: Format($expression, $separator, $nSize)
;~ As the Above Example u want a string like 100000 to read as 100,000
;~ You simply say for example Format('100000' , ',' , 3)
;~ Usage Example: GuiCtrlSetData( $Label, Format(GetPlayerGold(), ',' , 3) )
;~ You may also use "," instead of ',' it does not matter :P
;~ ---------------------------------------------------------------------------------------
Func Format($expression, $separator, $nSize)
Local $split = StringSplit($expression, "")
Local $newText = ""
Local $counter = 0
If StringLen($expression) > $nSize Then
For $i = $split[0] To 1 Step -1
If $counter = $nSize Then
$newText = $split[$i] & $separator & $newText
$counter = 0
Else
$newText = $split[$i] & $newText
EndIf
$counter +=1
Next
Else
$expression = $expression
Return $expression
EndIf
Return $newText
EndFunc
#EndRegion===========================================================================================================================
;~ local $app_base = 0x00C71E98
local $app_base = IniRead(@WorkingDir & "\EEAutoPilot.settings","main","app_base","")
local $app_base_offset = IniRead(@WorkingDir & "\EEAutoPilot.settings","main","app_base_offset","")
;~ local $Zoom_ADDR = 0x00C7157C
local $Zoom_ADDR = IniRead(@WorkingDir & "\EEAutoPilot.settings","main","Zoom_ADDR","")
local $pname = IniRead(@WorkingDir & "\EEAutoPilot.settings","main","pname","") ;static name
;~ local $ptarget = 0x00C71EAC
local $ptarget = IniRead(@WorkingDir & "\EEAutoPilot.settings","main","ptarget","")
local $ZOOM_OFFSET1 = IniRead(@WorkingDir & "\EEAutoPilot.settings","main","ZOOM_OFFSET1","")
local $OFFSET_CurHP = IniRead(@WorkingDir & "\EEAutoPilot.settings","main","OFFSET_CurHP","")
local $OFFSET_MaxHP = IniRead(@WorkingDir & "\EEAutoPilot.settings","main","OFFSET_MaxHP","")
local $OFFSET_CurMP = IniRead(@WorkingDir & "\EEAutoPilot.settings","main","OFFSET_CurMP","")
local $OFFSET_MaxMP = IniRead(@WorkingDir & "\EEAutoPilot.settings","main","OFFSET_MaxMP","")
local $OFFSET_TARGET = IniRead(@WorkingDir & "\EEAutoPilot.settings","main","OFFSET_TARGET","")
local $OFFSET_EXP = IniRead(@WorkingDir & "\EEAutoPilot.settings","main","OFFSET_EXP","")
local $OFFSET_CEXP = IniRead(@WorkingDir & "\EEAutoPilot.settings","main","OFFSET_CEXP","")
local $OFFSET_CLASSLVL = IniRead(@WorkingDir & "\EEAutoPilot.settings","main","OFFSET_CLASSLVL","")
local $OFFSET_BASELVL = IniRead(@WorkingDir & "\EEAutoPilot.settings","main","OFFSET_BASELVL","")
local $OFFSET_PDEF = IniRead(@WorkingDir & "\EEAutoPilot.settings","main","OFFSET_PDEF","")
local $OFFSET_PCRIT = IniRead(@WorkingDir & "\EEAutoPilot.settings","main","OFFSET_PCRIT","")
local $OFFSET_PACC = IniRead(@WorkingDir & "\EEAutoPilot.settings","main","OFFSET_PACC","")
local $OFFSET_PSTR = IniRead(@WorkingDir & "\EEAutoPilot.settings","main","OFFSET_PSTR","")
local $OFFSET_PAGI = IniRead(@WorkingDir & "\EEAutoPilot.settings","main","OFFSET_PAGI","")
local $OFFSET_PINT = IniRead(@WorkingDir & "\EEAutoPilot.settings","main","OFFSET_PINT","")
local $OFFSET_PWIS = IniRead(@WorkingDir & "\EEAutoPilot.settings","main","OFFSET_PWIS","")
local $OFFSET_PLCK = IniRead(@WorkingDir & "\EEAutoPilot.settings","main","OFFSET_PLCK","")
local $OFFSET_GUILDTITLE = IniRead(@WorkingDir & "\EEAutoPilot.settings","main","OFFSET_GUILDTITLE","")
local $OFFSET_PNAME = IniRead(@WorkingDir & "\EEAutoPilot.settings","main","OFFSET_PNAME","") ;offset for player name from app base address
func GetBaseAddress()
local $base = _EEMemRead($app_base)
local $ptr = '0x' & Hex($base + $app_base_offset)
local $base_address = _EEMemRead($ptr)
return $base_address
EndFunc
local $CurHP = '0x' & Hex(GetBaseAddress() + $OFFSET_CurHP)
local $MaxHP = '0x' & Hex(GetBaseAddress() + $OFFSET_MaxHP)
local $CurMP = '0x' & Hex(GetBaseAddress() + $OFFSET_CurMP)
local $MaxMP = '0x' & Hex(GetBaseAddress() + $OFFSET_MaxMP)
local $CurEXP = '0x' & Hex(GetBaseAddress() + $OFFSET_EXP)
local $CurCEXP = '0x' & Hex(GetBaseAddress() + $OFFSET_CEXP)
local $ClassLVL = '0x' & Hex(GetBaseAddress() + $OFFSET_CLASSLVL)
local $BaseLVL = '0x' & Hex(GetBaseAddress() + $OFFSET_BASELVL)
local $PlayerDEF = '0x' & Hex(GetBaseAddress() + $OFFSET_PDEF)
local $PlayerPCRIT = '0x' & Hex(GetBaseAddress() + $OFFSET_PCRIT)
local $PlayerPSTR = '0x' & Hex(GetBaseAddress() + $OFFSET_PSTR)
local $PlayerPAGI = '0x' & Hex(GetBaseAddress() + $OFFSET_PAGI)
local $PlayerPINT = '0x' & Hex(GetBaseAddress() + $OFFSET_PINT)
local $PlayerPWIS = '0x' & Hex(GetBaseAddress() + $OFFSET_PWIS)
local $PlayerPLCK = '0x' & Hex(GetBaseAddress() + $OFFSET_PLCK)
local $PlayerPACC = '0x' & Hex(GetBaseAddress() + $OFFSET_PACC)
local $PlayerGuildTitle = '0x' & Hex(GetBaseAddress() + $OFFSET_GUILDTITLE)
local $PlayerPNAME = '0x' & Hex(GetBaseAddress() + $OFFSET_PNAME)
func ReadEE($type)
switch $type
Case "player_name"
$p_name = _EEMemRead($PlayerPNAME, "char[16]")
return String($p_name)
Case "player_guild_title"
$p_guildt = _EEMemRead($PlayerGuildTitle, "char[16]")
return String($p_guildt)
Case "player_str"
$p_str = _EEMemRead($PlayerPSTR, "dword")
return Int($p_str)
Case "player_agi"
$p_agi = _EEMemRead($PlayerPAGI, "dword")
return Int($p_agi)
Case "player_int"
$p_int = _EEMemRead($PlayerPINT, "dword")
return Int($p_int)
Case "player_acc"
$p_acc = _EEMemRead($PlayerPACC, "float")
return Int($p_acc)
Case "player_crit"
$p_crit = _EEMemRead($PlayerPCRIT, "float")
return Int($p_crit)
Case "player_def"
$p_def = _EEMemRead($PlayerDEF, "dword")
return Int($p_def)
case "base_lvl"
$base_lvl = _EEMemRead($BaseLVL, "dword")
return Int($base_lvl)
case "class_lvl"
$class_lvl = _EEMemRead($ClassLVL, "dword")
return Int($class_lvl)
case "current_cexp"
$cur_cexp = _EEMemRead($CurCEXP, "dword")
return Int($cur_cexp)
case "current_exp"
$cur_exp = _EEMemRead($CurEXP, "dword")
return Int($cur_exp)
case "player_target"
$targetbaseADDR = _EEMemRead($ptarget,"dword")
$target = '0x' & Hex($targetbaseADDR + $OFFSET_TARGET)
$targeted = '0x' & Hex($target)
$target = _EEMemRead($targeted, "dword")
Return Int($target)
case "name"
$name = _EEMemRead($pname, "char[16]")
return String($name)
case "current_hp"
$cur_hp = _EEMemRead($CurHP, "dword")
return Int($cur_hp)
case "max_hp"
$max_hp = _EEMemRead($MaxHP)
return Int($max_hp)
case "current_mp"
$cur_mp = _EEMemRead($CurMP)
return Int($cur_mp)
case "max_mp"
$max_mp = _EEMemRead($MaxMP)
return Int($max_mp)
EndSwitch
EndFunc
func WriteEE($address,$offset,$value)
;"1198383360" zoom hack value
;1098383360 normal value
$1 = _EEMemRead($address, "dword")
_EEMemWrite($1 + $offset, $value, "dword")
EndFunc
Func ZoomHack()
WriteEE($Zoom_ADDR,$ZOOM_OFFSET1,"1198383360")
EndFunc