View previous topic :: View next topic |
Author |
Message |
happyreadygo Advanced Cheater Reputation: 1
Joined: 14 Sep 2011 Posts: 87
|
Posted: Thu Aug 30, 2012 8:13 pm Post subject: are there any easier to deal with pointer reference in lua? |
|
|
are there any easier to deal with pointer?
I think lua don't have *ptr like C launguage.
when I want to copy mem1value to mem2, i do like this
Code: | totalUnitInGroup=readInteger(readInteger(0x96d978)+0x1764) |
When I put units ID into groupUnit , I reference to it like this
Code: | if groupUnit[1] ~= nil then
baseAddress=0x96d6dc
for i=1,totalUnitInGroup do
writeInteger(baseAddress,groupUnit[i])
baseAddress=baseAddress+0x8
end
groupUnit={}
end |
It seems like there are others easier way to go.
|
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 458
Joined: 09 May 2003 Posts: 25295 Location: The netherlands
|
Posted: Fri Aug 31, 2012 3:43 am Post subject: |
|
|
If you know the path you could use a ce notation like this:
readInteger("[96d97b]+1764")
As for the second part, not sure. A integer is 4 bytes, but you do +8 (skipping 4 bytes), so it's not a region copy, so not sure how to make this more efficient.
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
Back to top |
|
|
happyreadygo Advanced Cheater Reputation: 1
Joined: 14 Sep 2011 Posts: 87
|
Posted: Fri Aug 31, 2012 7:54 am Post subject: |
|
|
thank you
|
|
Back to top |
|
|
|