# # # # # # # # # # # # ~ 𝔸𝕦𝕥𝕠𝕣: ℂ𝕫𝕦𝕡𝕒𝕜𝕒𝕟 # ~ 𝕊𝕜𝕣𝕪𝕡𝕥: 𝔹𝕖𝕕-𝕋𝕡 # ~ ℙ𝕠𝕥𝕣𝕫𝕖𝕓𝕟𝕖 𝕡𝕝𝕦𝕘𝕚𝕟𝕪: # 𝕊𝕜𝕣𝕚𝕡𝕥, 𝕊𝕜𝔹𝕖𝕖 # # # # # # # # # # # options: # #################################################| 𝕌𝕤𝕥𝕒𝕨𝕚𝕖𝕟𝕚𝕒 |################################################## Nazwa: &b&kx &e&lBed-Tp &b&kx # Nazwa różdżki Przedmiot: carrot on a stick # Przedmiot, który ma być różdżką Czas: 15 # Czas teleportacji Użycia: 2 # Liczba użyć różdżki # #################################################| ℂ𝕣𝕒𝕗𝕥𝕚𝕟𝕘 |################################################## craft1: air craft2: ender pearl craft3: obsidian craft4: ender pearl craft5: gold block craft6: ender pearl craft7: obsidian craft8: ender pearl craft9: air # # # # # # # # # # # # # # # | | # # craft1 | craft2 | craft3 # #________|________|________# # | | # # craft4 | craft5 | craft6 # #________|________|________# # | | # # craft7 | craft8 | craft9 # # | | # # # # # # # # # # # # # # # # #################################################| 𝕂𝕠𝕕 |################################################## on load: register new shaped recipe for {@Przedmiot} of thorns 10 with hidden enchants flag named "{@Nazwa}" with lore "" and "&6* &eTa magiczna różdżka" and " &eprzeniesie cię do twojego łóżka!" and "" and "&6* &eAby jej użyć: wciśnij" and " &eprawy przycisk myszki" and "" and "&6* &eTeleportacja potrwa 15 sekund," and " &enie ruszaj się w tym czasie!" and "" and "&7* Użycia: {@Użycia}" and "" using {@craft1} and {@craft2} and {@craft3} and {@craft4} and {@craft5} and {@craft6} and {@craft7} and {@craft8} and {@craft9} with id "ck_skript_spawn_tp" on enchant: if player's tool is {@Przedmiot} of thorns 10 with hidden enchants flag named "{@Nazwa}": cancel event on fishing: if player's tool is {@Przedmiot} of thorns 10 with hidden enchants flag named "{@Nazwa}": cancel event on drop: if event-item is {@Przedmiot} of thorns 10 with hidden enchants flag named "{@Nazwa}": if {ckbedtp::%uuid of player%} is true: send action bar "&6» &eTeleportacja anulowana, nie wyrzucaj różdżki podczas teleportacji! &6«" to player set {ckbedtp::%uuid of player%} to false on tool change: if player is holding {@Przedmiot} of thorns 10 with hidden enchants flag named "{@Nazwa}": if {ckbedtp::%uuid of player%} is true: set {ckbedtp::%uuid of player%} to false send action bar "&6» &eTeleportacja anulowana, nie zmieniaj różdżki na inny przedmiot podczas teleportacji! &6«" to player stop on quit: if {ckbedtp::%uuid of player%} is true: set {ckbedtp::%uuid of player%} to false command /givebedtp: permission: ck-skript.bedtp trigger: give 1 {@Przedmiot} of thorns 10 with hidden enchants flag named "{@Nazwa}" with lore "" and "&6* &eTa magiczna różdżka" and " &eprzeniesie cię do twojego łóżka!" and "" and "&6* &eAby jej użyć: wciśnij" and " &eprawy przycisk myszki" and "" and "&6* &eTeleportacja potrwa 15 sekund," and " &enie ruszaj się w tym czasie!" and "" and "&7* Użycia: {@Użycia}" and "" to player on right click: if player's tool is {@Przedmiot} of thorns 10 with hidden enchants flag named "{@Nazwa}": cancel event if {ckbedtp::%uuid of player%} is true: stop player's bed is not set: send "&6* &eTwoje łóżko nie zostało odnalezione" to player stop set {ckbedtp::%uuid of player%} to true send "&6* &eTeleportacja rozpoczęta!" to player set {_a} to "&c" loop {@Czas} times: set {_a} to "%{_a}%▊" send action bar "&6» {@Nazwa} &6▏ %{_a}% &6«" to player wait 1 second if {ckbedtp::%uuid of player%} is false: stop set {_ckbd::%uuid of player%} to "%x-coordinate of player%, %y-coordinate of player%, %z-coordinate of player%" loop {@Czas} times: set {_a} to "&a" loop {@Czas} times: set {_a} to "%{_a}%▊" if loop-number-1 is loop-number-2: set {_a} to "%{_a}%&c" if {ckbedtp::%uuid of player%} is false: stop wait 1 second if player's tool is {@Przedmiot} of thorns 10 with hidden enchants flag named "{@Nazwa}": send action bar "&6» {@Nazwa} &6▏ %{_a}% &6«" to player if {_ckbd::%uuid of player%} isn't "%x-coordinate of player%, %y-coordinate of player%, %z-coordinate of player%": send action bar "&6» &eTeleportacja anulowana, nie ruszaj się podczas teleportacji! &6«" to player set {ckbedtp::%uuid of player%} to false stop teleport player to player's bed set {_uzycia.%player%} to uncoloured line 11 of lore of player's tool replace all "* Użycia: " with "" in {_uzycia.%player%} set {_uzycia.%player%} to {_uzycia.%player%} parsed as integer if {_uzycia.%player%} is 1: delete player's tool else: set line 11 of lore of player's tool to "&7* Użycia: %{_uzycia.%player%} - 1%" send "&6* &eTeleportacja zakończona!" to player set {ckbedtp::%uuid of player%} to false