Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Copy values to new addresses?

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine
View previous topic :: View next topic  
Author Message
oddgamer
Advanced Cheater
Reputation: 0

Joined: 19 Jan 2013
Posts: 58

PostPosted: Fri Mar 23, 2018 5:07 pm    Post subject: Copy values to new addresses? Reply with quote

I've got a very, very long list of addresses that I'd like to copy the values of to a different list of addresses (equally long). Not always, just in this case. Is there a way to copy the values without doing it manually?

Example:
Address Value
00000A 1
00000C 87
00000D 41
00000E 23
00000F 83

00001A 0
00001C 0
00001D 0
00001E 0
00001F 0

I want 1A to be 1 (same as 0A), 1B to be 87, 1C to be 41, and so on. (The above is a sample, I've got about 60 such values, and I have to make three copies of them).
Back to top
View user's profile Send private message
FreeER
Grandmaster Cheater Supreme
Reputation: 53

Joined: 09 Aug 2013
Posts: 1091

PostPosted: Sat Mar 24, 2018 9:25 am    Post subject: Reply with quote

Well if they're all consecutive like that you can use the lua copyMemory function

Code:
copyMemory(sourceAddress: integer, size: integer, destinationAddress:integer SEMIOPTIONAL, Method:integer OPTIONAL):
  Copies memory from the given address to the destination address
  If no destinationAddress is given(or nil), CE will allocate a random address for you

  Method can be:
    nil/0: Copy from target process to target process
    1: Copy from target process to CE Memory
    2: Copy from CE Memory to target process
    3: Copy from CE Memory to CE Memory

  Returns the address of the copy on success, nil on failure


eg. open the lua engine window with ctrl+alt+shift+L or by opening the memory viewer and going to "tools -> lua engine window" (or ctrl+m followed by ctrl+l to open Memory Viewer then Lua Engine) and use something like

Code:
local totalBytes = elementSize * numElements -- set this to something that makes sense
local success = copyMemory(0xA, totalBytes, 0x1A) ~= nil
print(tostring(success)) -- print doesn't handle booleans to strings on it's own
and press the big execute button.


Alternatively you can add 0xA as an AoB with the proper length, copy the bytes, change the address to 0x1A, delete the bytes and paste the copied bytes.

_________________
https://github.com/FreeER/ has a few CE related repos
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites