/<
function isf(an,c,num)
local p1 = 0
local nc = 0
while an ~= "" do
p1 = string.find(an,num,p1+1)
if p1 == NULL then
break
end
nc = nc + 1
end
return nc == c
end
function selectanswer(n,ii)
local p1 = 0
local s = ""
for i=1,ii,1 do
p1,_,s = string.find(n,"点击我/(@[^>]+)>",p1+1)
if p1 == NULL then
break
end
end
if s ~= "" and s ~= NULL then
选择(s)
等待(2000)
end
end
function 过验证()
local n = 获取NPC对话内容()
local ii = 0
local pos = 0
if string.find(n,"找出以下几组数据中") ~= NULL then
_,_,a,b = string.find(n,"里面有%s*(%d)%s*个%s*(%d)")
a1 = tonumber(a)
if a ~= NULL and b ~= NULL then
while n ~= "" do
ii = ii + 1
pos,_,an = string.find(n,"答案%d:(%d+)/",pos+1)
if pos == NULL or an == NULL then
break
end
if isf(an,a1,b) then
selectanswer(n,ii)
break
end
end
end
end
end
过验证() -- 回收验证保留此行,删除下面一行
设置用户检测("过验证",2000) -- 脱机验证保留此行,删除上面一行
/>
上一篇:简单辅助选择唯一的选项_脚本验证