if you like it, thank me =)
Features:
-You only can teleport once every hour.
-You can set some names witch are forbidden to teleport to.(like gm's)
Things that can be better:
-the quest does not check if the player is online
Installation:
Copy and paste the quest in a text editor.
Save it as: teleportring.quest
upload it into your serverfiles
add the quest into hongkong.list
run sh make.sh
execute /reload q in game
Items used:
Quest file:
PHP Code:
quest teleportring begin
state start begin
when 70007.use begin
local left = pc.getqf("next_time") - get_time()
local left2 = left / 60
say_title("Teleportation ring")
say("With this ring you can teleport")
say("to any other player ingame.")
say("")
say("You can only teleport once every hour!")
say_reward("Do you want to teleport?")
local a = select("Yes","No")
if a == 1 then
say_title("Teleportation ring")
say("When you enter a playername that")
say("is not online, your ring will have to ")
say("recharge for 1 hour anyway.")
say_reward("You want to continue?")
local b = select("Yes","No")
if b == 1 then
if get_time() > pc.getqf("next_time")then
say_title("Teleportation ring")
say_reward("What is the name off the player?")
local name = input()
if name == "[SA]1" or name == "[SGM]2" or name == "[SGM]3" or name == "[GM]4" or name == "[GM]5" or name == "[GM]6" or name == "[GM]7" then
say("you can not teleport to a gm")
return
else
pc.teleport(name)
pc.teleport(name)
pc.setqf("next_time", get_time() + 3600)
end
else
say("You have to wait "..left2.." minutes longer to teleport again.")
end
else
return
end
else
return
end
end
end
end






