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 


LUA AOBScan with variable start and end address?

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

Joined: 15 Mar 2012
Posts: 81

PostPosted: Sat May 25, 2013 4:46 am    Post subject: LUA AOBScan with variable start and end address? Reply with quote

Hi.

Is it possible to create a AOBScan with variable start and end address?
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 470

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

PostPosted: Sat May 25, 2013 4:50 am    Post subject: Reply with quote

you'll need to use the memscan class for that and fill in the range parameters
_________________
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
sir-gunny
Advanced Cheater
Reputation: 0

Joined: 15 Mar 2012
Posts: 81

PostPosted: Sat May 25, 2013 5:11 am    Post subject: Reply with quote

Hi DB.

Does it work that way?
Code:
function MyAOBScanSE()
local StartAddress = string.format("%08X",readInteger(getAddress("pMyBasePointer"))+0x19))--my start pointer
local EndAddress = StartAddress + 0x1024
loacl MyMemscan = createMemScan()
memscan_returnOnlyOneResult(MyMemscan, true)
memscan_firstScan(MyMemscan,soExactValue,vtByteArray,01 12 00 10 00 01 01,StartAddress,EndAddress)
local MyResult = memscan_getOnlyResult(MyMemscan)
showMessage(MyResult)
end
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 470

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

PostPosted: Sat May 25, 2013 5:38 am    Post subject: Reply with quote

Like that yes, but you need to make it wait till the scan is done
So after the firstscan command and before you get the result add this
Code:

memscan_waitTillDone(MyMemscan)


and put the byte array in a string

and fill in all the parameters for firstscan

Quote:

memscan_firstScan(memscan, scanoption, vartype, roundingtype, input1, input2 ,startAddress ,stopAddress ,protectionflags ,alignmenttype ,"alignmentparam" ,isHexadecimalInput ,isNotABinaryString, isunicodescan, iscasesensitive)

so

something like this:
Code:

memscan_firstScan(MyMemscan,soExactValue,vtByteArray,0, "01 12 00 10 00 01 01", "",StartAddress,EndAddress, "*X*W*C", 0, "", true, true,false, false)

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

Joined: 15 Mar 2012
Posts: 81

PostPosted: Sat May 25, 2013 6:18 am    Post subject: Reply with quote

Hi Dark Byte.

It works PERFECT!!!

You are the BEST!! Smile


BIIIIG THX Smile
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking 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