#Region ### START Koda GUI section ### Form=
$FORM1 = GUICreate("GrandFAPer Pointer Tester", 232, 154, 340, 276)
$GROUP1 = GUICtrlCreateGroup("Results", 8, 8, 215, 137)
$CHARNAME = GUICtrlCreateLabel("CharName", 16, 32, 200)
$HP = GUICtrlCreateLabel("HP", 16, 48, 100)
$MP = GUICtrlCreateLabel("MP", 16, 64, 100)
$PLAYERX = GUICtrlCreateLabel("PlayerX", 16, 80, 100)
$PLAYERY = GUICtrlCreateLabel("PlayerY", 85, 80, 100)
$TARGETX = GUICtrlCreateLabel("TargetX", 16, 96, 100)
$TARGETY = GUICtrlCreateLabel("TargetY", 85, 96, 100)
$MDETECT = GUICtrlCreateLabel("MonsterDetect", 16, 112, 100)
GUICtrlCreateGroup("", -99, -99, 1, 1)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
WinSetOnTop("GrandFAPer Pointer Tester", "", 1)
TraySetIcon("")
While 1
INITSTUFF()
READMEM()
GUICtrlSetData($CHARNAME, "Character Name: " & $PLAYERNAME)
GUICtrlSetData($HP, "HP: " & $CURRENTHP & "/" & $HPCAP)
GUICtrlSetData($MP, "MP: " & $CURRENTMP & "/" & $MPCAP)
GUICtrlSetData($PLAYERX, "Player X: " & $PX)
GUICtrlSetData($PLAYERY, "Y: " & $PY)
GUICtrlSetData($TARGETX, "Target X: " & $TX)
GUICtrlSetData($TARGETY, "Y: " & $TY)
If $MONSTERDETECT Then
GUICtrlSetData($MDETECT, "Targeting Active")
GUICtrlSetColor($MDETECT, 16711680)
Else
GUICtrlSetData($MDETECT, "Targeting Inctive")
GUICtrlSetColor($MDETECT, 16711300)
EndIf
Sleep(500)
WEnd
Func INITSTUFF()
Global $VERSION = "0.1.1b"
Global $WINDOWTITLE = "Grand Fantasia"
Global $PROCESSID = ProcessExists("GrandFantasia.exe")
Global $HPPOINTER = IniRead("gfbot.ini", "Main", "Pointer", "0")
Global $SELFPOINTER = IniRead("gfbot.ini", "Main", "Pointer", "0")
$MEMOPEN = _MEMORYOPEN($PROCESSID)
#Region Jezznar
Global $TSEARCHCNT = 0
Global $TX = 0, $TIMER = 0
Global $DIESHUT = 0, $TMODE = 1, $CAMPERMODE = 0, $BOTSTART, $BOTEND, $TX, $TY, $PX, $PY, $MONSTERDETECT, $WPINDEX = 2, $WALKCNT = 0, $TRY = 1, $REACHED = 0, $PAUSED = 0
Const $PPI = 3.14159265358979
Dim $WAYPOINTS[100][2], $TEMPWP[100][100]
Global $TOGGLE = IniRead("gfbot.ini", "Main", "Toggle", "0")
Global $TARGETXPTR = IniRead("gfbot.ini", "Main", "targetX", "0x009ADA50")
Global $TARGETYPTR = IniRead("gfbot.ini", "Main", "targetY", "0x009ADA54")
Global $TARGETZPTR = IniRead("gfbot.ini", "Main", "targetZ", "0x009ADA58")
Global $RADIUS = IniRead("gfbot.ini", "Main", "AttackRadius", "5")
Global $CHARNAMEPTR = IniRead("gfbot.ini", "Main", "charName", "0x009ADF04")
Global $PLAYERBASE = _MEMORYREAD(IniRead("gfbot.ini", "Main", "playerBase", "0x009ADFF8"), $MEMOPEN)
#EndRegion Jezznar
Global $HPOFFSET1 = Dec("8")
Global $HPOFFSET2 = Dec("4")
Global $HPCAPPOINTER = IniRead("gfbot.ini", "Main", "Pointer", "0")
Global $HPCAPOFFSET1 = Dec("8")
Global $HPCAPOFFSET2 = Dec("48")
Global $MPPOINTER = IniRead("gfbot.ini", "Main", "Pointer", "0")
Global $MPOFFSET1 = Dec("8")
Global $MPOFFSET2 = Dec("8")
Global $MPCAPPOINTER = IniRead("gfbot.ini", "Main", "Pointer", "0")
Global $MPCAPOFFSET1 = Dec("8")
Global $MPCAPOFFSET2 = Dec("4c")
Global $SITPOINTER = IniRead("gfbot.ini", "Main", "Pointer", "0")
Global $SITOFFSET1 = Dec("1C")
Global $SITOFFSET2 = Dec("50")
Global $CURSEDPOINTER = IniRead("gfbot.ini", "Main", "Pointer", "0")
Global $CURSEDOFFSET1 = Dec("8")
Global $CURSEDOFFSET2 = Dec("174")
Global $MONSTERADD = IniRead("gfbot.ini", "Main", "MonsterAddress", "0")
_MEMORYCLOSE($PROCESSID)
EndFunc
Func READMEM()
$MEMOPEN = _MEMORYOPEN($PROCESSID)
Global $CURRENTHP = _MEMORYREAD($HPPOINTER, $MEMOPEN)
Global $HPCUR1 = "0x" & Hex($CURRENTHP + $HPOFFSET1)
Global $CURRENTHP = _MEMORYREAD($HPCUR1, $MEMOPEN)
Global $HPCUR2 = "0x" & Hex($CURRENTHP + $HPOFFSET2)
Global $CURRENTHP = _MEMORYREAD($HPCUR2, $MEMOPEN)
Global $HPCAP = _MEMORYREAD($HPCAPPOINTER, $MEMOPEN)
Global $HPCAP1 = "0x" & Hex($HPCAP + $HPCAPOFFSET1)
Global $HPCAP = _MEMORYREAD($HPCAP1, $MEMOPEN)
Global $HPCAP2 = "0x" & Hex($HPCAP + $HPCAPOFFSET2)
Global $HPCAP = _MEMORYREAD($HPCAP2, $MEMOPEN)
Global $CURRENTMP = _MEMORYREAD($MPPOINTER, $MEMOPEN)
Global $MPCUR1 = "0x" & Hex($CURRENTMP + $MPOFFSET1)
Global $CURRENTMP = _MEMORYREAD($MPCUR1, $MEMOPEN)
Global $MPCUR2 = "0x" & Hex($CURRENTMP + $MPOFFSET2)
Global $CURRENTMP = _MEMORYREAD($MPCUR2, $MEMOPEN)
Global $MPCAP = _MEMORYREAD($MPCAPPOINTER, $MEMOPEN)
Global $MPCAP1 = "0x" & Hex($MPCAP + $MPCAPOFFSET1)
Global $MPCAP = _MEMORYREAD($MPCAP1, $MEMOPEN)
Global $MPCAP2 = "0x" & Hex($MPCAP + $MPCAPOFFSET2)
Global $MPCAP = _MEMORYREAD($MPCAP2, $MEMOPEN)
Global $MONSTERDETECT = _MEMORYREAD($MONSTERADD, $MEMOPEN)
Global $PX = Int(_MEMORYREAD("0x" & Hex($PLAYERBASE + 20), $MEMOPEN, "float"))
Global $PY = Int(_MEMORYREAD("0x" & Hex($PLAYERBASE + 24), $MEMOPEN, "float"))
Global $TX = Int(_MEMORYREAD($TARGETXPTR, $MEMOPEN, "float"))
Global $TY = Int(_MEMORYREAD($TARGETYPTR, $MEMOPEN, "float"))
Global $PLAYERNAME = _MEMORYREAD($CHARNAMEPTR, $MEMOPEN, "char[16]")
_MEMORYCLOSE($PROCESSID)
EndFunc