Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- command /mlag [<text>] [<text>]:
- trigger:
- if arg 1 isn't "sprawdz" or "otchlan" or "":
- if player doesn't have permission "mlag.admin":
- set {Infoz} to {Info}
- replace all "|tresc|" in {Infoz} with "mlag.admin"
- send "%{Tag}%%{Kolor}% Nie posiadasz uprawnien do tej komendy. %{Infoz}%"
- if arg 1 is "czysc":
- loop 54 times:
- set slot loop-number - 1 of block at {lag::otchlan::ustawiona} to air
- set {lag::licznik} to 0
- loop all entities:
- if loop-entity is a dropped item:
- set {_} to items within loop-entity
- set {_} to "%loop-entity%" parsed as an item
- set {lag::licznik} to {lag::licznik}+1
- set {lag::item::%{lag::licznik}%} to {_}
- delete loop-entity
- set {lag::otchlan::stan} to true
- set {Infoz} to {Info}
- replace all "|tresc|" in {Infoz} with "%player%"
- broadcast "%{Tag}%%{Kolor}% Zostalo wymuszone usuniecie itemow z ziemi przez administratora. %{Infoz}%"
- broadcast "%{Tag}%%{Kolor}% W otchlani pojawily się usunięte przedmioty. "
- loop {lag::licznik} times:
- add {lag::item::%loop-number%} to inventory of block at {lag::otchlan::ustawiona}
- if arg 1 is "otchlan":
- open the inventory of the block at {lag::otchlan::ustawiona} to the player
- send "%{Tag}%%{Kolor}% Otworzyles otchlan."
- if arg 1 is "ustaw":
- if arg 2 is "skrzynia":
- set {_x} to random integer between 0 and 10000
- set {_y} to 255
- set {_z} to random integer between 1 and 10000
- set {_c} to location at {_x}, {_y}, {_z}
- set block at {_c} to chest
- set block east {_c} to chest
- set {lag::otchlan::ustawiona} to location of {_c}
- send "%{Tag}%%{Kolor}% Skrzynia została postawiona na koordynatach: %{lag::otchlan::ustawiona}%"
- if arg 1 is "sprawdz":
- send "%{Tag}%%{Kolor}% Do nastepnego usuwania itemow pozostało %{lag::czas}% sekund."
- if arg 1 is "reset":
- set {Infoz} to {Info}
- replace all "|tresc|" in {Infoz} with "%{czas}% sekund"
- send "%{Tag}%%{Kolor}% Resetowano czas odliczania %{Infoz}%"
- if arg 1 isn't set:
- send "%{Tag}% %{Kolor}%- &5Skrypt na otchlan by Michma1707" #Jedyny punkt licencji: Zabraniam zmieniania tego nagłówku ;<!#
- send "%{Kolor}%mlag sprawdz &6-%{kolor}% pokazuje czas do nastepnego usuwania itemów"
- send "%{Kolor}%otchlan &6-%{kolor}% otwiera otchlan"
- if player has permission "mlag.admin":
- send "&cKomendy administratora:"
- send "%{Kolor}%mlag ustaw skrzynia &c-%{kolor}% generuje skrzynie do ktorej trafiaja itemy z otchlani"
- send "%{Kolor}%mlag reset &c-%{kolor}% resetuje odliczanie do nastepnego auto odliczania"
- send "%{Kolor}%mlag czysc &c-%{kolor}% wymusza usuwania itemow"
- every 1 seconds:
- if {lag::czas} = 0:
- set {lag::czas} to {Czas} parsed as integer
- broadcast "%{Tag}%%{Kolor}% Za &c10 sekund%{kolor}% itemy lezace na ziemi zostana przeniesione do otchlani"
- wait 10 seconds
- loop 54 times:
- set slot loop-number - 1 of block at {lag::otchlan::ustawiona} to air
- set {lag::licznik} to 0
- loop all entities:
- if loop-entity is a dropped item:
- set {_} to items within loop-entity
- set {_} to "%loop-entity%" parsed as an item
- set {lag::licznik} to {lag::licznik}+1
- set {lag::item::%{lag::licznik}%} to {_}
- delete loop-entity
- set {lag::otchlan::stan} to true
- loop {lag::licznik} times:
- add {lag::item::%loop-number%} to inventory of block at {lag::otchlan::ustawiona}
- broadcast "%{Tag}%%{Kolor}% Do otchlani zostały przeniesione usunięte itemy."
- else:
- set {lag::czas} to {lag::czas}-1
- command /otchlan:
- trigger:
- open the inventory of the block at {lag::otchlan::ustawiona} to the player
- send "%{Tag}%%{Kolor}% Otworzyles otchlan."
- on load:
- if {lag::otchlan::ustawiona} isn't set:
- execute console command "/clearlag ustaw skrzynia"
- #YMl#
- if file "plugins/mOtchlan/config.yml" doesn't exists:
- create file "plugins/mOtchlan/config.yml"
- set "Tag" to "&8[&2m&5Otchlan&8]" in yaml file "plugins/mOtchlan/config.yml"
- set "Kolor" to "&7" in yaml file "plugins/mOtchlan/config.yml"
- set "Czas" to "120" in yaml file "plugins/mOtchlan/config.yml"
- set "Informacja" to "&8(&c|tresc|&8)" in yaml file "plugins/mOtchlan/config.yml"
- set {Tag} to single value "Tag" get of "plugins/mOtchlan/config.yml"
- set {Kolor} to single value "Kolor" get of "plugins/mOtchlan/config.yml"
- set {Czas} to single value "Czas" get of "plugins/mOtchlan/config.yml"
- set {Info} to single value "Informacja" get of "plugins/mOtchlan/config.yml"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement