Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- on script load:
- if file "plugins/Skript/scripts/QTeleport/config.yml" doesn't exists:
- send "&e&oQ&6&lTeleport &8> &cNie znaleziono pliku konfiguracyjnego." to console
- send "&e&oQ&6&lTeleport &8> &aTworzenie trwa..." to console
- create file "plugins/Skript/scripts/QTeleport/config.yml"
- send "&e&oQ&6&lTeleport &8> &aStworzono plik konfiguracyjny." to console
- set "Tag" to "&eQ&6Teleport&8 »" in yaml file "plugins/Skript/scripts/QTeleport/config.yml"
- set "Odleglosci.blisko.min" to "100" in yaml file "plugins/Skript/scripts/QTeleport/config.yml"
- set "Odleglosci.blisko.max" to "200" in yaml file "plugins/Skript/scripts/QTeleport/config.yml"
- set "Odleglosci.normalnie.min" to "250" in yaml file "plugins/Skript/scripts/QTeleport/config.yml"
- set "Odleglosci.normalnie.max" to "400" in yaml file "plugins/Skript/scripts/QTeleport/config.yml"
- set "Odleglosci.daleko.min" to "500" in yaml file "plugins/Skript/scripts/QTeleport/config.yml"
- set "Odleglosci.daleko.max" to "1000" in yaml file "plugins/Skript/scripts/QTeleport/config.yml"
- set {odl::blisko::min} to single value "Odleglosci.blisko.min" get of "plugins/Skript/scripts/QTeleport/config.yml"
- set {odl::blisko::max} to single value "Odleglosci.blisko.max" get of "plugins/Skript/scripts/QTeleport/config.yml"
- set {odl::normalnie::min} to single value "Odleglosci.normalnie.min" get of "plugins/Skript/scripts/QTeleport/config.yml"
- set {odl::normalnie::max} to single value "Odleglosci.normalnie.max" get of "plugins/Skript/scripts/QTeleport/config.yml"
- set {odl::daleko::min} to single value "Odleglosci.daleko.min" get of "plugins/Skript/scripts/QTeleport/config.yml"
- set {odl::daleko::max} to single value "Odleglosci.daleko.max" get of "plugins/Skript/scripts/QTeleport/config.yml"
- set {tag2} to single value "Tag" get of "plugins/Skript/scripts/QTeleport/config.yml" parsed as text
- set {tag} to colored {tag2}
- command /rtp [<text>]:
- trigger:
- if player have permission "qtp.admin" or "qtp.free":
- if arg 1 is not set:
- open chest with 1 rows named "&lWybierz odleglosc teleportu" to player
- wait a tick
- 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"]
- 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"]
- 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"]
- if arg 1 is "blisko" or "normalnie" or "daleko":
- close player's inventory
- apply speed 3 to player for 15 seconds
- apply jump boost 2 to player for 15 seconds
- set {jx2.%player%} to x coordinate of player
- set {jz2.%player%} to x coordinate of player
- set {jx.%player%} to {jx2.%player%} parsed as number
- set {jz.%player%} to {jz2.%player%} parsed as number
- if arg 1 is "blisko":
- set {tpx.%player%} to random number between {odl::blisko::min} to {odl::blisko::max}
- set {tpz.%player%} to random number between {odl::blisko::min} to {odl::blisko::max}
- if arg 1 is "normalnie":
- set {tpx.%player%} to random number between {odl::normalnie::min} to {odl::normalnie::max}
- set {tpz.%player%} to random number between {odl::normalnie::min} to {odl::normalnie::max}
- if arg 1 is "daleko":
- set {tpx.%player%} to random number between {odl::daleko::min} to {odl::daleko::max}
- set {tpz.%player%} to random number between {odl::daleko::min} to {odl::daleko::max}
- set {tepax.%player%} to {jx.%player%}
- add {tpx.%player%} to {tepax.%player%}
- set {tepaz.%player%} to {jz.%player%}
- add {tpz.%player%} to {tepaz.%player%}
- set {tepax2.%player%} to rounded {tepax.%player%}
- set {tepaz2.%player%} to rounded {tepaz.%player%}
- execute console command "/zrob %player% /essentials:tppos %{tepax2.%player%}% 75 %{tepaz2.%player%}%"
- send "%{tag}% &aPrzeteleportowano na koordynaty: &ax: %{tepax.%player%}% &by: %y coordinate of player% &cz: %{tepaz.%player%}%"
- spawn 10 of particle angry villager:1 offset by 0.5, 1.5, 0.5 at player
- spawn 20 of particle smoke offset by 0, 1, 0 at player
- if arg 1 is "guzik":
- if player have permission "qtp.admin":
- give player stone button named "%{tag}% &aGuzik" with lore "&aPostaw guzik na dowolnym bloku aby stal sie losowym teleportem."
- send "%{tag}% &aDostales guzik."
- if player don't have permission "qrtp.admin":
- send "%{tag}% &cNie masz uprawnien&4&l!"
- on place of stone button:
- if name of player's tool is "%{tag}% &aGuzik":
- set {qrtp.%event-block%} to true
- send "%{tag}% &aPostawiles guzik&8. &aOd teraz jest tu losowe tp&8."
- on right click on stone button:
- if {qrtp.%event-block%} is true:
- execute console command "zrob %player% /rtp"
- command /zrob [<player>] [<text>]:
- permission: op
- trigger:
- close player's inventory
- if arg 1 is not set:
- send "&cPodaj gracza."
- stop
- if arg 2 is not set:
- send "&cPodaj komende."
- stop
- if arg 1 is set:
- if arg 2 is set:
- run player-arg command "%arg 2%" as op
Advertisement
Add Comment
Please, Sign In to add comment