// 下面代码添加到简单辅助<脚本开始>下面
如果(人物[当前地图=Q003])->跳转[走验证]
// 上面代码添加到<脚本开始>下面
// 以下所有代码都添加到简单辅助挂机脚本最后
触发器(人物[当前地图=Q004])->跳转[走验证]
<走验证>
关闭触发器[]
/<
function 走验证()
等待(1000)
按键(13)
等待(500)
按键(13)
等待(500)
local NPC坐标={www 16,17 } -- 将这里改成正确的第一个NPC的坐标
local NPC坐标2={www 12,10 } -- 将这里改成正确的另外一个NPC的坐标
::H1::
-- ↓↓↓不需要点NPC查询坐标的话,删除下面代码↓↓↓
对话(NPC坐标[1],NPC坐标[2])
等待(1500)
if string.find(获取NPC对话内容(),"@查询坐标") then
选择("@查询坐标")
等待(1500)
按键(13)
等待(500)
按键(13)
等待(500)
end
-- ↑↑↑不需要点NPC查询坐标的话,删除上面代码↑↑↑
local function masknum(num)
local t = {www
{www"O","0"},{www"◎","0"},{www"○","0"},{www"①","1"},{www"②","2"},{www"③","3"},{www"④","4"},
{www"⑤","5"},{www"⑥","6"},{www"⑦","7"},{www"⑧","8"},{www"⑨","9"},{www"⑩","10"},
{www"㈠","1"},{www"㈡","2"},{www"㈢","3"},{www"㈣","4"},{www"㈤","5"},
{www"㈥","6"},{www"㈦","7"},{www"㈧","8"},{www"㈨","9"},{www"㈩","10"},
{www"?","1"},{www"?","2"},{www"?","3"},{www"?","4"},{www"?","5"},
{www"?","6"},{www"?","7"},{www"?","8"},{www"?","9"},{www"?","10"},
{www"⒈","1"},{www"⒉","2"},{www"⒊","3"},{www"⒋","4"},{www"⒌","5"},
{www"⒍","6"},{www"⒎","7"},{www"⒏","8"},{www"⒐","9"},{www"⒑","10"},
{www"⒒","11"},{www"⒓","12"},{www"⒔","13"},{www"⒕","14"},{www"⒖","15"},
{www"⒗","16"},{www"⒘","17"},{www"⒙","18"},{www"⒚","19"},{www"⒛","20"},
{www"⑴","1"},{www"⑵","2"},{www"⑶","3"},{www"⑷","4"},{www"⑸","5"},
{www"⑹","6"},{www"⑺","7"},{www"⑻","8"},{www"⑼","9"},{www"⑽","10"},
{www"⑾","11"},{www"⑿","12"},{www"⒀","13"},{www"⒁","14"},{www"⒂","15"},
{www"⒃","16"},{www"⒄","17"},{www"⒅","18"},{www"⒆","19"},{www"⒇","20"},
{www"0","0"},{www"1","1"},{www"2","2"},{www"3","3"},{www"4","4"},
{www"5","5"},{www"6","6"},{www"7","7"},{www"8","8"},{www"9","9"}
}
for k,v in ipairs(t) do num=num:gsub(v[1],v[2]) end
return num
end
local function getxy(str)
local rx=nil;local ry=nil
str=masknum(str)
rx,ry=str:match("[走站移动]到[^%d]*(%d+)[^%d]+(%d+)")
return rx,ry
end
local str=获取对话框内容()
x,y=getxy(str)
if not x or not y then
str=获取NPC对话内容()
str=str:gsub(">%d+次<,%d+次","")
str=str:gsub("/AUTOCOLOR=[^>]+>","")
x,y=getxy(str)
end
if x and y then
走到(x,y)
等待(1500)
对话(NPC坐标[1],NPC坐标[2])
等待(1500)
local cmd = string.match(获取NPC对话内容(),"/(@完成[^>]+)>")
if cmd then
选择(cmd)
等待(1500)
end
elseif NPC坐标[1] ~= NPC坐标2[1] then
-- 获取不到坐标,尝试更换NPC再试一次。
NPC坐标[1] = NPC坐标2[1]
NPC坐标[2] = NPC坐标2[2]
goto H1
end
end
走验证()
/>
开启触发器[]
跳转[脚本开始]
[点击查看原图]
以上内容 简单挂官网原创:www.a1904.com 转载请注明来源!