Adding offsets

05/04/2015 20:06 Pan69Stefan#1
Hello, I've something like this
[Only registered and activated users can see links. Click Here To Register...]
And I want to ask - how should I add this?
This is what I wrote, but.. You know.. It isn't works.
Code:
 
Func Check()
$1 = "07340230" + "0x310"
$2 = $1 + "0x258"
$3 = $2 + "0x68"
$4 = $3 + "0x7E0"
$5 = $4 + "22C"
$points= $4 + "0x22C"
MsgBox(0, "", $points)
EndFunc
Pan Stefan.
05/04/2015 20:22 alpines#2
Better use _MemoryPointerRead.
$aOffset[] = [0, ....]

$a = _MemoryPointerRead
[0] = address
[1] = value
05/04/2015 20:37 Pan69Stefan#3
I don't really know how to do that, can u help me?
How it should looks like?
Code:
$aOffset[]=[0, 310, 258, 68, 7e0, 22c]
$a = _MemoryPointerRead(?, $MemoryOpen, ?)
Pan Stefan.
05/04/2015 21:04 alpines#4
Use it like this.

$aOffset[6] = [0, 0x310, 0x258, 0x68, 0x7E0, 0x22C]
$a = _MemoryPointerRead(07340230, $hOpen, $aOffset)
$a[0] = dynamic address
$a[1] = value

If this doesn't work switch the order of the offsets but keep the zero.
$aOffset[6] = [0, 0x22C, ........, 0x310]
05/04/2015 22:16 FacePalmMan#5
Pointers dont work like: Address = Base + Offset1 + Offset2 + Offset3 + Offset4
They work like: Address = Read(Read(Read("base" + Offset1) + Offset2) + Offset3) + Offset4

Its like following a path. You read the "base" address, which gives you the next address. You go to the address the base gave you, and it gives you the address of the third one, and so on, until you find your destination.
The offsets only mark how far the way to those addresses needs to be corrected.
05/05/2015 19:06 Pan69Stefan#6
So, I've wrote something like this.
Code:
Func Check()
$hOpen = _MemoryOpen(ProcessExists("NostaleX.dat"))
$aOffset[6] = [0, 0x310, 0x258, 0x68, 0x7E0, 0x22C]
$a = _MemoryPointerRead(08880230, $hOpen, $aOffset)
MsgBox(0, "", $a[1])
EndFunc
And the bot crashes. Switching the order of the offsets didn't help.

Pan Stefan.
05/09/2015 10:24 FacePalmMan#7
Quote:
Originally Posted by Pan69Stefan View Post
So, I've wrote something like this.
Code:
Func Check()
$hOpen = _MemoryOpen(ProcessExists("NostaleX.dat"))
$aOffset[6] = [0, 0x310, 0x258, 0x68, 0x7E0, 0x22C]
$a = _MemoryPointerRead(08880230, $hOpen, $aOffset)
MsgBox(0, "", $a[1])
EndFunc
And the bot crashes. Switching the order of the offsets didn't help.

Pan Stefan.
Is this the full bot? because if this is all you wrote, you should think about what a function is, and why it exists.