Thanks again man, this info helped me out a lot, and i'm sure it will for fear-x too.
Now I can continue several projects I was wanting to do via memory.
Now I can continue several projects I was wanting to do via memory.
<?xml version="1.0"?> <CheatTable> <CheatEntries> <CheatEntry> <ID>3</ID> <Description>"pointerscan result"</Description> <Color>80000008</Color> <VariableType>4 Bytes</VariableType> <Address>"solitaire.exe"+000BB0E8</Address> <Offsets> <Offset>154</Offset> <Offset>68</Offset> <Offset>A0</Offset> <Offset>48</Offset> </Offsets> </CheatEntry> </CheatEntries> </CheatTable>
My baseaddress+staticaddress does return a value, but when i try to add it with an offset to get the value(HP) in-game, it returns an abnormally high or randomly low value instead.. can anyone tell me whats wrong with my code?Quote:
#cs ----------------------------------------------------------------------------
AutoIt Version: 1.5.0.0
Author: eien
#ce ----------------------------------------------------------------------------
#include <nomadmemory.au3>
Global $PID = ProcessExists ( "elementclient.exe" )
WinActivate("Jade Dynasty") ;bring the game to active window at start
Autopot()
Func Autopot()
While WinActive("Jade Dynasty") ;ends script when window isn't active
Global $HPROCESS = _MEMORYOPEN($PID)
Global $StaticOffset = 0x008256FC
Global $baseaddress = _MemoryModuleGetBaseAddress($PID, "elementclient.exe");static address that accesses my pointer - via CE
Global $finalADDR = "0x" & Hex($baseaddress + $StaticOffset)
Global $offset1 = 0x27c ;offset for current hp
Global $offset2 = 0x2a0 ;offset for max hp
Global $offset3 = 0x280 ;offset for current mp
Global $offset4 = 0x2a4 ;offset for max mp
$CurrentHP = _MemoryRead($finalADDR, $HPROCESS) + $offset1
$MaxHP = _MemoryRead($finalADDR, $HPROCESS) + $offset2
$CurrentMP = _MemoryRead($finalADDR + $offset3, $HPROCESS)
$MaxMP = _MemoryRead($finalADDR + $offset4, $HPROCESS)
;MsgBox(0, "ab", $CurrentHP)
If $CurrentHP < (.9) * ($MaxHP) Then ;press 8 when HP is below 90%
Send(8)
EndIf
If $CurrentMP < (.9) * ($MaxMP) Then ;press 9 when MP is below 90%
Send(9)
EndIf
WEnd
_MemoryClose($PID)
EndFunc ;==>Autopot
did you check the values ? - compare both (base+static) if they are equal to the one you can view with hex editor of CE!Quote:
Hey I noticed my thread was not noticed at all, Views are 70+ but no replies, here I'm hoping to get one.. pls :(
My baseaddress+staticaddress does return a value,
try to do step by step with comparing each address with CE one and you will find the reason!Quote:
but when i try to add it with an offset to get the value(HP) in-game, it returns an abnormally high or randomly low value instead..
it reads a different value than what i need.Quote:
$CurrentHP = _MemoryRead($finalADDR, $HPROCESS) + $offset1
$MaxHP = _MemoryRead($finalADDR, $HPROCESS) + $offset2
$CurrentMP = _MemoryRead($finalADDR + $offset3, $HPROCESS)
$MaxMP = _MemoryRead($finalADDR + $offset4, $HPROCESS)
MsgBox(0, "ab", $CurrentHP)