jgoemat Master Cheater
Reputation: 23
Joined: 25 Sep 2011 Posts: 266
|
Posted: Wed Jul 22, 2026 1:51 am Post subject: Quick script for mono statics |
|
|
Just wrote an autoassembler lua script to find and create children for static fields on a class. This is for 'Keep on Mining' and has some values affecting the pick.
| Code: |
[enable]
{$lua}
if syntaxcheck then return end
local namespaceName = ""
local className = "TheAnvil"
local fields = {
equippedMineTime = vtSingle,
equippedMinePower = vtSingle,
equipped2XChance = vtSingle,
equippedMiningArea = vtSingle,
collTime = vtSingle
}
LaunchMonoDataCollector()
local addressList = getAddressList()
-- remove existing children
while memrec.Count > 0 do
memrec[0].destroy()
end
function addMemoryRecord(address, name, recordType)
local entry = addressList.createMemoryRecord()
entry.Description = name
entry.Type = recordType
entry.Address = address
entry.Parent = memrec
end
local class = mono_findClass(namespaceName, className)
local baseAddress = mono_class_getStaticFieldAddress(mono_enumDomains()[1], class)
for i,f in ipairs(mono_class_enumFields(class)) do
if f.isStatic and fields[f.name] ~= nil then
addMemoryRecord(baseAddress + f.offset, f.name, fields[f.name])
end
end
{$asm}
[disable]
{$lua}
if syntaxcheck then return end
-- destroy children
while memrec.Count > 0 do
memrec[0].destroy()
end
{$asm}
|
|
|