Files
metin2-client/tools/server/ring-warp/ring_warp.quest
T

159 lines
14 KiB
Plaintext

-- Generated by generate.py from maps.json. Do not edit by hand.
-- UTF-8 source; install.sh compiles GBK for the 203 server.
quest ring_warp begin
state start begin
function destinations()
return {
{name = "各国村庄", maps = {
{id = 1, name = "盛唐国一村", x = 469300, y = 964200, mode = "direct", note = ""},
{id = 3, name = "盛唐国二村", x = 363000, y = 875200, mode = "direct", note = ""},
{id = 21, name = "秦皇国一村", x = 55700, y = 157900, mode = "direct", note = ""},
{id = 23, name = "秦皇国二村", x = 137800, y = 234600, mode = "direct", note = ""},
{id = 41, name = "周武国一村", x = 969600, y = 278400, mode = "direct", note = ""},
{id = 43, name = "周武国二村", x = 877400, y = 253700, mode = "direct", note = ""},
}},
{name = "野外地图", maps = {
{id = 61, name = "舒寒山", x = 435200, y = 230400, mode = "direct", note = ""},
{id = 62, name = "导炎大地", x = 665600, y = 691200, mode = "direct", note = ""},
{id = 63, name = "影悲沙漠", x = 281600, y = 563200, mode = "direct", note = ""},
{id = 64, name = "升龙谷", x = 323500, y = 806900, mode = "direct", note = ""},
{id = 65, name = "鬼族寺院", x = 553700, y = 145000, mode = "direct", note = ""},
{id = 67, name = "幽灵森林", x = 290100, y = 5700, mode = "direct", note = ""},
{id = 68, name = "红森林", x = 1119600, y = 70000, mode = "direct", note = ""},
{id = 69, name = "巨人荒地", x = 1058800, y = 725800, mode = "direct", note = ""},
{id = 70, name = "蛇之领域", x = 827700, y = 763400, mode = "direct", note = ""},
{id = 301, name = "龙头海角", x = 1104800, y = 1788800, mode = "direct", note = ""},
{id = 302, name = "迷雾森林", x = 1225700, y = 1682000, mode = "direct", note = ""},
{id = 303, name = "黑沙海湾", x = 1087900, y = 1649800, mode = "direct", note = ""},
{id = 304, name = "雷鸣山脉", x = 1134100, y = 1655400, mode = "direct", note = ""},
}},
{name = "洞穴与副本", maps = {
{id = 5, name = "盛唐国猴洞", x = 775200, y = 447700, mode = "direct", note = ""},
{id = 25, name = "秦皇国猴洞", x = 852000, y = 447700, mode = "direct", note = ""},
{id = 45, name = "周武国猴洞", x = 928800, y = 447700, mode = "direct", note = ""},
{id = 66, name = "恶鬼塔", x = 590800, y = 110800, mode = "entrance", note = "将传送到恶鬼塔守卫附近,请与守卫交谈入场。"},
{id = 71, name = "蜘蛛洞二层", x = 92400, y = 525500, mode = "entrance", note = "将传送到蜘蛛洞守卫附近,二层仍需使用原有通行证。"},
{id = 72, name = "流放洞窟一层", x = 284200, y = 811100, mode = "entrance", note = "将传送到流放洞窟入口附近,仍需满足原有等级及血石条件。"},
{id = 73, name = "流放洞窟二层", x = 284200, y = 811100, mode = "entrance", note = "请先从入口进入流放洞窟,再通过洞内通道前往二层。"},
{id = 104, name = "蜘蛛洞一层", x = 60000, y = 496600, mode = "direct", note = ""},
{id = 107, name = "猴洞初级", x = 826400, y = 62800, mode = "direct", note = ""},
{id = 108, name = "猴洞中级", x = 135200, y = 652500, mode = "direct", note = ""},
{id = 109, name = "猴洞高级", x = 135200, y = 729300, mode = "direct", note = ""},
{id = 208, name = "蓝龙巢穴", x = 284200, y = 811100, mode = "entrance", note = "请先进入流放洞窟,再到二层的蓝龙入口办理入场。"},
{id = 216, name = "恶魔地下墓穴", x = 592400, y = 100600, mode = "entrance", note = "将传送到地下墓穴入口附近,请与入口守卫交谈。"},
{id = 217, name = "蜘蛛洞三层", x = 92400, y = 525500, mode = "entrance", note = "请先通过守卫进入二层,再从二层入口进入三层。"},
{id = 351, name = "火焰地牢", x = 614800, y = 707000, mode = "entrance", note = "将传送到火焰地牢入口附近,请按原有组队及入场流程进入。"},
}},
{name = "公会地图", maps = {
{id = 4, name = "盛唐国公会领地", x = 135400, y = 5500, mode = "direct", note = ""},
{id = 24, name = "秦皇国公会领地", x = 221900, y = 9200, mode = "direct", note = ""},
{id = 44, name = "周武国公会领地", x = 270900, y = 12700, mode = "direct", note = ""},
{id = 6, name = "盛唐国公会村庄", x = 230600, y = 231900, mode = "direct", note = ""},
{id = 26, name = "秦皇国公会村庄", x = 640200, y = 411100, mode = "direct", note = ""},
{id = 46, name = "周武国公会村庄", x = 281800, y = 846300, mode = "direct", note = ""},
}},
{name = "活动与战争", maps = {
{id = 81, name = "婚礼地图", x = 822300, y = 22000, mode = "event", note = "婚礼地图请通过婚礼管理员及婚礼邀请进入。"},
{id = 100, name = "野外活动地牢", x = 3215100, y = 7600, mode = "event", note = "请在对应活动或战争开放时,通过原有报名及入场流程进入。"},
{id = 101, name = "资源活动地图", x = 3212800, y = 64000, mode = "event", note = "请在对应活动或战争开放时,通过原有报名及入场流程进入。"},
{id = 112, name = "决斗场", x = 857400, y = 2400, mode = "event", note = "决斗场请通过决斗管理员报名或观战。"},
{id = 113, name = "知识竞赛场", x = 896500, y = 24600, mode = "event", note = "知识竞赛请在活动开放时通过活动管理员报名。"},
{id = 114, name = "圣地战场", x = 948100, y = 41500, mode = "event", note = "请在对应活动或战争开放时,通过原有报名及入场流程进入。"},
{id = 118, name = "火焰圣地通道一", x = 1149100, y = 118500, mode = "event", note = "请在对应活动或战争开放时,通过原有报名及入场流程进入。"},
{id = 119, name = "火焰圣地通道二", x = 1149100, y = 220900, mode = "event", note = "请在对应活动或战争开放时,通过原有报名及入场流程进入。"},
{id = 120, name = "火焰圣地通道三", x = 1149100, y = 323300, mode = "event", note = "请在对应活动或战争开放时,通过原有报名及入场流程进入。"},
{id = 121, name = "冰雪圣地", x = 1189300, y = 17900, mode = "event", note = "请在对应活动或战争开放时,通过原有报名及入场流程进入。"},
{id = 122, name = "冰雪圣地通道一", x = 1200700, y = 168900, mode = "event", note = "请在对应活动或战争开放时,通过原有报名及入场流程进入。"},
{id = 123, name = "冰雪圣地通道二", x = 1200700, y = 271300, mode = "event", note = "请在对应活动或战争开放时,通过原有报名及入场流程进入。"},
{id = 124, name = "冰雪圣地通道三", x = 1200700, y = 373700, mode = "event", note = "请在对应活动或战争开放时,通过原有报名及入场流程进入。"},
{id = 125, name = "沙漠圣地", x = 1270000, y = 56400, mode = "event", note = "请在对应活动或战争开放时,通过原有报名及入场流程进入。"},
{id = 126, name = "沙漠圣地通道一", x = 1242400, y = 142100, mode = "event", note = "请在对应活动或战争开放时,通过原有报名及入场流程进入。"},
{id = 127, name = "沙漠圣地通道二", x = 1242400, y = 244500, mode = "event", note = "请在对应活动或战争开放时,通过原有报名及入场流程进入。"},
{id = 128, name = "沙漠圣地通道三", x = 1242400, y = 346900, mode = "event", note = "请在对应活动或战争开放时,通过原有报名及入场流程进入。"},
{id = 181, name = "帝国战争一", x = 980000, y = 114400, mode = "event", note = "请在对应活动或战争开放时,通过原有报名及入场流程进入。"},
{id = 182, name = "帝国战争二", x = 934400, y = 166400, mode = "event", note = "请在对应活动或战争开放时,通过原有报名及入场流程进入。"},
{id = 183, name = "帝国战争三", x = 985600, y = 166400, mode = "event", note = "请在对应活动或战争开放时,通过原有报名及入场流程进入。"},
}},
{name = "测试地图", maps = {
{id = 103, name = "测试地图一", x = 45200, y = 83500, mode = "gm", note = "此地图仅供管理员测试,普通角色不能直接进入。"},
{id = 105, name = "测试地图二", x = 19200, y = 12800, mode = "gm", note = "此地图仅供管理员测试,普通角色不能直接进入。"},
{id = 110, name = "测试地图三", x = 44800, y = 12800, mode = "gm", note = "此地图仅供管理员测试,普通角色不能直接进入。"},
{id = 111, name = "测试地图四", x = 70400, y = 12800, mode = "gm", note = "此地图仅供管理员测试,普通角色不能直接进入。"},
{id = 200, name = "公会建设测试地图", x = 105200, y = 10000, mode = "gm", note = "此地图仅供管理员测试,普通角色不能直接进入。"},
}},
}
end
when 10031.sig_use begin
local categories = ring_warp.destinations()
local category_options = {}
for i = 1, table.getn(categories) do
table.insert(category_options, categories[i].name)
end
table.insert(category_options, "关闭")
while true do
say_title("移动戒指")
say("请选择地图分类:")
local category = select_table(category_options)
if category == table.getn(category_options) then return end
local maps = categories[category].maps
local page = 1
local browsing = true
while browsing do
local first = (page - 1) * 5 + 1
local last = math.min(first + 4, table.getn(maps))
local options = {}
for i = first, last do
local label = maps[i].name
if maps[i].mode == "entrance" then label = label .. "(入口)" end
table.insert(options, label)
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(maps) then
table.insert(options, "下一页")
following = table.getn(options)
end
table.insert(options, "返回分类")
say_title(categories[category].name)
say("第 " .. page .. " 页 / 共 " .. math.ceil(table.getn(maps) / 5) .. " 页")
local choice = select_table(options)
if choice == table.getn(options) then
browsing = false
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 destination = maps[first + choice - 1]
say_title(destination.name)
say("地图编号:" .. destination.id)
if destination.mode == "gm" and not pc.is_gm() then
say(destination.note)
wait()
elseif destination.mode == "event" then
say(destination.note)
wait()
else
if destination.mode == "entrance" then say(destination.note) end
if destination.mode == "gm" then say("管理员专用测试地图。") end
if select("传送", "返回列表") == 1 then
if not pc.can_warp() then
say("当前无法传送,请结束交易或其他操作后再试。")
return
end
pc.warp(destination.x, destination.y)
return
end
end
end
end
end
end
end
end