New Teleport System

06/02/2013 21:10 HaveBeen™#1

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(YMinimumLevel
                
[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(
== 2then
                
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) == sthen
                
return
            elseif(
table.getn(mapname) >= sthen
                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() < 10000then
                    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 
1. Adding new a map ;

[vnum] = {"Mapname",x,y,minimumlevel}, -- You will like this :bandit:


mfg HaveBeen™

06/02/2013 21:12 .PolluX#2
Hmm.. another warpquest..
thanks for your work but there were another 4 releases of warp quests in the last days.. xD
06/02/2013 22:30 CrystalPrime#3
Kostümsystem hat bisschen aufgehört jetzt kommen Teleportquests.......
Das gehört in Sammelthread, kann mal jemand ihn sagen bitte.
06/02/2013 22:44 LEL0UCH'#4
Gibt es doch schon x-mal ehy, reicht doch langsam!
06/26/2013 07:07 Pulp310#5
The quest is a little bit bugged because you put something backwards in it.

Code:
if(level[a] < pc.get_level()) then
This means "if the level requirement is lower than the player level then".

It should be this to function properly:

Code:
if(level[a] > pc.get_level()) then
06/27/2013 21:21 HaveBeen™#6
Quote:
Originally Posted by Pulp310 View Post
The quest is a little bit bugged because you put something backwards in it.

Code:
if(level[a] < pc.get_level()) then
This means "if the level requirement is lower than the player level then".

It should be this to function properly:

Code:
if(level[a] > pc.get_level()) then
No, thank you for interest but that's better :pimp:
06/27/2013 22:54 Pulp310#7
Quote:
Originally Posted by HaveBeen™ View Post
No, thank you for interest but that's better :pimp:
I'm a little confused, are you telling me "no" and that what I said is incorrect?