
/<
lastmsg=""
function 过验证()
local str = 获取NPC对话框内容()
if lastmsg==str then return end
lastmsg=str
if str:match("选择正确[的]*答案") then
答题表 = { -- 题表开始
{问="7只猴",答="8只猴"},
{问="等于多少元宝",答="10000元宝"},
{问="比例是多少",答="1:4000"},
{问="12%+6",答="18"},
{问="5×6=",答="30"},
} -- 题表结束
local r = NULL
for k,v in ipairs(答题表) do
p = str:find(v.问)
if p ~= NULL then
r = v
break
end
end
local cmd = nil
if r then
local t = str:find(r.问)
if t then
cmd = str:match("<[^/]*"..r.答.."[^/]*/(@[^>]+)>",t)
end
end
if cmd then
选择(cmd)
等待(1500)
按键(13)
end
end
end
过验证() -- 回收验证保留此行,删除下面一行
设置用户检测("过验证",2000) -- 脱机验证保留此行,删除上面一行
/>