Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # STOISKA
- # version: 1.1.
- # author: saletra
- #
- # PERMISSIONS:
- # - stoisko.usun
- # - stoisko.usun.other
- # - stoisko.dodaj
- # - stoisko.info
- options:
- st-prefix: &f[&5STOISKO&f]
- every 60 seconds:
- loop {stoisko::*}:
- set {_stoiskoCzas} to {stoisko.%loop-value%.date}
- set {_roznica2} to difference between {_stoiskoCzas} and now
- execute console command "/stoiskoczas %{_roznica2}% %loop-value%"
- if {_roznica2} is greater than 3 days:
- execute console command "/stoisko usun %loop-value%"
- send "{@st-prefix} &aUsunieto stoisko gracza &6%loop-value%" to all players
- command /st:
- trigger:
- execute player command "/skript reload stoiska"
- execute console command "/skript reload stoiska"
- command /onlyrg [<text>] [<text>] [<text>] [<text>] [<text>] [<text>] [<text>] [<text>] [<text>]:
- trigger:
- if arg 1 is "spawn":
- set {stoisko.%player%.region} to arg 6
- command /stoisko [<text>] [<player>]:
- permission: stoisko.usun
- permission message: {@st-prefix} &aNie masz uprawnien do usuniecia stoiska
- trigger:
- if arg 1 is set:
- if arg 1 is "usun":
- if arg 2 is set:
- if player has permission "stoisko.usun.other":
- execute console command "/stoisko usun %arg 2%"
- send "{@st-prefix} &aUsunieto stoisko gracza &6%arg 2%"
- else if sender is console:
- set line 3 of block at {stoisko.%arg 2%.loc} to "&5&lWOLNE"
- set line 4 of block at {stoisko.%arg 2%.loc} to "kliknij aby zajac"
- execute console command "/rg removemember %{stoisko.%arg 2%.region}% %arg 2% -w %world%"
- loop {stoisko::*}:
- if arg 2 is loop-value:
- set {_loopIndex} to loop-index
- stop loop
- delete {stoisko::%{_loopIndex}%}
- delete {_loopIndex}
- delete {stoisko.%arg 2%.region}
- delete {stoisko.%arg 2%.loc}
- delete {stoisko.%arg 2%.date}
- send "{@st-prefix} &aUsunieto stoisko gracza &6%arg 2%"
- else:
- send "{@st-prefix} &cNie masz uprawnien do usuniecia czyjegos stoiska"
- else:
- if {stoisko.%player%.region} is set:
- execute console command "/stoisko usun %player%"
- send "{@st-prefix} &aTwoje stoisko zostalo usuniete"
- else if arg 1 is "info":
- if player has permission "stoisko.info":
- if {stoisko.%player%.date} is set:
- send "{@st-prefix} &7%{stoisko.%player%.date}% &f- data na twoim stoisku"
- else:
- send "{@st-prefix} &cNie masz swojego stoiska"
- else:
- send "{@st-prefix} &cNie masz uprawnien do uzycia tej komendy"
- else:
- send "{@st-prefix} &cUzycie: /stoisko usun [nick]"
- else:
- send "{@st-prefix} &fUzycie:"
- if player has permission "stoisko.usun.others":
- send "{@st-prefix} &7/stoisko usun [player] &f- usuwa twoje lub czyjes stoisko"
- else:
- send "{@st-prefix} &7/stoisko usun &f- usuwa twoje stoisko"
- send "{@st-prefix} &7/stoisko info &f- pokazuje informacje o twoim stoisku"
- on rightclick on sign:
- world is "SkyBlock":
- line 1 is "&5&lSTOISKO":
- if player has permission "stoisko.dodaj":
- line 3 is "&5&lWOLNE":
- if {stoisko.%player%.region} is set:
- send "{@st-prefix} &cMasz juz jedno stoisko"
- else:
- set {_regions::*} to the regions at the clicked block
- execute player command "/onlyrg %{_regions::*}%"
- if {stoisko.%player%.region} is not "<null>":
- execute console command "/rg addmember %{stoisko.%player%.region}% %player% -w %world%"
- set {stoisko.%player%.loc} to location of clicked block
- add player to {stoisko::*}
- send "{@st-prefix} &aUtworzono nowe stoisko"
- send "{@st-prefix} &aGracz &6%player% &autworzyl nowe stoisko" to all players
- set line 3 to "%player%"
- set line 4 to "%now%"
- set {stoisko.%player%.date} to now
- else:
- send "{@st-prefix} &cZly region, region: %{stoisko.%player%.region}%"
- else:
- line 3 is "%player%":
- set line 4 to "%now%"
- set {stoisko.%player%.date} to now
- else:
- line 3 is not player:
- send "{@st-prefix} &cTo stoisko jest juz zajete"
- else:
- send "{@st-prefix} &cNie masz uprawnien do stworzenia nowego stoiska"
- on break of sign:
- if world is "SkyBlock":
- line 1 is "&5&lSTOISKO":
- line 3 is "%player%":
- execute player command "/stoisko usun"
- cancel event
- else:
- line 3 is not "&5&lWOLNE":
- cancel event
- send "{@st-prefix} &cNie mozesz zniszczyc tej tabliczki, najpierw usun to stoisko"
- else:
- line 3 is "&5&lWOLNE":
- send "{@st-prefix} &aUsunales stanowisko dla stoiska"
- on rightclick on sign:
- world is "SkyBlock":
- line 1 is "[stoisko]":
- set line 1 to "&5&lSTOISKO"
- set line 2 to "--------"
- set line 3 to "&5&lWOLNE"
- set line 4 to "kliknij aby zajac"
- on break pine wood plank:
- if world is "SkyBlock":
- if block north event-block is sign:
- cancel event
- send "{@st-prefix} &cNajpierw zniszcz tabliczke na tym bloku"
- if block south event-block is sign:
- cancel event
- send "{@st-prefix} &cNajpierw zniszcz tabliczke na tym bloku"
- if block west event-block is sign:
- cancel event
- send "{@st-prefix} &cNajpierw zniszcz tabliczke na tym bloku"
- if block east event-block is sign:
- cancel event
- send "{@st-prefix} &cNajpierw zniszcz tabliczke na tym bloku"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement