|
Cheat Engine The Official Site of Cheat Engine
|
View previous topic :: View next topic |
Author |
Message |
isaacay How do I cheat? Reputation: 0
Joined: 06 Nov 2015 Posts: 3
|
Posted: Fri Nov 06, 2015 11:46 pm Post subject: need help |
|
|
I have this aob scanner and it only prints the first address it finds even if there's more then one and so I need help making it show all address's with the aob
Code: | function scanAob(array)
result = nil
scan = createMemScan(true)
memscan_returnOnlyOneResult(scan, true)
memscan_firstScan(scan, soExactValue, vtByteArray, rtTruncated, array, nil, 0x00000000, 0xFFFFFFFF, "*W", fsmNotAligned, nil, true, false, false, false)
memscan_waitTillDone(scan)
result = memscan_getOnlyResult(scan)
result = string.format("%x", result)
result = ("0"):rep(8-#result) .. result
return result
end
function CreateMenu(form, name)
local menu = form.getMenu().getItems()
local newItem = createMenuItem(menu)
newItem.Caption = name
menu.add(newItem)
return newItem
end
function CreateMenuChild(parent, caption, onclick)
local newItem = createMenuItem(parent)
parent.add(newItem)
newItem.Caption = ca ption
newItem.setOnClick(onclick)
return newItem
end
lMenu = CreateMenu(getMemoryViewForm(), "Test")
local Scanlist = {
["Speed"] = "?? ?? ?? 0? ?? ?? ?? 06 01 00 00 00 E2 30 57 C1";
}
local get = CreateMenuChild(lMenu, "Find", function()
getLuaEngine().show();
for i,v in next, Scanlist do
local r = scanAob(v);
if r then
print(i..": "..r);
else
print(i..": Failed! :(");
end
end
end)
|
|
|
Back to top |
|
|
Cake-san Grandmaster Cheater Reputation: 8
Joined: 18 Dec 2014 Posts: 541 Location: Semenanjung
|
|
Back to top |
|
|
isaacay How do I cheat? Reputation: 0
Joined: 06 Nov 2015 Posts: 3
|
Posted: Sat Nov 07, 2015 4:28 am Post subject: |
|
|
Cake-san wrote: | Seriously,I know nothing about Lua
All I had been using was this script provided by Dark Byte :
Code: |
{$lua}
function FindAOBEntryX(AOBToScan, entrynr)
local result=nil
local results=AOBScan(AOBToScan)
if results.Count>entrynr then
result=results[entrynr]
end
results.destroy();
return result
end
registersymbol("_ID", FindAOBEntryX("00 40 8F 40 D0 D7 ?? ?? FB FF FF FF 00 00 00 00",2))
|
I'm sorry if this is not the one that you're looking for
You might want to wait for other Masters that expertise in this field to reply to your post or you have to search the forum on your own. |
thanks for that i mofified it so it can find more then one without having to modify it and execute again
Code: | showMessage("once it scans all and prints all address's it will error")
aob = "?? ?? ?? ?? ?? ?? ?? 06 01 00 00 00 E2 30 57 C1"
local scannum = 0
function FindAOBEntryX(AOBToScan, entrynr)
local result=nil
local results=AOBScan(AOBToScan)
if results.Count>entrynr then
result=results[entrynr]
end
repeat
print("AOB Scan "..scannum..": "..result)
scannum = scannum + 1
registerSymbol( FindAOBEntryX(aob, scannum))
until result==nil
return result
end
registerSymbol( FindAOBEntryX(aob, scannum)) |
if anyone wants to do a code clean up to make it more efficient also i would also gladly appreciate the orignial code i put in this fourm to find more then the first affress if you do to code clean up of fixing the orignial code i put in this fourm please post it here
|
|
Back to top |
|
|
Zanzer I post too much Reputation: 126
Joined: 09 Jun 2013 Posts: 3278
|
Posted: Sat Nov 07, 2015 7:22 am Post subject: |
|
|
Just wanted to point out that your original script contained:
Code: | memscan_returnOnlyOneResult(scan, true) |
Not sure if the function name is descriptive enough for you, but
...that causes the memscan to return only one result.
|
|
Back to top |
|
|
isaacay How do I cheat? Reputation: 0
Joined: 06 Nov 2015 Posts: 3
|
Posted: Sat Nov 07, 2015 7:38 am Post subject: |
|
|
wow i never even saw that
btw my friend gave me it and so i never saw that when trying to modify it to work for more then one
|
|
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
|
|