command /mlag:lag [] []: aliases: /lag, /mlag, /ml trigger: if arg 1 isn't "sprawdz" or "otchlan" or "": if player doesn't have permission "mlag.admin": send "%{lag::wiadomosc::tag}%%{lag::wiadomosc::kolor1}% %{lag::wiadomosc::wiadomoscuprawnienia}%" if arg 1 is "czysc": loop 54 times: set slot loop-number - 1 of block at {lag::pustka::ustawiona} to air set {lag::licznik} to 0 loop all entities: if loop-entity is a dropped item: add items within entity loop-entity to inventory of block at {lag::pustka::ustawiona} delete loop-entity set {lag::pustka::stan} to true broadcast "%{lag::wiadomosc::tag}%%{lag::wiadomosc::kolor1}% Zostalo wymuszone usuniecie itemow z ziemi przez administratora." broadcast "%{lag::wiadomosc::tag}%%{lag::wiadomosc::kolor1}% %{lag::wiadomosc::wiadomoscpustka}%" if arg 1 is "otchlan" or "pustka": open the inventory of the block at {lag::pustka::ustawiona} to the player send "%{lag::wiadomosc::tag}%%{lag::wiadomosc::kolor1}% %{lag::wiadomosc::wiadomoscpustkaotwarcie}%" 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::pustka::ustawiona} to location of {_c} send "%{lag::wiadomosc::tag}%%{lag::wiadomosc::kolor1}% Skrzynia zostala postawiona na koordynatach: %{lag::pustka::ustawiona}%" if arg 2 is "messages" or "wiadomosci": set yml value "Tag" from file "plugins/mLag/messages.yml" to "&8[&amLag&8]" set yml value "KolorWiadomosci" from file "plugins/mLag/messages.yml" to "&7" set yml value "KolorWazny" from file "plugins/mLag/messages.yml" to "&c" set yml value "WiadomoscUprawnienia" from file "plugins/mLag/messages.yml" to "Nie posiadasz uprawnien do tej komendy." set yml value "WiadomoscPustka" from file "plugins/mLag/messages.yml" to "Przedmioty zostaly przeniesione do pustki." set yml value "WiadomoscPustkaOtwarcie" from file "plugins/mLag/messages.yml" to "Otworzyles pustke." set yml value "WiadomoscDoNastepnego" from file "plugins/mLag/messages.yml" to "Czas do nastepnego usuwania @czas@ sekund." send "%{lag::wiadomosc::tag}%%{lag::wiadomosc::kolor1}% Zresetowano konfiguracje wiadomosci." if arg 2 is "config": set yml value "Czas" from file "plugins/mLag/config.yml" to "300" send "%{lag::wiadomosc::tag}%%{lag::wiadomosc::kolor1}% Zresetowano konfiguracje." if arg 2 isn't set : send "%{lag::wiadomosc::kolor1}%mlag ustaw skrzynia &c-%{lag::wiadomosc::kolor1}% generuje skrzynie do ktorej trafiaja itemy z otchlani" send "%{lag::wiadomosc::kolor1}%mlag ustaw messages &5-%{lag::wiadomosc::kolor1}% przywraca konfiguracje wiadomosci do stanu domyslnego" send "%{lag::wiadomosc::kolor1}%mlag ustaw config &5-%{lag::wiadomosc::kolor1}% przywraca konfiguracje do stanu domyslnego" if arg 1 is "reload" or "przeladuj": if arg 2 is "messages" or "wiadomosci": set {lag::wiadomosc::tag} to yml value "Tag" from file "plugins/mLag/messages.yml" set {lag::wiadomosc::kolor1} to yml value "KolorWiadomosci" from file "plugins/mLag/messages.yml" set {lag::wiadomosc::kolor2} to yml value "KolorWazny" from file "plugins/mLag/messages.yml" set {lag::wiadomosc::wiadomoscuprawnienia} to yml value "WiadomoscUprawnienia" from file "plugins/mLag/messages.yml" set {lag::wiadomosc::wiadomoscpustka} to yml value "WiadomoscPustka" from file "plugins/mLag/messages.yml" set {lag::wiadomosc::wiadomoscpustkaotwarcie} to yml value "WiadomoscPustkaOtwarcie" from file "plugins/mLag/messages.yml" set {lag::wiadomosc::wiadomoscdonastepnego} to yml value "WiadomoscDoNastepnego" from file "plugins/mLag/messages.yml" send "%{lag::wiadomosc::tag}%%{lag::wiadomosc::kolor1}% Przeladowano ustawienia wiadomosci." if arg 2 is "config": set {lag::czas} to yml value "Czas" from file "plugins/mLag/config.yml" set {lag::czas} to {lag::czas} parsed as integer set {lag::cooldown} to yml value "Czas" from file "plugins/mLag/config.yml" set {lag::cooldown} to {lag::cooldown} parsed as integer send "%{lag::wiadomosc::tag}%%{lag::wiadomosc::kolor1}% Przeladowano wiadomosci" if arg 2 is "skrypt" or "skript": execute player command "/sk reload %script%" send "%{lag::wiadomosc::tag}%%{lag::wiadomosc::kolor1}% Przeladowano ustawienia." if arg 2 isn't set: send "%{lag::wiadomosc::kolor1}%mlag reload messages &5-%{lag::wiadomosc::kolor1}% przeladowuje konfiguracje wiadomosci (messages.yml)" send "%{lag::wiadomosc::kolor1}%mlag reload config &5-%{lag::wiadomosc::kolor1}% przeladowuje konfiguracje (config.yml)" send "%{lag::wiadomosc::kolor1}%mlag reload skrypt &5-%{lag::wiadomosc::kolor1}% przeladowuje cały skrypt i zwraca ewentualne bledy." if arg 1 is "sprawdz": set {_mlag::wiadomosc::sprawdz} to {lag::wiadomosc::wiadomoscdonastepnego} replace every "@czas@" with "%{lag::cooldown}%" in {_mlag::wiadomosc::sprawdz} send "%{lag::wiadomosc::tag}%%{lag::wiadomosc::kolor1}% %{_mlag::wiadomosc::sprawdz}%" if arg 1 is "reset": set {Infoz} to {Info} replace all "|tresc|" in {Infoz} with "%{czas}% sekund" send "%{lag::wiadomosc::tag}%%{lag::wiadomosc::kolor1}% Resetowano czas odliczania %{Infoz}%" if arg 1 isn't set: send "%{lag::wiadomosc::tag}% %{lag::wiadomosc::kolor1}%- &5Skrypt na pustke by Kurotsuwa" #Jedyny punkt licencji: Zabraniam zmieniania tego linijki.# send "%{lag::wiadomosc::kolor1}%mlag sprawdz &6-%{lag::wiadomosc::kolor1}% pokazuje czas do nastepnego usuwania itemów" send "%{lag::wiadomosc::kolor1}%pustka &6-%{lag::wiadomosc::kolor1}% otwiera pustke" if player has permission "mlag.admin": send "&cKomendy administratora:" send "%{lag::wiadomosc::kolor1}%mlag ustaw skrzynia &c-%{lag::wiadomosc::kolor1}% generuje skrzynie do ktorej trafiaja itemy z otchlani" send "%{lag::wiadomosc::kolor1}%mlag reset &c-%{lag::wiadomosc::kolor1}% resetuje odliczanie do nastepnego auto odliczania" send "%{lag::wiadomosc::kolor1}%mlag czysc &c-%{lag::wiadomosc::kolor1}% wymusza usuwania itemow" send "&5Komendy dla technika" send "%{lag::wiadomosc::kolor1}%mlag reload messages &5-%{lag::wiadomosc::kolor1}% przeladowuje konfiguracje wiadomosci (messages.yml)" send "%{lag::wiadomosc::kolor1}%mlag reload config &5-%{lag::wiadomosc::kolor1}% przeladowuje konfiguracje (config.yml)" send "%{lag::wiadomosc::kolor1}%mlag reload skrypt &5-%{lag::wiadomosc::kolor1}% przeladowuje cały skrypt i zwraca ewentualne bledy." send "%{lag::wiadomosc::kolor1}%mlag ustaw messages &5-%{lag::wiadomosc::kolor1}% przywraca konfiguracje wiadomosci do stanu domyslnego" send "%{lag::wiadomosc::kolor1}%mlag ustaw config &5-%{lag::wiadomosc::kolor1}% przywraca konfiguracje do stanu domyslnego" every 1 seconds: if {lag::cooldown} = 0: set {lag::cooldown} to {lag::czas} loop 54 times: set slot loop-number - 1 of block at {lag::pustka::ustawiona} to air set {lag::licznik} to 0 loop all entities: if loop-entity is a dropped item: add items within entity loop-entity to inventory of block at {lag::pustka::ustawiona} delete loop-entity set {lag::pustka::stan} to true broadcast "%{lag::wiadomosc::tag}%%{lag::wiadomosc::kolor1}% %{lag::wiadomosc::wiadomoscpustka}%" else: remove 1 from {lag::cooldown} command /pustka: trigger: open the inventory of the block at {lag::pustka::ustawiona} to the player send "%{lag::wiadomosc::tag}%%{lag::wiadomosc::kolor1}% %{lag::wiadomosc::wiadomoscpustkaotwarcie}%" on load: if {lag::pustka::ustawiona} isn't set: execute console command "/mlag ustaw skrzynia" #Generowanie pliku# if file existance of "plugins/mLag/messages.yml" is false: create file "plugins/mLag/messages.yml" wait 1 second execute console command "/mlag ustaw messages" if file existance of "plugins/mLag/config.yml" is false: create file "plugins/mLag/config.yml" wait 1 seconds execute console command "/mlag ustaw config" #Wczytywanie danych# execute console command "/mlag reload messages" execute console command "/mlag reload config"