Quaczi

QTeleport

Aug 21st, 2016
911
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.37 KB | None | 0 0
  1. on script load:
  2. if file "plugins/Skript/scripts/QTeleport/config.yml" doesn't exists:
  3. send "&e&oQ&6&lTeleport &8> &cNie znaleziono pliku konfiguracyjnego." to console
  4. send "&e&oQ&6&lTeleport &8> &aTworzenie trwa..." to console
  5. create file "plugins/Skript/scripts/QTeleport/config.yml"
  6. send "&e&oQ&6&lTeleport &8> &aStworzono plik konfiguracyjny." to console
  7. set "Tag" to "&eQ&6Teleport&8 »" in yaml file "plugins/Skript/scripts/QTeleport/config.yml"
  8. set "Odleglosci.blisko.min" to "100" in yaml file "plugins/Skript/scripts/QTeleport/config.yml"
  9. set "Odleglosci.blisko.max" to "200" in yaml file "plugins/Skript/scripts/QTeleport/config.yml"
  10. set "Odleglosci.normalnie.min" to "250" in yaml file "plugins/Skript/scripts/QTeleport/config.yml"
  11. set "Odleglosci.normalnie.max" to "400" in yaml file "plugins/Skript/scripts/QTeleport/config.yml"
  12. set "Odleglosci.daleko.min" to "500" in yaml file "plugins/Skript/scripts/QTeleport/config.yml"
  13. set "Odleglosci.daleko.max" to "1000" in yaml file "plugins/Skript/scripts/QTeleport/config.yml"
  14. set {odl::blisko::min} to single value "Odleglosci.blisko.min" get of "plugins/Skript/scripts/QTeleport/config.yml"
  15. set {odl::blisko::max} to single value "Odleglosci.blisko.max" get of "plugins/Skript/scripts/QTeleport/config.yml"
  16. set {odl::normalnie::min} to single value "Odleglosci.normalnie.min" get of "plugins/Skript/scripts/QTeleport/config.yml"
  17. set {odl::normalnie::max} to single value "Odleglosci.normalnie.max" get of "plugins/Skript/scripts/QTeleport/config.yml"
  18. set {odl::daleko::min} to single value "Odleglosci.daleko.min" get of "plugins/Skript/scripts/QTeleport/config.yml"
  19. set {odl::daleko::max} to single value "Odleglosci.daleko.max" get of "plugins/Skript/scripts/QTeleport/config.yml"
  20. set {tag2} to single value "Tag" get of "plugins/Skript/scripts/QTeleport/config.yml" parsed as text
  21. set {tag} to colored {tag2}
  22.  
  23. command /rtp [<text>]:
  24. trigger:
  25. if player have permission "qtp.admin" or "qtp.free":
  26. if arg 1 is not set:
  27. open chest with 1 rows named "&lWybierz odleglosc teleportu" to player
  28. wait a tick
  29. format slot 1 of player with 1 of green glass pane named "&a&lBlisko" with lore "&6&lOdleglosc: &c&o%{odl::blisko::min}% - %{odl::blisko::max}% &ekratek" to close then run [make console execute command "zrob %player% /rtp blisko"]
  30. format slot 4 of player with 1 of yellow glass pane named "&e&lNormalnie" with lore "&6&lOdleglosc: &c&o%{odl::normalnie::min}% - %{odl::normalnie::max}% &ekratek" to close then run [make console execute command "zrob %player% /rtp normalnie"]
  31. format slot 7 of player with 1 of red glass pane named "&c&lDaleko" with lore "&6&lOdleglosc: &c&o%{odl::daleko::min}% - %{odl::daleko::max}% &ekratek" to close then run [make console execute command "zrob %player% /rtp daleko"]
  32. if arg 1 is "blisko" or "normalnie" or "daleko":
  33. close player's inventory
  34. apply speed 3 to player for 15 seconds
  35. apply jump boost 2 to player for 15 seconds
  36. set {jx2.%player%} to x coordinate of player
  37. set {jz2.%player%} to x coordinate of player
  38. set {jx.%player%} to {jx2.%player%} parsed as number
  39. set {jz.%player%} to {jz2.%player%} parsed as number
  40. if arg 1 is "blisko":
  41. set {tpx.%player%} to random number between {odl::blisko::min} to {odl::blisko::max}
  42. set {tpz.%player%} to random number between {odl::blisko::min} to {odl::blisko::max}
  43. if arg 1 is "normalnie":
  44. set {tpx.%player%} to random number between {odl::normalnie::min} to {odl::normalnie::max}
  45. set {tpz.%player%} to random number between {odl::normalnie::min} to {odl::normalnie::max}
  46. if arg 1 is "daleko":
  47. set {tpx.%player%} to random number between {odl::daleko::min} to {odl::daleko::max}
  48. set {tpz.%player%} to random number between {odl::daleko::min} to {odl::daleko::max}
  49. set {tepax.%player%} to {jx.%player%}
  50. add {tpx.%player%} to {tepax.%player%}
  51. set {tepaz.%player%} to {jz.%player%}
  52. add {tpz.%player%} to {tepaz.%player%}
  53. set {tepax2.%player%} to rounded {tepax.%player%}
  54. set {tepaz2.%player%} to rounded {tepaz.%player%}
  55. execute console command "/zrob %player% /essentials:tppos %{tepax2.%player%}% 75 %{tepaz2.%player%}%"
  56. send "%{tag}% &aPrzeteleportowano na koordynaty: &ax: %{tepax.%player%}% &by: %y coordinate of player% &cz: %{tepaz.%player%}%"
  57. spawn 10 of particle angry villager:1 offset by 0.5, 1.5, 0.5 at player
  58. spawn 20 of particle smoke offset by 0, 1, 0 at player
  59. if arg 1 is "guzik":
  60. if player have permission "qtp.admin":
  61. give player stone button named "%{tag}% &aGuzik" with lore "&aPostaw guzik na dowolnym bloku aby stal sie losowym teleportem."
  62. send "%{tag}% &aDostales guzik."
  63. if player don't have permission "qrtp.admin":
  64. send "%{tag}% &cNie masz uprawnien&4&l!"
  65.  
  66. on place of stone button:
  67. if name of player's tool is "%{tag}% &aGuzik":
  68. set {qrtp.%event-block%} to true
  69. send "%{tag}% &aPostawiles guzik&8. &aOd teraz jest tu losowe tp&8."
  70.  
  71. on right click on stone button:
  72. if {qrtp.%event-block%} is true:
  73. execute console command "zrob %player% /rtp"
  74.  
  75. command /zrob [<player>] [<text>]:
  76. permission: op
  77. trigger:
  78. close player's inventory
  79. if arg 1 is not set:
  80. send "&cPodaj gracza."
  81. stop
  82. if arg 2 is not set:
  83. send "&cPodaj komende."
  84. stop
  85. if arg 1 is set:
  86. if arg 2 is set:
  87. run player-arg command "%arg 2%" as op
Advertisement
Add Comment
Please, Sign In to add comment