Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- quest teleportacja begin
- state start begin
- when login begin
- cmdchat("TeleportQuest "..q.getcurrentquestindex())
- teleportacja.refresh_window()
- end
- function refresh_window()
- local str = {
- --[idx mapy] = "nazwa lecaca do okna"
- [0] = "Wolna_pozycja",
- [1] = "Shinsoo_M1",
- [41] = "Jinno_M1",
- [3] = "Shinsoo_M2",
- [43] = "Jinno_M2",
- [64] = "Dolina_Orków",
- [63] = "Pustynia_Yongbi",
- [65] = "Świątynia_Hwang",
- [61] = "Góra_Sohan",
- [10] = "Loch_Pajóków_V1",
- [71] = "Loch_Pająków_V2",
- [68] = "Czerwony_Las"
- }
- cmdchat("mapnames "..str[pc.getqf("i13")].."|"..str[pc.getqf("i14")].."|"..str[pc.getqf("i15")].."|"..str[pc.getqf("i16")].."|"..str[pc.getqf("i17")].."|"..str[pc.getqf("i18")].."|"..str[pc.getqf("i19")].."|"..str[pc.getqf("i20")])
- end
- when button or info begin
- local teleport = tonumber(get_input("get_input"))
- local xy = {
- [1] = {"Jinno M1", 959900, 269200, 41, 0},
- [2] = {"Shinsoo M1", 474300, 954800, 1, 0},
- [3] = {"Jinno M2", 863900, 246000, 43, 0},
- [4] = {"Shinsoo M2", 353100, 882900, 3, 0},
- [5] = {"Jinno M3", 271600, 13100, 44, 0},
- [6] = {"Shinsoo M3", 135500, 4500, 4, 0},
- [7] = {"Dolina Orków", 332600, 746800, 64, 0},
- [8] = {"Pustynia Yongbi", 295600, 548100, 63, 0},
- [9] = {"Świątynia Hwang", 553600, 143600, 65, 0},
- [10] = {"Góra Sohan", 434700, 214200, 61, 0},
- [11] = {"Ognista Ziemia", 599700, 757500, 63, 0},
- [12] = {"Wężowe pole ", 1059200, 726700, 69, 0},
- [13] = {"Kraina Gigantów", 828300, 763500, 70, 0},
- [14] = {"xxxxxxxxxx", 1119600, 70000, 68, 0},
- [15] = {"Atlantyda v1", 10000, 1213200, 72, 75},
- [16] = {"Atlantyda v2", 241600, 1274400, 73, 80},
- [17] = {"Loch Pająków V1", 60000, 496000, 10, 40},
- [18] = {"Loch Pająków V2", 704100, 464100, 71, 45},
- [19] = {"Loch Pająków V3", 97900, 571100, 193, 60},
- [20] = {"Las", 290600, 5700, 67, 0},
- [21] = {"Czerwony Las", 1119600, 70000, 68, 0},
- [22] = {"Loch Małp 1", 928800, 447700, 107, 0},
- [23] = {"Loch Małp 2", 135200, 653200, 108, 0},
- [24] = {"Loch Małp 3", 135200, 730000, 109, 0},
- [25] = {"Warp Center", 44448500, 44464300, 151, 0},
- [26] = {"Polana", 33342100, 33376000, 150, 0},
- [27] = {"Kopalnia", 0, 0, 0, 0},
- }
- if pc.get_level() <= xy[teleport][5] then
- local lvl = xy[teleport][5]
- local map_name = xy[teleport][1]
- syschat("|cFF00ff33[Teleportacja]|h|cFFFFFFFF|h Teleportacja na "..map_name.." możliwa od : "..lvl.." lvl")
- elseif xy[teleport][3] == 0 or xy[teleport][2] == 0 then
- syschat("|cFF00ff33[Teleportacja]|h|cFFFFFFFF|h Wejście do kopalni znajduje się w mieście pierwszym. ")
- else
- if teleport >= 1 and teleport <= 27 then
- local lvl = xy[teleport][5]
- local map_name = xy[teleport][1]
- syschat("|cFF00ff33[Teleportacja]|h|cFFFFFFFF|h Lecisz na: "..map_name)
- pc.warp(xy[teleport][2], xy[teleport][3])
- elseif teleport >= 28 and teleport <= 35 then
- if pc.getqf("x"..teleport) != 0 or pc.getqf("y"..teleport) != 0 or pc.getqf("i"..teleport) != 0 then
- pc.warp(pc.getqf("x"..teleport), pc.getqf("y"..teleport))
- else
- syschat("|cFF00ff33[Teleportacja]|h|cFFFFFFFF|h Nie zapisałeś tutaj żadnej pozycji.")
- end
- elseif teleport >= 23 and teleport <= 30 then
- if pc.get_map_index() != 1 and pc.get_map_index() != 41 and pc.get_map_index() != 3
- and pc.get_map_index() != 43 and pc.get_map_index() != 64 and pc.get_map_index() != 63
- and pc.get_map_index() != 65 and pc.get_map_index() != 61 and pc.get_map_index() != 10
- and pc.get_map_index() != 71 and pc.get_map_index() != 68 then
- syschat("|cFF00ff33[Teleportacja]|h|cFFFFFFFF|h Nie możesz zapisać tutaj swojej pozycji.")
- return
- end
- syschat("|cFF00ff33[Teleportacja]|h|cFFFFFFFF|h Położenie zapisano pomyślnie!")
- pc.setqf("x"..teleport-10, pc.get_x()*100)
- pc.setqf("y"..teleport-10, pc.get_y()*100)
- pc.setqf("i"..teleport-10, pc.get_map_index())
- teleportacja.refresh_window()
- end
- end
- end
- end
- end
Add Comment
Please, Sign In to add comment