|
Cheat Engine The Official Site of Cheat Engine
|
View previous topic :: View next topic |
Author |
Message |
LastExceed Expert Cheater Reputation: 1
Joined: 05 Nov 2014 Posts: 130
|
Posted: Thu Mar 19, 2015 4:22 am Post subject: synchronizing addresses from different processes |
|
|
I'm quite new to lua scripting ahd therefore don't know much about it, all i know is that i need 2 CE clients and a shared memory block
Code: | x=allocateSharedMemory("abc", 4096) |
What do i have to do next? I think i now have to tell CE to put the addresses into that memory block and then i have to tell the other CE client to grab information from that block, but how do i do that?
|
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 458
Joined: 09 May 2003 Posts: 25287 Location: The netherlands
|
Posted: Thu Mar 19, 2015 4:54 am Post subject: |
|
|
Design a structure layout containing all the data you wish to share.
e.g:
0:x
4:y
8:z
12:health
16:ammo
Then use a timer in one CE that reads the addresses you're interested in into x
e.g:
writeInteger(x+0,readInteger(addressofxcoord))
writeInteger(x+4,readInteger(addressofycoord))
writeInteger(x+8,readInteger(addressofzcoord))
writeInteger(x+12,readInteger(addressofhealth))
writeInteger(x+16,readInteger(addressofammo))
and in the other CE read out the memory
xcoord=readInteger(x+0)
ycoord=readInteger(x+4)
zcoord=readInteger(x+8)
health=readInteger(x+12)
ammo=readInteger(x+16)
and write them where you wish
_________________
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 |
|
|
LastExceed Expert Cheater Reputation: 1
Joined: 05 Nov 2014 Posts: 130
|
Posted: Thu Mar 19, 2015 10:19 am Post subject: |
|
|
Dark Byte wrote: | Design a structure layout containing all the data you wish to share.
e.g:
0:x
4:y
8:z
12:health
16:ammo
Then use a timer in one CE that reads the addresses you're interested in into x
e.g:
writeInteger(x+0,readInteger(addressofxcoord))
writeInteger(x+4,readInteger(addressofycoord))
writeInteger(x+8,readInteger(addressofzcoord))
writeInteger(x+12,readInteger(addressofhealth))
writeInteger(x+16,readInteger(addressofammo))
and in the other CE read out the memory
xcoord=readInteger(x+0)
ycoord=readInteger(x+4)
zcoord=readInteger(x+8)
health=readInteger(x+12)
ammo=readInteger(x+16)
and write them where you wish |
To make it easier I am trying to sync the xcoord and the zcoord of the same process (yes i know that this makes no sense for gameplay and i also know that there is a way easier way to do it but i want to learn this method)
Code: | x=allocateSharedMemory("testblock", 4096)
writeInteger(x+0,readInteger(20D05D50))
zcoord=readInteger(x+0)] |
After executing this I got an error
Script Error:[string "x=allocateSharedMemory("testblock", 4096)..."]:2: malformed number near '20D05D50'
so i tried some stuff and ended up putting the address into " " (idk if this makes sense, as i said i'm new to lua scripting and just tried random stuff until the error dissapeared)
now when i execute the code nothing happens. What do i have to do?
imgur com/ZtsNCrM.png
|
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
|
|