Cheat Engine
The Official Site of Cheat Engine
FAQ
Search
Memberlist
Usergroups
Register
Profile
Log in to check your private messages
Log in
Cheat Engine Forum Index
->
General Discussions
->
Guests
Post a reply
Username
Subject
Message body
Emoticons
View more Emoticons
Font colour:
Default
Dark Red
Red
Orange
Brown
Yellow
Green
Olive
Cyan
Blue
Dark Blue
Indigo
Violet
White
Black
Font size:
Font size
Tiny
Small
Normal
Large
Huge
Close Tags
[quote="jeff.artik"]Hi, again some difficulties today ;) I'm trying to replace after a scan all "398EE33F" values (addresses always change) with another one: "8EE31840" When I do a manual scan, and I replace all results, it works. So I wanted to script it with LUA as much as I can (and after few hours of search haha) Here is my script, but doesn't work: [code]--Scan local scan = createMemScan(true); scan.setOnlyOneResult(false); scan.firstScan(ms, soExactValue, vtDword, rtRounded, "398EE33F", nil, 0, 0xffffffffffffffff, "+W", fsmAligned, 4, true, false, false, false); scan.waitTillDone(); --Fetch result local FoundList=createFoundList(scan); FoundList.initialize(); --Overwite for i=0,FoundList.Count-1 do print(FoundList.Address[i]); writeBytes(FoundList.Address[i],"8EE31840"); end --Cleanup FoundList.deinitialize(); FoundList.destroy(); FoundList=nil; scan.destroy(); scan=nil;[/code] In my case I think my scan works (how to print results?) But then I suppose "writeBytes" is not correct. Help is welcome[/quote]
Options
HTML is
OFF
BBCode
is
ON
Smilies are
ON
Disable BBCode in this post
Disable Smilies in this post
All times are GMT - 6 Hours
Jump to:
Select a forum
Cheat Engine
----------------
Cheat Engine
Cheat Engine MacOS
Cheat Engine Lua Scripting
Cheat Engine Extensions
Cheat Engine Tutorials
General Gamehacking
Auto Assembler tutorials
Pointer tutorials
Game specific tutorials
Webbrowser stuff related tutorials
Console Modding
LUA Tutorials
General Discussions
----------------
General Discussions
Art
Computer Talk
Random spam
Art Requests
Art Tutorials
Willekeurige Rotzooi
Guests
Cheat Requests
----------------
Single player cheat request
Cheat Engine Downloads
----------------
Tables
Trainers
Auto Assemble scripts
Coding
----------------
Cheat Engine Source
CETC Server and Clients
DBVM
Plugin development
General programming
Binaries
Crackmes
General programming+
Game Development
2D Graphics
3D Modeling
Gameplay design
Web Development
Games
----------------
Flash Games
Gaia Online
Stick Arena
Hello Kitty Forums
----------------
Temp
Topic review
Author
Message
atom0s
Posted: Sun Jun 11, 2017 1:34 pm
Post subject:
writeBytes expects either an endless list of bytes or a table. You are giving it a string. Use writeInteger instead. The way you are printing the results should work fine. If you are not getting any results your scan may be off due to invalid protection flags.
Something else I noticed though is your firstScan call has extra parameters it shouldn't have.
Code:
firstScan(ms, soExactValue, ...
ms shouldn't be there.
jeff.artik
Posted: Sun Jun 11, 2017 9:17 am
Post subject: How to find and replace 4bytes values with another one ?
Hi, again some difficulties today
I'm trying to replace after a scan all "398EE33F" values (addresses always change) with another one: "8EE31840"
When I do a manual scan, and I replace all results, it works. So I wanted to script it with LUA as much as I can (and after few hours of search haha)
Here is my script, but doesn't work:
Code:
--Scan
local scan = createMemScan(true);
scan.setOnlyOneResult(false);
scan.firstScan(ms, soExactValue, vtDword, rtRounded, "398EE33F", nil, 0, 0xffffffffffffffff, "+W", fsmAligned, 4, true, false, false, false);
scan.waitTillDone();
--Fetch result
local FoundList=createFoundList(scan);
FoundList.initialize();
--Overwite
for i=0,FoundList.Count-1 do
print(FoundList.Address[i]);
writeBytes(FoundList.Address[i],"8EE31840");
end
--Cleanup
FoundList.deinitialize();
FoundList.destroy();
FoundList=nil;
scan.destroy();
scan=nil;
In my case I think my scan works (how to print results?)
But then I suppose "writeBytes" is not correct. Help is welcome
Powered by
phpBB
© 2001, 2005 phpBB Group
CE Wiki
IRC (#CEF)
Twitter
Third party websites