View previous topic :: View next topic |
Author |
Message |
memorasus Newbie cheater Reputation: 0
Joined: 27 Sep 2016 Posts: 19
|
Posted: Tue Sep 27, 2016 2:12 pm Post subject: [HELP] speed up / optimize lua aob scan? |
|
|
I have a script that I have to run a couple times a game and in the script i'm using the AOBScan function. My issue is, it's very slow, and when it's running the other cheats i have enabled stop working. Is there anyway to optimize it or speed it up?
|
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 458
Joined: 09 May 2003 Posts: 25288 Location: The netherlands
|
Posted: Tue Sep 27, 2016 2:19 pm Post subject: |
|
|
run them in a separate thread
Code: |
function threadedAOBScan(t)
local r=AOBScan(YOURAOB)
--do something with the results
r.destroy()
end
createNativeThread(threadedAOBScan)
|
_________________
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 |
|
|
memorasus Newbie cheater Reputation: 0
Joined: 27 Sep 2016 Posts: 19
|
Posted: Tue Sep 27, 2016 2:28 pm Post subject: |
|
|
You're a genius. Thank you
|
|
Back to top |
|
|
ByTransient Expert Cheater Reputation: 5
Joined: 05 Sep 2020 Posts: 240
|
Posted: Mon May 10, 2021 5:33 pm Post subject: |
|
|
Dark Byte wrote: | run them in a separate thread
Code: |
function threadedAOBScan(t)
local r=AOBScan(YOURAOB)
--do something with the results
r.destroy()
end
createNativeThread(threadedAOBScan)
|
|
DB, is it possible for you to fill in the "--do something with the results" section of this code uniquely for you?
Many of the examples I use have a "for" loop and it slows down the code too much.
When you find the "AobScan" code, is there a chance to change it one-to-one without entering a for loop?
Note: There will be between 40 and 2000 results in the scan.]
|
|
Back to top |
|
|
TheyCallMeTim13 Wiki Contributor Reputation: 50
Joined: 24 Feb 2017 Posts: 976 Location: Pluto
|
Posted: Mon May 10, 2021 5:55 pm Post subject: |
|
|
ByTransient wrote: | Dark Byte wrote: | run them in a separate thread
Code: |
function threadedAOBScan(t)
local r=AOBScan(YOURAOB)
--do something with the results
r.destroy()
end
createNativeThread(threadedAOBScan)
|
|
DB, is it possible for you to fill in the "--do something with the results" section of this code uniquely for you?
Many of the examples I use have a "for" loop and it slows down the code too much.
When you find the "AobScan" code, is there a chance to change it one-to-one without entering a for loop?
Note: There will be between 40 and 2000 results in the scan.] |
Try unique AOB patterns. Or if you know it's always the same index you can use that.
Code: |
result = AOBScan(strSignature, aobSignaturePrivileges)
if result == nil then
local msg = string.format('AOB pattern not found: "%s"', strSignature)
error(msg)
elseif result.Count >= 1 then
local aobAddr = result[index]
result.destroy()
if type(aobAddr) == 'string' then
aobAddr = tonumber(aobAddr, 16)
end
return aobAddr
end |
_________________
|
|
Back to top |
|
|
ByTransient Expert Cheater Reputation: 5
Joined: 05 Sep 2020 Posts: 240
|
Posted: Mon May 10, 2021 6:19 pm Post subject: |
|
|
I could not see the replacement section in the code.
No problem traumatizing, is there anything to change without the "for" loop?
Aob is not unique, it finds between 40-2000 scans.
This is the results listed up to 2000 of different versions of the same type of item in the game.
Thanks for the answer. It will enable to broaden the subject ..
|
|
Back to top |
|
|
|