BytePatch(label, pattern)
BytePatch Class: .Add(Raw Address, {table})
.Apply()
.Restore()
.Toggle(bool)
.is_valid() - returns bool
Parameters:
address(uintptr_t): address.{}(array): array of bytes.
Returns:
Handlereturns BytePatch handle.
Test_Patch = nil
Memory.Scan("TEST", "56 57 53 48 81 EC ? ? ? ? 44 0F 29 94 24 ? ? ? ? 44 0F 29 4C 24 ? 44 0F 29 44 24 ? 0F 29 7C 24 ? 0F 29 74 24 ? 89 D3",
function(addr)
log.info(string.format("address of global: 0x%X", addr.Raw))
Test_Patch = BytePatch.Add(addr.Raw, { 0xB0, 0x00, 0xC3 })
end
)
ImGui.register_draw(function()
if ImGui.Begin("Test Window", menu.is_open()) then
value, pressed =ImGui.Checkbox("Test", value)
if pressed then
if Test_Patch and Test_Patch.is_valid() then
Test_Patch.Toggle(value)
log.info("Patch toggled: " .. tostring(value))
end
end
ImGui.End()
end
end)Last updated
