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 


I want a lua script that adds new addresses for me. Found it

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting
View previous topic :: View next topic  
Author Message
ZepherZaper
How do I cheat?
Reputation: 0

Joined: 18 Dec 2013
Posts: 6

PostPosted: Sat Apr 13, 2019 9:36 pm    Post subject: I want a lua script that adds new addresses for me. Found it Reply with quote

I want a script that will take and add addresses based off a address I already know.

I want to add a address offset for each address it adds

like if the address was 00000000 and I wanted to add the offset of 8 to make the address 00000008 and then again and again based off the number of times I want a offset added.

for instance if I wanted 853 offsets added then I would put that many and it would put 853 offsets each being 8 from the last address it added each offset being a address that gets written.

so that I keep the original address yet it wrights 853 new addresses for me so that I don't have to wright 853 new ones my self.

Found it.

function addMoreAddresses(baseAddress, num, step)
local al = getAddressList()

local base = al.createMemoryRecord()
base.setAddress(baseAddress)
base.setDescription("Cards")
base.Type = vt2Byte
base.String.Size = 0

for i=0, num-1 do
local rec = al.createMemoryRecord()
local str = string.format("+%X", i * step)
rec.setAddress(str)
rec.setDescription(str)
rec.appendToEntry(base)
end
end

addMoreAddresses("Base Address", Amount Of Addresses you want, Offset)
Back to top
View user's profile Send private message
condamor
Newbie cheater
Reputation: 0

Joined: 02 Jan 2017
Posts: 10

PostPosted: Thu Apr 25, 2019 4:59 pm    Post subject: Reply with quote

I appreciate you posting the solution!
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 Lua Scripting 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