multi level pointers

04/17/2012 14:36 summoner01#46
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.
06/30/2012 21:11 toto2210#47
I know this post is old I'm sorry for reviving it, but who can help me.

I have this pointer for score in a solitaire game.



HTML Code:
<?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>
Who can help me to write Autoit ascript that will show solitaire score in a message box. Thank you
07/02/2012 14:20 WhiteLionATX#48
"solitaire.exe" (base address most times 00400000) +000BB0E8 = 1. pointer address (use read memory to grab it ...see script of lolcop) you will grab it like that: E8B04B00
swap bytes like this: 004BB0E8 < thats the pointer

now repeat the stuff again .... memory read on 004BB0E8 + 145 = 2. pointer address
swap bytes... memoryread the new address ...

... repeat until you reached last address ... thats your targetvalue
07/02/2012 17:29 eienheart#49
Hey I noticed my thread was not noticed at all, Views are 70+ but no replies, here I'm hoping to get one.. pls :(

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
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?

PS: don't mind the disparity in coding for hp/mp I'm simply trying it out bothways as i go so i wouldn't miss the working code..
07/03/2012 00:26 WhiteLionATX#50
Quote:
Originally Posted by eienheart View Post
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,
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:
Originally Posted by eienheart View Post
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..
try to do step by step with comparing each address with CE one and you will find the reason!
use:
msgbox(0, "$StaticOffset", $StaticOffset)
msgbox(0, "$baseaddress", $baseaddress)

...aso
07/03/2012 13:47 eienheart#51
yes base+static is equal to the one in CE. the problem comes in:
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)
it reads a different value than what i need.