Files
metin2-client/tools/server/ava2-followup/ava2_travel.quest
T

64 lines
2.9 KiB
Plaintext

-- Generated by generate.py; UTF-8, compiled as GBK by install.py.
quest ava2_travel begin
state start begin
function destinations()
return {
{"法老沙漠", 653000, 2393700, 105, false},
{"元素圣地", 932000, 410700, 105, false},
{"东间平原", 1062900, 476700, 105, false},
{"西间荒原", 1214200, 478100, 105, false},
{"南间深渊", 1277600, 440700, 105, false},
{"皇城", 537500, 493000, 105, false},
{"晨雾地下城", 816700, 1505000, 105, false},
{"赤龙巢穴入口", 736200, 623900, 110, true},
{"冰雪地下城入口", 431700, 164100, 90, true},
{"九头蛇船防入口", 1107600, 1782700, 100, true},
}
end
function menu()
local destinations = ava2_travel.destinations()
local page = 1
while true do
local first = (page-1)*5+1
local last = math.min(first+4,table.getn(destinations))
local options = {}
for i=first,last do table.insert(options,destinations[i][1]) end
local count = table.getn(options)
local previous = 0
local following = 0
if page>1 then table.insert(options,"上一页") previous=table.getn(options) end
if last<table.getn(destinations) then table.insert(options,"下一页") following=table.getn(options) end
table.insert(options,"关闭")
say_title("新地图与副本入口")
local choice=select_table(options)
if choice==table.getn(options) then return
elseif previous>0 and choice==previous then page=page-1
elseif following>0 and choice==following then page=page+1
elseif choice>=1 and choice<=count then
local target=destinations[first+choice-1]
say_title(target[1])
if pc.get_level()<target[4] then
say("需要等级:"..target[4])
return
end
if target[5] then
say("传送到入口 NPC 附近。")
say("门票、组队及冷却仍由原副本检查。")
end
if select("传送","取消")==1 then
if not pc.can_warp() then
say("当前不能传送,请稍后再试。")
return
end
pc.warp(target[2],target[3])
end
return
end
end
end
when 9012.chat."新地图与副本入口" or 20090.chat."新地图与副本入口" begin
ava2_travel.menu()
end
end
end