Hi epvp community,
I not test this quest.I'm sorry,because the server was the problem.
I'll test tomorrow :)
PHP Code:
--[[
-- New Teleport System
-- by HaveBeen™
]]--
quest teleport begin
state start begin
function Getmaplist()
local maplist = {
-- Vnum Mapname Coordi(X) Coordi(Y) MinimumLevel
[1] = {"Pyungmo",10000,2200,85},
[2] = {"Bakra",10000,23000,90},
}
local lvl = pc.get_level()
mapname,x,y,level = {},{},{},{}
table.foreachi(maplist,
function(n,p)
mapname[n],x[n],y[n],level[n] = p[1],p[2],p[3],p[4]
end)
--print(mapname[1].." "..x[1].." "..y[1].." "..level[1])
return mapname,x,y,level
end
when 9011.chat." I want to teleport " begin
say_title(mob_name(npc.get_race())..":")
say("")
---
say("This place is really a nice village. ")
say("Hmm,you want to go somewhere else. ")
say("So if you have some money you can take. ")
say("")
local s = select("Ok","No,thanks")
if(s == 2) then
return
end
say_title(mob_name(npc.get_race())..":")
say("")
---
local list = teleport.Getmaplist()
say("Okey,where will you go? ")
say("")
table.insert(mapname,"Close")
local a = select_table(mapname)
if(table.getn(mapname) == s) then
return
elseif(table.getn(mapname) >= s) then
say_title(mob_name(npc.get_race())..":")
say("")
---
if(level[a] < pc.get_level()) then
say("You can't go here. Because the level is low. ")
say("You level must be exactly "..level[a])
return
elseif(pc.get_gold() < 10000) then
say("There are a lot less money.With this money I can't take you. ")
return
end
pc.change_gold(-10000)
pc.warp(x[a],y[a])
end
end
end
end
[vnum] = {"Mapname",x,y,minimumlevel}, -- You will like this :bandit:
mfg HaveBeen™