/<
function maskstr(str)
local t={www"0","1","2","3","4","5","6","7","8","9"}
for k,v in ipairs(t) do
str=str:gsub(v,tostring(k-1))
end
return str
end
function 过验证()
local str=获取NPC对话内容()
if not str:match("验证问题") then return end
str=maskstr(str)
local ask=str:match([[验证问题[^>]+>([^\]+)%-%-]])
if str:match("是几") then
ans=ask:match("(%d)<←/")
if not ans then
ans=ask:match("<→/[^>]+>(%d)")
end
elseif str:match("等于几") then
local nt=""
for v in ask:gmatch("<([%d,]+)[>/]") do
nt=nt..v
end
nt=nt:gsub(",","")
local nc=0
for i=1,#nt do
nc=nc+tonumber(nt:sub(i,i))
end
ans=tostring(nc)
elseif str:match("有几个") then
local msg=ask:match("([^←]+)[←]*")
if not msg then msg=ask:match("[→]*([^→]+)") end
if msg then
local nt=""
for v in msg:gmatch("<([%d,]+)[>/]") do
nt=nt..v
end
nt=nt:gsub(",","")
ans=tostring(#nt).."个"
end
end
if not ans then return end
local cmd=str:match(ans.."/(@[^>]+)>")
if not cmd then return end
选择(cmd)
等待(1500)
end
过验证() -- 回收验证保留此行,删除下面一行
设置用户检测("过验证",2000) -- 脱机验证保留此行,删除上面一行
/>
下一篇:简单辅助选择怪物方向_脚本验证