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 


Scanning values w/ lua table.

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

Joined: 05 Mar 2015
Posts: 3

PostPosted: Thu Mar 05, 2015 4:11 pm    Post subject: Scanning values w/ lua table. Reply with quote

Please help, I need to scan a string: 3.6 and change all the results to 40.6 when I press `. How would I do that with the lua table?
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 458

Joined: 09 May 2003
Posts: 25288
Location: The netherlands

PostPosted: Fri Mar 06, 2015 5:40 am    Post subject: Reply with quote

this lua script will do that
Code:

ms=createMemScan()
ms.firstScan(soExactValue,vtString,0,"3.6","",0, 0xffffffffffffffff, "", fsmNotAligned, "1", false, false, false, false)
ms.waitTillDone()

f=createFoundList(ms);
f.initialize();

resultToWrite=stringToByteTable("40.6"..string.char(0))

for i=0,f.Count-1 do
  writeString(f.Address[i], "40.6")
  writeBytes(("0x"..f.Address[i])+4,0)
end

f.destroy()
ms.destroy()

_________________
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
View user's profile Send private message MSN Messenger
intactabid
How do I cheat?
Reputation: 0

Joined: 05 Mar 2015
Posts: 3

PostPosted: Fri Mar 06, 2015 9:16 am    Post subject: Reply with quote

Dark Byte wrote:
this lua script will do that
Code:

ms=createMemScan()
ms.firstScan(soExactValue,vtString,0,"3.6","",0, 0xffffffffffffffff, "", fsmNotAligned, "1", false, false, false, false)
ms.waitTillDone()

f=createFoundList(ms);
f.initialize();

resultToWrite=stringToByteTable("40.6"..string.char(0))

for i=0,f.Count-1 do
  writeString(f.Address[i], "40.6")
  writeBytes(("0x"..f.Address[i])+4,0)
end

f.destroy()
ms.destroy()


Wow, thanks!
Back to top
View user's profile Send private message
ftsouza
How do I cheat?
Reputation: 0

Joined: 26 Mar 2015
Posts: 1

PostPosted: Thu Mar 26, 2015 1:46 pm    Post subject: Reply with quote

Dark Byte, please check if it is possible to use the same codes for 4 bytes values types, not strings.
what should I replace "vtString" & "writeString" for?

I need to find 10 values (4Bytes types, exact value) and change it to value "16".

10 values example:
1006
20006
320006
4320006
23456
1000236
19200006
11232006
86406
57606

and need to change them to "16" value. Using 6.4 version of software, WIN7 x64.

thanks


Dark Byte wrote:
this lua script will do that
Code:

ms=createMemScan()
ms.firstScan(soExactValue,vtString,0,"3.6","",0, 0xffffffffffffffff, "", fsmNotAligned, "1", false, false, false, false)
ms.waitTillDone()

f=createFoundList(ms);
f.initialize();

resultToWrite=stringToByteTable("40.6"..string.char(0))

for i=0,f.Count-1 do
  writeString(f.Address[i], "40.6")
  writeBytes(("0x"..f.Address[i])+4,0)
end

f.destroy()
ms.destroy()
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