/<
lastmsg=""
function 过验证()
local str=获取NPC对话内容()
if lastmsg==str then return end
lastmsg = str
local cmd = str:match("/(@移动完毕[^>]*)>")
while cmd do
dx,dy=str:match("<Img:%d+:%d+:(%d+):(%d+)>")
sx,sy=str:match("<PlayImg:%d+:%d+:%d+:%d+:(%d+):(%d+):%d+>")
bUP = str:match("/(@向上移动[^>]*)>")
bDOWN = str:match("/(@向下移动[^>]*)>")
bLEFT = str:match("/(@向左移动[^>]*)>")
bRIGHT = str:match("/(@向右移动[^>]*)>")
if not dx or not dy or not sx or not sy then return end
if not bUP or not bDOWN or not bLEFT or not bRIGHT then return end
if tonumber(sx) > tonumber(dx) then 选择(bLEFT)
elseif tonumber(sx) < tonumber(dx) then 选择(bRIGHT)
elseif tonumber(sy) > tonumber(dy)-17 then 选择(bUP)
elseif tonumber(sy) < tonumber(dy)-17 then 选择(bDOWN)
elseif tonumber(sx)==tonumber(dx) and tonumber(sy)==tonumber(dy)-17 then
选择(cmd)
break
end
等待(1000)
str=获取NPC对话内容()
end
end
过验证() -- 回收验证保留此行,删除下面一行
设置用户检测("过验证",2000) -- 脱机验证保留此行,删除上面一行
/>