点击输入两位图片数字加减乘除结果
/<
lastmsg=""
function 过验证()
local str=获取NPC对话内容()
if lastmsg==str then return end
lastmsg=str
local tab={
{"加","+"},{"减","-"},{"乘","*"},{"除","/"},
{"+","+"},{"—","-"},{"×","*"},{"÷","/"},
{"[","("},{"]",")"},{"【","("},{"】",")"},
{"{","("},{"}",")"},{"<","("},{">",")"},
}
local function maskstr(str)
for k,v in ipairs(tab) do
if v[1]==str then return v[2] end
end
return str
end
if str:match("防脱机") then
local f=str:match("<Text:([^:]+):")
n1,n2=str:match("<ImgNum:2:(%d+):[^<]+<ImgNum:2:(%d+):")
local cmd=str:match("/(@@[^>]+)>")
local bds=nil
if f and n1 and n2 then
bds=n1..maskstr(f)..n2
end
local fn=nil
if bds then fn=load("return "..bds) end
if fn and cmd then
local res=tostring(fn())
res=res:match("(%d+)")
合成命令(cmd,res)
等待(1000)
end
end
end
过验证() -- 回收验证保留此行,删除下面一行
设置用户检测("过验证",2000) -- 脱机验证保留此行,删除上面一行
/>