mitosu7410 How do I cheat?
Reputation: 0
Joined: 31 Oct 2022 Posts: 7
|
Posted: Tue Apr 04, 2023 3:18 am Post subject: How to update an address stored in a variable automatically? |
|
|
I want to update an address stored in a variable automatically.
Here is my CT.
Code: |
[ENABLE]
{$lua}
function table.copy(t)
local u = { }
for k, v in pairs(t) do u[k] = v end
return setmetatable(u, getmetatable(t))
end
if syntaxcheck then return end
FirstMonsAdd = readBytes("[Cemu.exe+1306438]+02e5caa24",4,true)
temp1 = table.copy(FirstMonsAdd)
FirstMonsAdd[1] = temp1[4]
FirstMonsAdd[2] = temp1[3]
FirstMonsAdd[3] = temp1[2]
FirstMonsAdd[4] = temp1[1]
FirstMonsAddOut = byteTableToDword(FirstMonsAdd)
[DISABLE]
|
This is used for Monster Hunter 3G by Cemu, WiiU emulator.
Function "table.copy" is for converting an address ordered by big endian into little endian in order to use the address with Cheat Engine.
I use this script to show monster's HP.
A value stored at [Cemu.exe+1306438]+02e5caa24 has monster's information address.
HP address is located at $CemuBase+$FirstMonsAddOut+8B8
($CemuBase is a base address of an Cemu emulator)
Problem is that I have to reenable this script every time when target monster is changed since every monster has different address.
I want to make an address of "FirstMonsAddOut" update automatically.
How can I do that?
|
|