Habe hier eine "Teleport-Panel" Quest von mir auf meiner Platte gefunden.
Man kann damit bis zu 3 Standorte speichern, ähnlich einer Schriftrolle des Ortes.
PHP Code:
quest test begin
state start begin
when letter begin
if pc.getqf("slot1") == 0 and pc.getqf("slot2") == 0 and pc.getqf("slot3") == 0 then
pc.setqf("slot1", 1)
pc.setqf("slot2", 1)
pc.setqf("slot3", 1)
setvarchar("text1", "Leer")
setvarchar("text2", "Leer")
setvarchar("text3", "Leer")
end
send_letter('Teleport')
end
when button or info begin
local x = (pc.get_x()*100)
local y = (pc.get_y()*100)
local mapindex = {
[1] = "Yongan (Rot 1)",
[3] = "Jayang (Rot 2)",
[4] = "Jungrang",
[5] = "Hasung Dong",
[21] = "Joan (Gelb 1)",
[23] = "Bokjung (Gelb 2)",
[24] = "Waryong",
[25] = "Hasung Dong",
[41] = "Pyungmoo (Blau 1)",
[43] = "Bakra (Blau 2)",
[44] = "Imha",
[45] = "Hasung Dong",
[61] = "Berg Sohan",
[62] = "Doyyumhwaji",
[63] = "Yongbi-Wüste",
[64] = "Tal von Seungryoung",
[65] = "Hwang-Tempel",
[66] = "Dämonenturm",
[67] = "Lungsam",
[68] = "Roter Wald",
[69] = "Schlangenfeld",
[70] = "Land der Riesen",
[71] = "Spinnendungeon 2",
[104] = "Kuahklo Dong",
[107] = "Hasung Dong",
[108] = "Jungsun Dong",
[109] = "Sangsun Dong"}
say_title("Teleport")
say("")
say("Bitte Slot auswählen:")
say("")
local slot = select(getvarchar("text1"),getvarchar("text2"),getvarchar("text3"), "Abbrechen")
if slot == 1 then
if pc.getqf("slot1") == 2 then
say_title("Teleport")
say("")
say("Karte: "..mapindex[pc.getqf("map1")].."")
say("")
say("X-Koordinate: "..pc.getqf("x1").."")
say("Y-Koordinate: "..pc.getqf("y1").."")
say("")
say("Notiz: ")
say_reward(getvarchar("text1"))
say("")
local a = select("Teleportieren", "Löschen", "Abbrechen")
if a == 1 then
pc.warp(pc.getqf("x1"), pc.getqf("y1"))
end
if a == 2 then
setvarchar("text1", "Leer")
pc.delqf("map1")
pc.delqf("x1")
pc.delqf("y1")
pc.setqf("slot1", 1)
chat("Standort wurde erfolgreich gelöscht.")
return
end
end
if pc.getqf("slot1") == 1 then
say_title("Teleport")
say("")
say("Karte: "..mapindex[pc.get_map_index()].."")
say("")
say("X-Koordinate: "..x.."")
say("Y-Koordinate: "..y.."")
say("")
say_reward("Notiz hinzufügen (optional):")
local text1 = tostring(input())
say_title("Teleport")
say("")
say("Karte: "..mapindex[pc.get_map_index()].."")
say("")
say("X-Koordinate: "..x.."")
say("Y-Koordinate: "..y.."")
say("")
say("Notiz:")
say_reward(text1)
say("")
local a = select("Standort speichern","Abbrechen")
if a == 1 then
setvarchar("text1", text1)
pc.setqf("map1", pc.get_map_index() )
pc.setqf("x1", x )
pc.setqf("y1", y )
pc.setqf("slot1", 2)
chat("Standort wurde erfolgreich gespeichert.")
end
end
end
if slot == 2 then
if pc.getqf("slot2") == 2 then
say_title("Teleport")
say("")
say("Karte: "..mapindex[pc.getqf("map2")].."")
say("")
say("X-Koordinate: "..pc.getqf("x2").."")
say("Y-Koordinate: "..pc.getqf("y2").."")
say("")
say("Notiz: ")
say_reward(getvarchar("text2"))
say("")
local a = select("Teleportieren", "Löschen", "Abbrechen")
if a == 1 then
pc.warp(pc.getqf("x2"), pc.getqf("y2"))
end
if a == 2 then
setvarchar("text2", "Leer")
pc.delqf("map2")
pc.delqf("x2")
pc.delqf("y2")
pc.setqf("slot2", 1)
chat("Standort wurde erfolgreich gelöscht.")
return
end
end
if pc.getqf("slot2") == 1 then
say_title("Teleport")
say("")
say("Karte: "..mapindex[pc.get_map_index()].."")
say("")
say("X-Koordinate: "..x.."")
say("Y-Koordinate: "..y.."")
say("")
say("Notiz hinzufügen (optional):")
local text2 = tostring(input())
say_title("Teleport")
say("")
say("Karte: "..mapindex[pc.get_map_index()].."")
say("")
say("X-Koordinate: "..x.."")
say("Y-Koordinate: "..y.."")
say("")
say("Notiz:")
say_reward(text2)
say("")
local a = select("Standort speichern","Abbrechen")
if a == 1 then
setvarchar("text2", text2)
pc.setqf("map2", pc.get_map_index() )
pc.setqf("x2", x )
pc.setqf("y2", y )
pc.setqf("slot2", 2)
chat("Standort wurde erfolgreich gespeichert.")
end
end
end
if slot == 3 then
if pc.getqf("slot3") == 2 then
say_title("Teleport")
say("")
say("Karte: "..mapindex[pc.getqf("map3")].."")
say("")
say("X-Koordinate: "..pc.getqf("x3").."")
say("Y-Koordinate: "..pc.getqf("y3").."")
say("")
say("Notiz: ")
say_reward(getvarchar("text3"))
say("")
local a = select("Teleportieren", "Löschen", "Abbrechen")
if a == 1 then
pc.warp(pc.getqf("x3"), pc.getqf("y3"))
end
if a == 2 then
setvarchar("text3", "Leer")
pc.delqf("map3")
pc.delqf("x3")
pc.delqf("y3")
pc.setqf("slot3", 1)
chat("Standort wurde erfolgreich gelöscht.")
return
end
end
if pc.getqf("slot3") == 1 then
say_title("Teleport")
say("")
say("Karte: "..mapindex[pc.get_map_index()].."")
say("")
say("X-Koordinate: "..x.."")
say("Y-Koordinate: "..y.."")
say("")
say("Notiz hinzufügen (optional):")
local text3 = tostring(input())
say_title("Teleport")
say("")
say("Karte: "..mapindex[pc.get_map_index()].."")
say("")
say("X-Koordinate: "..x.."")
say("Y-Koordinate: "..y.."")
say("")
say("Notiz:")
say_reward(text3)
say("")
local a = select("Standort speichern","Abbrechen")
if a == 1 then
setvarchar("text3", text3)
pc.setqf("map3", pc.get_map_index() )
pc.setqf("x3", x )
pc.setqf("y3", y )
pc.setqf("slot3", 2)
chat("Standort wurde erfolgreich gespeichert.")
end
end
end
end
end
end