on command "/am": if yaml value "messages" from file "zmienne/serwer/am.yml" is not set: set yaml value "messages" from file "zmienne/serwer/am.yml" to 0 command /am [] [] []: permission : skript.am permission message : &4Nie masz dostepu do tej komendy! trigger: if arg 1 is "set": if arg 2 is number: if arg 3 is set: set yaml value "am.%arg 2%" from file "zmienne/serwer/am.yml" to coloured arg 3 send "&7&l[&4&lAutoMessage&7&l] &2&lPoprawnie ustawiono automatyczna wiadomosc nr &4%arg 2% &2&lna %coloured arg 3%" set {_max} to yaml value "messages" from file "zmienne/serwer/am.yml" if {_max} is smaller than arg 2: set yaml value "messages" from file "zmienne/serwer/am.yml" to arg 2 if arg 3 is not set: send "&cERROR - &6Musisz podac wiadomość automessage" else: send "&cERROR - &6ID musi być liczba!" to player if arg 1 is "sprawdz": if arg 2 is set: if yaml value "am.%arg 2%" from file "zmienne/serwer/am.yml" is set: if arg 2 is not number: send "&cERROR - &6Twoje id nie jest liczba" to player if arg 2 is number: set {_a} to yaml value "am.%arg 2%" from file "zmienne/serwer/am.yml" send "&cWiadomosc %arg 2% to - &6%{_a}%" to player else: send "&cERROR - &6Wiadomosci o id &4%arg 2% &6nie istnieje." if arg 2 is not set: send "&cERROR - &6Musisz podac id wiadomosci" to player if arg 1 is "usun": if arg 2 is set: if arg 2 is number: if yaml value "am.%arg 2%" from file "zmienne/serwer/am.yml" is set: delete yaml value "am.%arg 2%" from file "zmienne/serwer/am.yml" send "&2Wiadomosc zostala prawidlowo usunieta" to player else: send "&cERROR - &6Wiadomosci o id %arg 2% nie istnieje" if arg 2 is not number: send "&cERROR - &6ID musi byc liczba" if arg 2 is not set: send "&cERROR - &6Musisz podac id wiadomosci" to player if arg 1 is not set: send "&2/am set [id - liczba] [tresc wiadomosci] &7- &9Tworzenie wiadomosci" to player send "&2/am sprawdz [id - liczba &7- &9Sprawdzenie tresci wiadomosci" to player send "&2/am usun [id - liczba] &7- &9usuwanie wiadomosci" to player every 5 seconds: set {_max} to yaml value "messages" from file "zmienne/serwer/am.yml" set {_text} to random integer between 1 and {_max} if {_max} is not 0: if yaml value "am.%{_text}%" from file "zmienne/serwer/am.yml" is set: set {_mes} to yaml value "am.%{_text}%" from file "zmienne/serwer/am.yml" send "&8[&fMC-PL&c.NET&8] &e>> &r%{_mes}%" to players