etioplmld Advanced Cheater
Reputation: 0
Joined: 09 Feb 2021 Posts: 87
|
Posted: Mon Sep 28, 2026 9:12 am Post subject: Delete addresses in search results without accessed |
|
|
AI programming has become more powerful this year. With this tool, the code it gives in the web version is almost successful on the first try, with no errors; in the end, only some detail and window adjustments are needed. It is also familiar with all CE functions.if people ask AI before asking a question, and then share the answers AI gives. This can make modifying games easier.
| Code: |
f = createForm(true)
f.Position = poDesktopCenter
f.Width = 760
f.Height = 300
f.Caption = 'checkForAccess'
-- 当前检查地址
local lbAddress = createLabel(f)
lbAddress.Left = 40
lbAddress.Top = 35
lbAddress.Width = 680
lbAddress.Height = 45
lbAddress.Caption = '准备开始...'
local fontAddress = lbAddress.Font
fontAddress.Size = 22
fontAddress.Color = 0xff0000
-- 进度文字
local lbProgress = createLabel(f)
lbProgress.Left = 40
lbProgress.Top = 100
lbProgress.Width = 680
lbProgress.Height = 30
lbProgress.Caption = '进度:0 / 0'
local fontProgress = lbProgress.Font
fontProgress.Size = 16
-- 进度条
local progress = createProgressBar(f)
progress.Left = 40
progress.Top = 140
progress.Width = 680
progress.Height = 30
progress.Min = 0
progress.Max = 1
progress.Position = 0
-- 状态
local lbStatus = createLabel(f)
lbStatus.Left = 40
lbStatus.Top = 195
lbStatus.Width = 680
lbStatus.Height = 30
lbStatus.Caption = '状态:准备开始'
local fontStatus = lbStatus.Font
fontStatus.Size = 14
--------------------------------------------------
-- 检查调试器是否已经附加
--------------------------------------------------
if not debug_isDebugging() then
debugProcess()
end
--------------------------------------------------
-- FoundList
--------------------------------------------------
local fl = getMainForm().Foundlist3
local total = fl.Items.Count
local checkedCount = 0
-- 清除 FoundList 原来的选择
for i = 0, total - 1 do
fl.Items[i].Selected = false
end
--------------------------------------------------
-- 找到右键菜单里的 Remove selected addresses
--------------------------------------------------
local function getRemoveMenuItem(fl)
local pm = fl.PopupMenu
for i = 0, pm.Items.Count - 1 do
if pm.Items[i].Name == 'Removeselectedaddresses1' then
return pm.Items[i]
end
end
return nil
end
local miRemove = getRemoveMenuItem(fl)
assert(
miRemove,
'Remove selected addresses menu item not found'
)
--------------------------------------------------
-- 更新进度
--------------------------------------------------
local function updateProgress()
progress.Max = total
progress.Position = checkedCount
local percent = 0
if total > 0 then
percent = math.floor(checkedCount * 100 / total)
end
lbProgress.Caption =
string.format(
'进度:%d / %d (%d%%)',
checkedCount,
total,
percent
)
end
--------------------------------------------------
-- 逐个检查地址
--------------------------------------------------
local function checkAddress(i)
-- 全部检查完成
if i >= total then
lbAddress.Caption = '检查完成'
lbStatus.Caption = '状态:正在删除未访问地址...'
-- 删除所有没访问、已经被选中的地址
miRemove.DoClick()
lbStatus.Caption = '状态:完成'
lbProgress.Caption =
string.format(
'进度:%d / %d (100%%)',
checkedCount,
total
)
return
end
local address = fl.Items[i].Caption
local accessed = false
-- 显示当前地址
lbAddress.Caption = address
lbStatus.Caption = '状态:检查中...'
updateProgress()
--------------------------------------------------
-- 设置 Access Breakpoint
--------------------------------------------------
debug_setBreakpoint(
address,
1,
bptAccess,
function()
accessed = true
-- 继续运行目标程序
debug_continueFromBreakpoint(co_run)
return 0
end
)
--------------------------------------------------
-- 等待 1000毫秒
--------------------------------------------------
createTimer(500, function()
-- 1秒内没有访问
if not accessed then
fl.Items[i].Selected = true
end
-- 删除当前地址的 BP
debug_removeBreakpoint(address)
-- 完成数量 +1
checkedCount = checkedCount + 1
updateProgress()
-- 检查下一个
checkAddress(i + 1)
end)
end
--------------------------------------------------
-- 开始
--------------------------------------------------
if total == 0 then
lbAddress.Caption = '没有搜索结果'
lbProgress.Caption = '进度:0 / 0'
lbStatus.Caption = '状态:没有可检查的地址'
else
updateProgress()
checkAddress(0)
end
|
|
|