|
Cheat Engine The Official Site of Cheat Engine
|
View previous topic :: View next topic |
Author |
Message |
len1 How do I cheat? Reputation: 0
Joined: 02 Sep 2022 Posts: 3
|
Posted: Fri Sep 02, 2022 11:00 pm Post subject: How to get multiple addresses? |
|
|
[/code]
x=
function MyAobScan(Bytes)
local StartAddress=0;
local EndAddress=0x00007fffffffffff;
local Scan = createMemScan();
Scan.OnlyOneResult=true;
Scan.firstScan(soExactValue, vtByteArray, rtTruncated, Bytes, "", StartAddress, EndAddress, "", fsmNotAligned, "", true, false, false, false);
Scan.waitTillDone();
return Scan.getOnlyResult();
end
print(MyAobScan(x))
--this only can get one address
--i want to get multiple addresses through code like this
--
local found_list = getCurrentMemscan()
local addr_count = found_list.foundList:getCount()
for i = 0,addr_count - 1 do
local found_addr = getAddress(found_list.foundList:GetAddress(i))
print(found_addr)
end
[/code]
|
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 458
Joined: 09 May 2003 Posts: 25296 Location: The netherlands
|
Posted: Sat Sep 03, 2022 3:49 am Post subject: |
|
|
remove
Code: |
Scan.OnlyOneResult=true
|
and
Code: |
return Scan.getOnlyResult();
|
and then instead of using getCurrentMemscan use Scan
_________________
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 |
|
|
len1 How do I cheat? Reputation: 0
Joined: 02 Sep 2022 Posts: 3
|
Posted: Sat Sep 03, 2022 6:01 am Post subject: |
|
|
Dark Byte wrote: | remove
Code: |
Scan.OnlyOneResult=true
|
and
Code: |
return Scan.getOnlyResult();
|
and then instead of using getCurrentMemscan use Scan |
emmmm....
I tried.but print does not output any results,and pop-up ”attempt to call a nil value (global 'Scan')“.
then I deleted the print function, but the same error still popped up.
|
|
Back to top |
|
|
len1 How do I cheat? Reputation: 0
Joined: 02 Sep 2022 Posts: 3
|
Posted: Sun Sep 04, 2022 8:13 am Post subject: |
|
|
Dark Byte wrote: | remove
Code: |
Scan.OnlyOneResult=true
|
and
Code: |
return Scan.getOnlyResult();
|
and then instead of using getCurrentMemscan use Scan |
Thanks for you answer.I have found a solution.
Code: | function MyAobScan(Bytes)
memscan = createMemScan();
foundlist = createFoundList(memscan)
memscan.firstScan(soExactValue, vtByteArray, rtTruncated, Bytes, nil, 0, 0x00007fffffffffff, "", fsmNotAligned, "", true, false, false, false);
memscan.waitTillDone();
foundlist.initialize()
for i=0, foundlist.Count-1 do
getAddress(foundlist.Address[i])
print(foundlist.Address[i])
end
end
|
|
|
Back to top |
|
|
Y.A.K.E Advanced Cheater Reputation: 0
Joined: 15 Jul 2019 Posts: 51
|
Posted: Mon Sep 05, 2022 2:54 am Post subject: |
|
|
Code: |
-- author:panraven
-- https://forum.cheatengine.org/viewtopic.php?t=606262
function aobscanex( aob, p, a, n, s, e, pb )
local p, a, n, s, e = p or '*X*W', a or fsmNotAligned, n or '0', s or 0x0, e or 0xffffffffffffffff
local ms = pb and createMemScan( pb ) or createMemScan()
local fl = createFoundList( ms )
ms.firstScan( soExactValue, vtByteArray, nil, aob, nil, s, e, p, a, n, true, false, false, false )
ms.waitTillDone()
fl.initialize()
local result = nil
if fl ~= nil and fl.getCount() > 0 then
result = createStringlist()
for i = 1, fl.getCount() do result.add( fl.getAddress( i - 1 ) ) end
end
fl.destroy()
ms.destroy()
return result
end
|
use:
Code: |
local aob_str = '8B C? FF 5? * 8B'
local rList = aobscanex( aob_str, nil, nil, nil, getAddress( 'Game.GAME::LootItemTableRandomizer::LoadFromDatabase+A ' ), getAddress('Game.GAME::LootItemTableRandomizer::LoadFromDatabase+178 ' ) )
if rList.Count == 0 then
error ('error.')
return "assert (true)"
end
for i = 0,rList.Count-1 do
local aob_addr = rList[i]
print(aob_addr)
end
|
|
|
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
|
|