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 


How to use AOB in AutoAssembler script??

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine
View previous topic :: View next topic  
Author Message
Sohail__Saha
Advanced Cheater
Reputation: 0

Joined: 21 May 2014
Posts: 82
Location: India

PostPosted: Sat Sep 20, 2014 4:16 am    Post subject: How to use AOB in AutoAssembler script?? Reply with quote

I have the array of bytes of an address. Now, I want to make a AutoAssembler script which if I enable will increase the value stored at the address (whose array of bytes I have found) by 500. Is it possible?? If yes, can anyone give the code??
_________________
Don't underestimate the power of a common code.
Laughing
Back to top
View user's profile Send private message Visit poster's website
Dark Byte
Site Admin
Reputation: 458

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

PostPosted: Sat Sep 20, 2014 5:01 am    Post subject: Reply with quote

here is an example 'autoassembler' script that increases a value by 500 when it's enabled (not when it's disabled)

It works on the tutorial and changes the entry point's mov ecx,........ line

Code:

//everything outside of the enable/disable sections get execurted every single time
{$lua}
function FindOneAob(find)
  local result
  local ms=createMemScan()
  ms.OnlyOneResult=true
  ms.firstScan(soExactValue, vtByteArray, rtTruncated, find,'',0,0xffffffffffffffff,'*W*X*C', fsmNotAligned,'1', true, false, false, false)
  ms.waitTillDone()
  result=ms.Result

  ms.destroy()

  return result
end
{$asm}

//in this case only trigger when it's enabled, but you could put it out here as well

[enable]
{$lua}
if syntaxcheck then return end --don't execute on file->assign to cheat table

local address=FindOneAob("c6 05 f0 f4 54 00 00 b9 ** ** ** ** ba 04 90")
local actualaddress=address+8; --whatever offset in the aob

fullAccess(actualaddress, 4)
writeInteger(actualaddress, readInteger(actualaddress)+500)
{$asm}

[disable]
//do nothing I guess, or decrease by 500, or whatever you like



I've attached an example table



example.ct
 Description:

Download
 Filename:  example.ct
 Filesize:  1.33 KB
 Downloaded:  805 Time(s)


_________________
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
Sohail__Saha
Advanced Cheater
Reputation: 0

Joined: 21 May 2014
Posts: 82
Location: India

PostPosted: Sat Sep 20, 2014 12:47 pm    Post subject: Reply with quote

I know nothing of Lua, Asm, and all that stuff. Isn't there a simpler script?? You know, without Lua and Asm?? By the way, thanks for replying.
Very Happy Very Happy

_________________
Don't underestimate the power of a common code.
Laughing
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine 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