on script load: if folder "plugins/KBANS" doesn't exists: create folder "plugins/Xbans" create folder "plugins/Xbans/TempBany" create folder "plugins/Xbans/TempMuty" create folder "plugins/Xbans/Bany" create folder "plugins/Xbans/Muty" broadcast "&4PLIKI KBANS ZOSTALY UTWORZONE!" #BAN command /ban [] []: permission: ban.admin permission message: &8>> &4Nie posiadasz permisji! trigger: if arg 1 is set: if arg 2 is set: if file "plugins/XBANS/Bany/%arg 1%.yml" doesn't exists: create file "plugins/XBANS/Bany/%arg 1%.yml" if sender is not console: set {_b} to "%player%" else: set {_b} to "CONSOLE" set {_player} to arg 1 set {_reason} to "%coloured arg-2%" set {_year} to "%year%" set {_month} to "%month%" set {_day} to "%day%" set {_h} to "%hour%" set {_m} to "%minute%" set {_data} to "%{_year}%.%{_month}%.%{_day}% %{_h}%:%{_m}%" set {reasonban1::%arg 1%} to "&8=======%nl%&c&lZostales zbanowany permametnie%nl%&c&lZbanowal: &4%{_b}%%nl%&c&lPowod: &4%{_reason}%%nl%&c&lData: &4%{_day}%.%{_month}%.%{_year}% %{_h}%:%{_m}%%nl%&8=======" kick arg 1 due to "&8=======%nl%&c&lZostales zbanowany permametnie%nl%&c&lZbanowal: &4%{_b}%%nl%&c&lPowod: &4%{_reason}%%nl%&c&lData: &4%{_day}%.%{_month}%.%{_year}% %{_h}%:%{_m}%%nl%&8=======" broadcast "&cGracz &4%arg 1% &czostal zbanowany przez &4%player%" set "Powod" to "%{reasonban1::%arg 1%}%" in yaml file "plugins/XBANS/Bany/%arg 1%.yml" set "Data" to "%{_data}%" in yaml file "plugins/XBANS/Bany/%arg 1%.yml" set "Wygasa-Za" to "NIGDY" in yaml file "plugins/XBANS/Bany/%arg 1%.yml" set "Admin-nadajacy" to "%{_b}%" in yaml file "plugins/XBANS/Bany/%arg 1%.yml" if offlineplayer-arg 1 is offline: send "&8>> &cZbanowales gracza offline: &4%arg 1% &cza: &4%arg 2%" else: send "&8>> &cZbanowales gracza: &4%arg 1% &cza: &4%arg 2%" else: send "&8>> &cTen gracz jest juz zbanowany!" stop else: send "&8>> &cPoprawne uzycie: &4/ban " stop else: send "&8>> &cPoprawne uzycie: &4/ban " stop #EVENT DO BANA on connect: if file "plugins/KBANS/Bany/%player%.yml" exists: kick player due to "%{reasonban1::%player%}%" #TEMPBAN command /tempban [] [] [] [] []: permission: tempban.admin permission message: &8>> &4Nie posiadasz permisji ! trigger: arg 1 is set: arg 2 is set: if file "plugins/KBANS/TempBany/%arg 1%.yml" exists: send "&8>> &cTen gracz jest juz zbanowany!" stop if sender is not console: set {_b} to "%player%" set {_reason} to "%coloured arg-5%" set {_year} to "%year%" parsed as number set {_month} to "%month%" parsed as number set {_day} to "%day%" parsed as number set {_h} to "%hour%" parsed as number set {_m} to "%minute%" parsed as number set {_data} to "%{_year}%.%{_month}%.%{_day}% %{_h}%:%{_m}%" if arg-3 is set: set {day2::%arg 1%} to number-arg-1 if arg-4 is set: set {h2::%arg 1%} to number-arg-2 if arg-5 is set: set {m2::%arg 1%} to number-arg-3 set {datawygasniecia::%arg 1%} to "%{day2::%arg 1%}% days %{h2::%arg 1%}% hours %{m2::%arg 1%}% minutes" set {reasonban::%arg 1%} to "&8=======%nl%&c&lZostales zbanowany%nl%&c&lZbanowal: &4%{_b}%%nl%&cPowod: &4%{_reason}%%nl%&cData: &4%{_data}%%nl%&cWygasa: &4%{datawygasniecia::%arg 1%}%%nl%&8=======" kick arg 1 due to "&8=======%nl%&c&lZostales zbanowany%nl%&c&lZbanowal: &4%{_b}%%nl%&c&lPowod: &4%{_reason}%%nl%&c&lData: &4%{_data}%%nl%&c&lWygasa: &4%{datawygasniecia::%arg 1%}%%nl%&8=======" if file "plugins/TempBany/%arg 1%.yml" doesn't exists: create file "plugins/KBANS/TempBany/%arg 1%.yml" set "Powod" to "%{_reason}%" in yaml file "plugins/KBANS/TempBany/%arg 1%.yml" set "Data" to "%{_data}%" in yaml file "plugins/KBANS/TempBany/%arg 1%.yml" set "Wygasa-Za" to "%{datawygasniecia::%arg 1%}%" in yaml file "plugins/KBANS/TempBany/%arg 1%.yml" set "Admin-nadajacy" to "%{_b}%" in yaml file "plugins/KBANS/TempBany/%arg 1%.yml" broadcast "&cGracz &4%arg 1% &czostal zbanowany &4Powod: &c%{_reason}% &4Wygasa: &c%{datawygasniecia::%arg 1%}%" add arg-1 to {tempbanned::*} else: send "&c>> Poprawne uzycie: &4/tempban " else: send "&c>> Poprawne uzycie: &4/tempban " #unban - WYMAGANY DO PRAWIDLOWEGO DZIALANIA TEMPBANA I BANA! INACZEJ NIE BEDZIE ODBANOWYWAC! command /unban []: permission: unban.admin permission message: &8>> &4Nie posiadasz permisji ! trigger: arg 1 is set: if file "plugins/KBANS/TempBany/%arg 1%.yml" exists: delete file "plugins/KBANS/TempBany/%arg 1%.yml" if file "plugins/KBANS/Bany/%arg 1%.yml" exists: delete file "plugins/KBANS/Bany/%arg 1%.yml" broadcast "&cGracz &4%arg 1% &czostal odbanowany!" else: send "&cGracz o nicku &4%arg 1% &cnie ma bana" else: send "&8>> &cPoprawne uzycie: &4/unban " #Eventy do tempbana every 1 minute: loop {tempbanned::*}: if {m2::%loop-value%} is more than 0: remove 1 from {m2::%loop-value%} if {m2::%loop-value%} is 0: if {h2::%loop-value%} is 0: if {day2::%loop-value%} is 0: execute server command "unban %loop-value%" remove loop-value from {tempbanned::*} stop set {m2::%loop-value%} to 59 if {h2::%loop-value%} is 0: if {day2::%loop-value%} is more than 0: remove 1 from {day2::%loop-value%} remove 1 from {h2::%loop-value%} stop remove 1 from {h2::%loop-value%} on connect: if file "plugins/KBANS/TempBany/%player%.yml" exists: kick player due to "%{reasonban::%player%}%" #MUTE command /mute [] []: permission: mute.admin permission message: &8>> &4Nie posiadasz permisji ! trigger: arg 1 is set: arg 2 is set: if file "plugins/KBANS/Muty/%arg 1%.yml" doesn't exists: create file "plugins/KBANS/Muty/%arg 1%.yml" if sender is console: set {_mutujacy} to "CONSOLE" if sender is not console: set {_mutujacy} to "%player%" set {_reason} to "%coloured arg-2%" set {_year} to "%year%" set {_month} to "%month%" set {_d} to "%day%" set {_h} to "%hour%" set {_m} to "%minute%" set {_data} to "%{_d}%.%{_month}%.%{_year}% %{_h}%:%{_m}%" set {reasonmute::%arg 1%} to "&cZostales wyciszony przez %{_mutujacy}% na zawsze za %{_reason}%!" broadcast "&8>> &cGracz &4%arg 1% &czostal wyciszony na zawsze przez &4%player% &cza &4%{_reason}%" send "&8>> %{reasonmute::%arg 1%}%" to arg 1 set "Powod" to "%{_reason}%" in yaml file "plugins/KBANS/Muty/%arg 1%.yml" set "Data_nadania" to "%{_data}%" in yaml file "plugins/KBANS/Muty/%arg 1%.yml" set "Admin" to "%{_mutujacy}%" in yaml file "plugins/KBANS/Muty/%arg 1%.yml" set "Wygasa" to "NIGDY" in yaml file "plugins/KBANS/Muty/%arg 1%.yml" else: send "&8>> &cTen gracz jest juz wyciszony" else: send "&8>> &cPoprawne uzycie: &4/mute " else: send "&8>> &cPoprawne uzycie: &4/mute " #EVENT DO MUTA on chat: if file "plugins/KBANS/Muty/%player%.yml" exists: send "&8>> &cJestes wyciszony na zawsze!" cancel event command /tempmute [] [] [] [] []: permission: tempmute.admin permission message: &8>> &4Nie posiadasz permisji ! trigger: arg 1 is set: arg 2 is set: if file "plugins/KBANS/TempMuty/%arg 1%.yml" exists: send "&8>> &cTen gracz jest juz wyciszony" stop if sender is not console: set {_mutujacy} to "%player%" set {_reason} to "%coloured arg-5%" set {_year} to "%year%" parsed as number set {_month} to "%month%" parsed as number set {_day} to "%day%" parsed as number set {_h} to "%hour%" parsed as number set {_m} to "%minute%" parsed as number set {_data} to "%{_day}%.%{_month}%.%{_year}% %{_h}%:%{_m}%" if arg-3 is set: set {day3::%arg 1%} to number-arg-1 if arg-4 is set: set {h3::%arg 1%} to number-arg-2 if arg-5 is set: set {m3::%arg 1%} to number-arg-3 set {datawygasniecia2::%arg 1%} to "%{day3::%arg 1%}% days %{h3::%arg 1%}% hours %{m3::%arg 1%}% minutes" set {reasontempmute::%arg 1%} to "&cZostales wyciszony przez %{_mutujacy}% na %{datawygasniecia2::%arg 1%}% data nadania: %{_data}%" send "%{reasontempmute::%arg 1%}%" to arg 1 broadcast "&cGracz &4%arg 1% &czostal wyciszony przez &4%{_mutujacy}% &cna &4%{datawygasniecia2::%arg 1%}%" if file "plugins/TempMuty/%arg 1%.yml" doesn't exists: create file "plugins/TempBany/%arg 1%.yml" set "Powod" to "%{_reason}%" in yaml file "plugins/KBANS/TempMuty/%arg 1%.yml" set "Data_nadania" to "%{_data}%" in yaml file "plugins/KBANS/TempMuty/%arg 1%.yml" set "Admin" to "%{_mutujacy}%" in yaml file "plugins/KBANS/TempMuty/%arg 1%.yml" set "Wygasa" to "%{datawygasniecia2::%arg 1%}%" in yaml file "plugins/KBANS/TempMuty/%arg 1%.yml" add arg-1 to {tempmuted::*} else: send "&8>> &cPoprawne uzycie: &4/tempmute " else: send "&8>> &cPoprawne uzycie: &4/tempmute " on chat: if file "plugins/KBANS/TempMuty/%player%.yml" exists: cancel event send "%{reasontempmute::%player%}%" #UNMUTE command /unmute []: permission: unmute.admin permission message: &8>> &4Nie posiadasz permisji ! trigger: arg 1 is set: if file "plugins/KBANS/TempMuty/%arg 1%.yml" exists: delete file "plugins/KBANS/TempMuty/%arg 1%.yml" if file "plugins/KBANS/Muty/%arg 1%.yml" exists: delete file "plugins/KBANS/Muty/%arg 1%.yml" broadcast "&cGracz &4%arg 1% &czostal odciszony!" else: send "&cGracz o nicku &4%arg 1% &cnie jest wyciszony" else: send "&8>> &cPoprawne uzycie: &4/unmute " #EVENTY DO TEMPMUTA every 1 minute: loop {tempmuted::*}: if {m3::%loop-value%} is more than 0: remove 1 from {m3::%loop-value%} if {m3::%loop-value%} is 0: if {h3::%loop-value%} is 0: if {day3::%loop-value%} is 0: execute server command "unmute %loop-value%" remove loop-value from {tempmuted::*} stop set {m3::%loop-value%} to 59 if {h3::%loop-value%} is 0: if {day3::%loop-value%} is more than 0: remove 1 from {day3::%loop-value%} remove 1 from {h3::%loop-value%} stop remove 1 from {h3::%loop-value%}