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 


writing to an array of byte

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

Joined: 27 Apr 2014
Posts: 3
Location: California

PostPosted: Sun Apr 27, 2014 12:39 pm    Post subject: writing to an array of byte Reply with quote

Ok so I'm trying to make a trainer-ish type thing and I want to know how to

do something like

writeAOB('Address',array of byes here)

But In the lua i didnt see anything like ^.

So how would I write to an array of bytes?
Back to top
View user's profile Send private message
Rydian
Grandmaster Cheater Supreme
Reputation: 31

Joined: 17 Sep 2012
Posts: 1358

PostPosted: Sun Apr 27, 2014 1:48 pm    Post subject: Reply with quote

This is the script template I generally use for scanning for an array of bytes and then overwriting them.

Code:
[ENABLE]
aobscan(nodamage, 2B C8 66 89 0D CC E6 49 00 8B 15 50 E6 49 00 81 E2 80 00 00 00 74 1C)
label(_nodamage)
registersymbol(_nodamage)

nodamage:
_nodamage:
db 90 90

[DISABLE]
_nodamage:
db 2B C8

unregistersymbol(_nodamage)


db means something akin to "write these bytes here", in some foreign witchcraft language.

You can see the section under ENABLE scans for the AOB and then overwrites just the first two bytes with 90 90, and then the DISABLE section (which is what's run when the cheat is unchecked) writes the original bytes back.

EDIT: Oh I misread and thought you wanted something that would find the address too, didn't think you already had the address.

_________________


Last edited by Rydian on Sun Apr 27, 2014 5:34 pm; edited 1 time in total
Back to top
View user's profile Send private message
justa_dude
Grandmaster Cheater
Reputation: 23

Joined: 29 Jun 2010
Posts: 893

PostPosted: Sun Apr 27, 2014 5:13 pm    Post subject: Re: writing to an array of byte Reply with quote

RektRalf wrote:
Ok so I'm trying to make a trainer-ish type thing and I want to know how to

do something like

writeAOB('Address',array of byes here)

But In the lua i didnt see anything like ^.

So how would I write to an array of bytes?


CE's built-in help wrote:

writeBytes(address, x,x,x,x,...) : Write the given bytes to the given address from a table

_________________
A nagy kapu mellett, mindig van egy kis kapu.
----------------------
Come on...
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