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 


Cheat Engine Forum Index
PostGo back to topic
vng21092
Grandmaster Cheater
Reputation: 15
Joined: 05 Apr 2013
Posts: 644

PostPosted: Mon Oct 12, 2015 2:53 pm    Post subject: So... I made this

Hey guys, so I've been teaching myself some LUA, and thanks to the many of you that helped me out, I was able to make this function. I actually had it up before but it was quite broken at the time so I took it down, but now I think its pretty ok. It's just my own version of an AOB scan using LUA, with an added parameter. So the syntax is as follows:

lua_aobscan("aob_name","aob_module","aob",#)

1) aob_name is just what you want your aob to be called, the same as what you'd enter in aobscan(____,90 90 90 90) and registersymbol(____)

2) aob_module is the module name, here's the cool part, there is only one syntax for this function. If the aob_module field is left as "" then it will perform a normal LUA aobscan, but if you put in a module name however, it'll perform a LUA equivalent of the aobscanmodule (faster).

3) aob is just your array of bytes

4) My little touch of salt, an indexing function. Say you want a really specific injection point, but when you scan for the aob you get more than one result, and yours happens to not be the first on the list, or in some cases the aob is just not unique at all. You use this parameter to pick the one you want. If your aob IS unique, leave this a value of 1, but if your aob ISN'T unique and appears say, 4th on a list of aobs, you'd enter a value of 4.

This function registers the symbol for you automatically, and has some error prevention. If you mistyped the AOB, and it's not found, LUA will print a message saying it wasn't found. If you mis-type a module name, it will also print a error saying the module wasn't found. If everything is fine, it won't say anything. The errors print BEFORE you close the asm window, so you'd know something was wrong even before you assigned it to the cheat table, or before you close it from editing a current script.

Just a comparison of each:

normal aobscan:
Code:
[Enable]

aobscan(my_aob1,12 34 56 78)
registersymbol(my_aob1)

my aobscan:
Code:
[Enable]

luaCall(lua_aobscan("my_aob1","","12 34 56 78",1)

normal aobscanmodule:
Code:
[Enable]
aobscanmodule(my_aob1,module.exe,12 34 56 78)
registersymbol(my_aob1)

my aobscanmodule
Code:
[Enable]

luaCall(lua_aobscan("my_aob1","module.exe","12 34 56 78",1)

So all in all, you save ONE LINE OF CODE Shocked Throw this in your C.E "autorun" folder if you wanna play around with it, or just have it in case you might need it one day.


Last edited by vng21092 on Mon Oct 12, 2015 5:23 pm; edited 2 times in total
Back to top
View user's profile Send private message
Post reviews:   Approve 1
Author Review
Cielos
Review: Approve
Post reference:
ReviewPosted: Sun Dec 06, 2015 12:54 pm

thanks!
Back to top
View user's profile Send private message Visit poster's website
Display:  
Cheat Engine Forum Index


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites