rjhelms84 wrote: ↑Fri Apr 22, 2022 11:24 am
Darkness Muta wrote: ↑Fri Apr 22, 2022 10:34 am
For Mankind his AOB is
F6 00 8F 00 F6 00 58 0F 00 00 C6 3A 74 95 C6 3A 74 95 C6 3A 74 95 C6 3A 74 95 C6 3A 74 95 32 42 3D 79 00 01
and needs to become
F6 00 8F 00 F6 00 58 0F 00 00 C6 3A 74 95 C6 3A 74 95 C6 3A 74 95 C6 3A 74 95 C6 3A 74 95 32 42 3D 79 01 00
to unlock him as your script pops up an error for me. I can unlock Mankind manually by changing the last 2 sections but I am not sure how to do a lua script that changes the last 2 sections to the correct numbers so if someone knows how to do that it would be useful.
I don't think you need to change the last 2 sections, you just need to change the 00 to 01, but I can't remember what the byte after the unlock byte is now, been a while since I looked, so if you really want to change both the last 2 bytes, then just modify the writeBytes method to this:
writeBytes(tonumber(aobresult, 16) + 34,{0x1, 0x00})
The number 34 in this method refers to the number of bytes after the first byte of the data you searched from, if that is useful.
So this method will start overwriting memory 34 bytes after the starting F6 for mankind. And then with "{0x1, 0x00}" you can write it whatever byte data you want from this point.
Using the info you provided I tried this:
-- Mankind
aobresult = AOBScan("F6 00 8F 00 F6 00 58 0F 00 00 C6 3A 74 95 C6 3A 74 95 C6 3A 74 95 C6 3A 74 95 C6 3A 74 95 32 42 3D 79 00 01");
if (aobresult~=nil) then
print("Results found: "..aobresult.Count);
for i=0,aobresult.Count -1 do
writeBytes(tonumber(aobresult, 16) + 34,0x01, 0x00)
end
aobresult.destroy()
aobresult=nil
print("unlocked Mankind")
else
print("No results found")
end
and it pops up this error
Error:[string "-- Mankind..."]:9: bad argument #1 to 'tonumber' (string expected, got userdata)
I did have the Unlocks All.cem file already injected as of patch 1.08. I can manually activate Mankind doing the AOB search for F6 00 8F 00 F6 00 58 0F 00 00 C6 3A 74 95 C6 3A 74 95 C6 3A 74 95 C6 3A 74 95 C6 3A 74 95 32 42 3D 79 and then changing 00 01 to 01 00 but I cannot seem to figure out how to automate it with the Lua script update you provided. Just changing the first 00 to 01 does not unlock him that is why I think a lot of the previous posts are having the issue of Mankind not showing up or giving errors.
There are only a couple of guys that seem to be popping up errors when trying to do them via a Lua script, they are Mankind, Mustafa Ali '10 and Ric Flair '91 but they work fine if done manually. Adam Pearce is the last one I cannot figure out since his AOB does not seem to follow the same pattern as the others for the unlock.