|
发表于 2018-9-5 22:14:45
|
显示全部楼层
好/<
lastmsg=""
function 过验证()
local str=获取NPC对话内容()
if lastmsg==str then return end
lastmsg=str
if str:match("验证失败") then
local t1="ABCDEFGHIJK"
local t2="12345"
l,h=str:match("请选择[^{]+{([^/]+)行/FCOLOR=%d+} {第([^/]+)个/FCOLOR=")
local lp=t1:find(l);local hp=t2:find(h)
if not lp or not hp then return end
l=math.modf(lp/2)
h=math.modf(hp/2)
local c=h*11+l
local tc=0
for cmd in str:gmatch("%d+ /(@[^>]+)>",pos) do
if tc==c then
选择(cmd)
等待(1500)
break
end
tc=tc+1
end
end
end
过验证() -- 回收验证保留此行,删除下面一行
设置用户检测("过验证",2000) -- 脱机验证保留此行,删除上面一行
/>/<
lastmsg=""
function 过验证()
local str=获取NPC对话内容()
if lastmsg==str then return end
lastmsg=str
if str:match("验证失败") then
local t1="ABCDEFGHIJK"
local t2="12345"
l,h=str:match("请选择[^{]+{([^/]+)行/FCOLOR=%d+} {第([^/]+)个/FCOLOR=")
local lp=t1:find(l);local hp=t2:find(h)
if not lp or not hp then return end
l=math.modf(lp/2)
h=math.modf(hp/2)
local c=h*11+l
local tc=0
for cmd in str:gmatch("%d+ /(@[^>]+)>",pos) do
if tc==c then
选择(cmd)
等待(1500)
break
end
tc=tc+1
end
end
end
过验证() -- 回收验证保留此行,删除下面一行
设置用户检测("过验证",2000) -- 脱机验证保留此行,删除上面一行
/> |
|