|
Cheat Engine The Official Site of Cheat Engine
|
View previous topic :: View next topic |
Author |
Message |
jededias !BEWARE! Deletes post on answer Reputation: 0
Joined: 15 Apr 2017 Posts: 17
|
Posted: Sun May 07, 2017 4:42 pm Post subject: This lua script is right? // For AOB i need use what variabl |
|
|
Code: | function threadedAOBScan(t)
local r=AOBScan(48 43 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 80 BF)
scan.onScanDone = function(scan)
local fl = createFoundList(scan)
fl.initialize()
for i=0, fl.Count-1 do
writeDouble(fl.Address[i], 48 43 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 00 00 80 BF)
end
r.destroy()
end
createNativeThread(threadedAOBScan) |
What I put in writeDouble(fl.Address for aob?? writeAOB ? |
|
Back to top |
|
|
mgr.inz.Player I post too much Reputation: 218
Joined: 07 Nov 2008 Posts: 4438 Location: W kraju nad Wisla. UTC+01:00
|
Posted: Mon May 08, 2017 7:43 am Post subject: |
|
|
[quote="jededias"] Code: | function threadedAOBScan(t)
local r=AOBScan(48 43 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 80 BF)
scan.onScanDone = function(scan)
local fl = createFoundList(scan)
fl.initialize()
for i=0, fl.Count-1 do
writeDouble(fl.Address[i], 48 43 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 00 00 80 BF)
end
r.destroy()
end
createNativeThread(threadedAOBScan) |
For AOBScan you do not need FoundList object. _________________
|
|
Back to top |
|
|
Zanzer I post too much Reputation: 126
Joined: 09 Jun 2013 Posts: 3278
|
Posted: Mon May 08, 2017 4:12 pm Post subject: |
|
|
Need quotes around your AOB.
Code: | AOBScan("48 43 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 80 BF") |
You want to use writeBytes, not Double.
Lua hex notation starts with "0x".
Parameters are separated by a comma.
Code: | writeBytes(fl.Address[i], 0x48, 0x43, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xBF) |
|
|
Back to top |
|
|
jededias !BEWARE! Deletes post on answer Reputation: 0
Joined: 15 Apr 2017 Posts: 17
|
Posted: Sun May 14, 2017 7:20 pm Post subject: This is right? |
|
|
Code: | function threadedAOBScan(t)
local r=AOBScan("48 43 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 80 BF")
scan.onScanDone = function(scan)
writeBytes(fl.Address[i], 0x48, 0x43, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xBF)
end
r.destroy()
end
createNativeThread(threadedAOBScan) |
It's Right now? |
|
Back to top |
|
|
mgr.inz.Player I post too much Reputation: 218
Joined: 07 Nov 2008 Posts: 4438 Location: W kraju nad Wisla. UTC+01:00
|
Posted: Mon May 15, 2017 12:15 pm Post subject: |
|
|
Of course it is not OK. If you'll read information here on CEF (or read main.lua inside CE folder) you should understand.
AOBScan(aobstring) returns results as a StringList object containing all the results. If nothing found, it returns nil.
You are changing byte 23 from 0 to 1. So, offset is 22 decimal, 16 hexadecimal.
Code: | function threadedAOBScan(t)
local r=AOBScan("48 43 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 80 BF")
if r~=nil then
writeBytes( r[0]..'+16' , 1 )
r.destroy()
end
end
createNativeThread(threadedAOBScan) |
_________________
|
|
Back to top |
|
|
jededias !BEWARE! Deletes post on answer Reputation: 0
Joined: 15 Apr 2017 Posts: 17
|
Posted: Mon May 15, 2017 11:09 pm Post subject: mgr.inz.Player |
|
|
mgr.inz.Player is possible do a luascript button that scan text? for example:
On click: Scan TextONE and change to TextTWO
?? |
|
Back to top |
|
|
mgr.inz.Player I post too much Reputation: 218
Joined: 07 Nov 2008 Posts: 4438 Location: W kraju nad Wisla. UTC+01:00
|
Posted: Tue May 16, 2017 8:20 am Post subject: |
|
|
textOne and textTwo must be have the same length.
Code: | function threadedAOBScan(t, textOne, textTwo)
if (textOne and textTwo) and (#textOne==#textTwo) then
local r = AOBScan( unpack(stringToByteTable(textOne)) )
if r~=nil then
writeString( r[0] , textTwo )
r.destroy()
end
end
end
createNativeThread(threadedAOBScan, 'text one', 'text two') |
_________________
|
|
Back to top |
|
|
jededias !BEWARE! Deletes post on answer Reputation: 0
Joined: 15 Apr 2017 Posts: 17
|
Posted: Tue May 16, 2017 11:52 am Post subject: Same length |
|
|
only same length works?
TheTextOne
dont change to TheTextTwoOneHundredFive
? |
|
Back to top |
|
|
|
|
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
|
|