Guest User

Untitled

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