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 


Creating a script

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

Joined: 26 Jul 2015
Posts: 4

PostPosted: Sun Jul 26, 2015 2:42 am    Post subject: Creating a script Reply with quote

I am trying to create a script that when activated it will automatically search the a AOB im looking for and replace all results of the AOB i was looking for with a different AOB.











(im new to this, help me)
Back to top
View user's profile Send private message
Zanzer
I post too much
Reputation: 126

Joined: 09 Jun 2013
Posts: 3278

PostPosted: Sun Jul 26, 2015 6:08 am    Post subject: Reply with quote

Code:
[ENABLE]
{$lua}
aob_replace = {0x90, 0x90, 0x90, 0x90}
aob_original = {0x48, 0x83, 0xEC, 0x28}
aob = AOBScan("48 83 EC 28 E8 * * * * 48")
for i=0, aob.Count-1 do
  writeBytes(aob[i], unpack(aob_replace))
end
{$asm}
[DISABLE]
{$lua}
for i=0, aob.Count-1 do
  writeBytes(aob[i], unpack(aob_original))
end
aob.Destroy()
aob = nil
{$asm}
Back to top
View user's profile Send private message
DiegoS
How do I cheat?
Reputation: 0

Joined: 26 Jul 2015
Posts: 4

PostPosted: Sun Jul 26, 2015 2:21 pm    Post subject: Reply with quote

Zanzer wrote:
Code:
[ENABLE]
{$lua}
aob_replace = {0x90, 0x90, 0x90, 0x90}
aob_original = {0x48, 0x83, 0xEC, 0x28}
aob = AOBScan("48 83 EC 28 E8 * * * * 48")
for i=0, aob.Count-1 do
  writeBytes(aob[i], unpack(aob_replace))
end
{$asm}
[DISABLE]
{$lua}
for i=0, aob.Count-1 do
  writeBytes(aob[i], unpack(aob_original))
end
aob.Destroy()
aob = nil
{$asm}


Thanks for the reply, but how would i go about doing this for multiply AOB codes

after testing the code i get a error
[string "[ENABLE"]..."]:1: unexpected symbol near '['
Back to top
View user's profile Send private message
DaSpamer
Grandmaster Cheater Supreme
Reputation: 52

Joined: 13 Sep 2011
Posts: 1578

PostPosted: Sun Jul 26, 2015 2:51 pm    Post subject: Reply with quote

open auto assemble, put the code in, in the menu file-> add to table or something like that.. then try to freeze the address..
_________________
HEY Hitler
Do you get lazy when making trainers?
Well no more!
My CETrainer will generate it for you in seconds, so you won't get lazy! Very Happy

http://forum.cheatengine.org/viewtopic.php?t=564919
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 457

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

PostPosted: Sun Jul 26, 2015 4:07 pm    Post subject: Reply with quote

or just get rid of the AA parts and apply it to your lua script file
_________________
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
DiegoS
How do I cheat?
Reputation: 0

Joined: 26 Jul 2015
Posts: 4

PostPosted: Sun Jul 26, 2015 4:29 pm    Post subject: Reply with quote

What do you mean AA part?
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 457

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

PostPosted: Sun Jul 26, 2015 4:30 pm    Post subject: Reply with quote

this is the script you're interested in
Code:

aob_replace = {0x90, 0x90, 0x90, 0x90}
aob_original = {0x48, 0x83, 0xEC, 0x28}
aob = AOBScan("48 83 EC 28 E8 * * * * 48")
for i=0, aob.Count-1 do
  writeBytes(aob[i], unpack(aob_replace))
end


the rest was auto assembler script to use in a table

_________________
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
DiegoS
How do I cheat?
Reputation: 0

Joined: 26 Jul 2015
Posts: 4

PostPosted: Sun Jul 26, 2015 4:31 pm    Post subject: Reply with quote

thanks
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