# Potrzebne jest: # Skript # SkQuery # Vault # Najlepiej PermissionExx variables: {Halloween.wiad.konsola} = true command /halloween [] []: permission: halloween.uzycie permission message: &8>> &cNie masz uprawnien do tego! trigger: set {_koniec} to yaml value "koniec" from file "../PlikiHalloween/Halloween/config.yml" if {_koniec} is "true": send "&9Halloween>> &6Skrypt Halloween zostal wylaczony!" stop if arg 1 is not set: send "&6---- &e&lHalloween &6----" to player send "&b/halloween ustawblock" to player send "&8(Trzymaj blok, ktory ma byc do znalezienia!)" to player send "&b/halloween dajblok" to player send "&7&oPoloz, aby zapisac. (Jest to blok z nagrodami)" to player send "&b/halloween koniec" to player send "&7&oIstnieje prawdopodobienstwo jesli, ze skrypt zostanie wylaczony bloki sie nie zapisza" to player send "&b/halloween wiadk" to player send "&7&oWlacza / wylacza halloween'owe wiadomości do konsoli" to player stop if arg 1 is set: if arg 1 is "ustawblok": if player's tool is air: send "&9Halloween>> &6Blok, który ma byc do znalezienia nie moze byc powietrzem." to player stop set yaml value "Blok" from file "../PlikiHalloween/Halloween/config.yml" to "%player's tool%" send "&9Halloween>> &6Blok zmieniony." to player set {_blok} to 0 set {_lokacje::*} to yaml list "lokacje" from file "../PlikiHalloween/Halloween/loc.yml" loop {_lokacje::*}: set block at location of loop-value to player's tool add 1 to {_blok} send "&6%{_blok}% ulepszony do nowego bloku." to player stop if arg 1 is "dajblok": set {_blok} to yaml value "Blok" from file "../PlikiHalloween/Halloween/config.yml" if {_blok} is not set: set yaml value "Blok" from file "../PlikiHalloween/Halloween/config.yml" to "pumpkin" set {_blok} to pumpkin set {_blok} to {_blok} parsed as item give player {_blok} named "&6&lBlok Halloween" give player diamond named "&6&lRozwalenie bloku halloween" send "&9Halloween>> &6+1 Blok Halloween" to player send "&9Halloween>> &6+1 Rozwalenie bloku halloween" to player if arg 1 is "koniec": if sender is not console: send "&6Ta opcja moze byc uzyta tylko przez konsole." to player stop set {_lokacje::*} to yaml list "lokacje" from file "../PlikiHalloween/Halloween/loc.yml" loop {_lokacje::*}: set block at location of loop-value to air delete {halloween.%location of loop-value%} set yaml value "koniec" from file "../PlikiHalloween/Halloween/config.yml" to "true" if arg 1 is "wiadk": if {Halloween.wiad.konsola} is true: set {Halloween.wiad.konsola} to false send "&9Halloween>> &8Wylaczyles wiadomosci o stworzaniu w konsoli" to player else if {Halloween.wiad.konsola} is false: set {Halloween.wiad.konsola} to true send "&9Halloween>> &8Wlaczyles wiadomosci o stworzaniu w konsoli" to player on place: if name of player's tool contains "&6&lBlok Halloween": if player does not have the permission "halloween.uzycie": set player's tool to air send "&6Nie masz uprawnien do uzywania hallowenowych przedmiotow." to player stop if name of player's tool is "&6&lBlok Halloween": send "&6Halloweenowy blok dodany." to player set {halloween.%location of event-block%} to true set {_ilosc} to yaml value "Ilosc" from file "../PlikiHalloween/Halloween/loc.yml" add 1 to {_ilosc} set yaml value "Ilosc" from file "../PlikiHalloween/Halloween/loc.yml" to {_ilosc} add location of event-block to yaml list "lokacje" from file "../PlikiHalloween/Halloween/loc.yml" on click: if name of player's tool is "&6&lRozwalenie bloku halloween": send "&6Blok halloween usuniety." to player delete {halloween.%location of event-block%} set {_ilosc} to yaml value "Ilosc" from file "../PlikiHalloween/Halloween/loc.yml" remove 1 from {_ilosc} set yaml value "Ilosc" from file "../PlikiHalloween/Halloween/loc.yml" to {_ilosc} remove location of event-block from yaml list "lokacje" from file "../PlikiHalloween/Halloween/loc.yml" set event-block to air on break: if {halloween.%location of event-block%} is true: cancel event if {halloween.%location of event-block%.%player's uuid%} is true: send "&6Odebrales juz ta nagrode halloween." to player stop set {_petle} to yaml value "Petle" from file "../PlikiHalloween/Halloween/config.yml" set {_komendy::*} to yaml list "Komendy" from file "../PlikiHalloween/Halloween/config.yml" loop {_petle} times: set {_komenda} to random element out of {_komendy::*} replace all "@" in {_komenda} with "%player%" execute console command "/%{_komenda}%" set {_wykonajto} to yaml value "KomendaWykonanie" from file "../PlikiHalloween/Halloween/config.yml" replace all "@" in {_wykonajto} with "%player%" execute console command "/%{_wykonajto}%" add 1 to {halloween.znalezione.%player's uuid%} set {halloween.%location of event-block%.%player's uuid%} to true broadcast "&e&l%player% &6znalazl %{halloween.found.%player's uuid%}% &6&lblokow/blok Halloween" on click: if {halloween.%location of event-block%} is true: if {halloween.%location of event-block%.%player's uuid%} is true: send "&6Juz wziales te nagrode halloween." to player stop set {_petle} to yaml value "Petle" from file "../PlikiHalloween/Halloween/config.yml" set {_komendy::*} to yaml list "Komendyyy" from file "../PlikiHalloween/Halloween/config.yml" loop {_petle} times: set {_komenda} to random element out of {_komendy::*} replace all "@" in {_komenda} with "%player%" execute console command "/%{_komenda}%" set {_wykonajto} to yaml value "KomendaWykonanie" from file "../PlikiHalloween/Halloween/config.yml" replace all "@" in {_wykonajto} with "%player%" execute console command "/%{_wykonajto}%" add 1 to {halloween.znalezione.%player's uuid%} set {halloween.%location of event-block%.%player's uuid%} to true broadcast "&e&l%player% &6znalazl %{halloween.znalezione.%player's uuid%}% &6&lblokow/blok Halloween" every 30 seconds: if {Halloween.wiad.konsola} is true: set {_petle} to yaml value "Petle" from file "../PlikiHalloween/Halloween/config.yml" if {_petle} is not set: loop all players: if loop-player has the permission "halloween.uzycie": send "--------------------------" to console send "Halloween 2017 Info" to console send "Stworzona opcja Petle w config.yml" to console send "--------------------------" to console set yaml value "Petle" from file "../PlikiHalloween/Halloween/config.yml" to 2 set {_komendawykonanie} to yaml value "KomendaWykonanie" from file "../PlikiHalloween/Halloween/config.yml" if {_komendawykonanie} is not set: loop all players: if loop-player has the permission "halloween.uzycie": send "--------------------------" to console send "Halloween 2017 Info" to console send "Stworzone KomendaWykonanie w config.yml" to console send "--------------------------" to console set yaml value "KomendaWykonanie" from file "../PlikiHalloween/Halloween/config.yml" to "say @ znalazl !" set {_komendy::*} to yaml list "Komendyyy" from file "../PlikiHalloween/Halloween/config.yml" if {_komendy::*} is not set: loop all players: if loop-player has the permission "halloween.uzycie": send "--------------------------" to console send "Halloween 2017 Info" to console send "Stworzone KomendaWykonanie w config.yml" to console send "--------------------------" to console add "give @ diamond" to yaml list "KomendaWykonanie" from file "../PlikiHalloween/Halloween/config.yml" add "eco give @ 1000" to yaml list "KomendaWykonanie" from file "../PlikiHalloween/Halloween/config.yml" else: stop every 1 second: loop all players: display board named "&e&l Tabela " to loop-player make score " " in board of loop-player to 14 make score "Dynie znalezione: %{halloween.znalezione.%loop-player's uuid%}%" in board of loop-player to 13 make score "&eGraczy Online: %number of all players%" in board of loop-player to 12 move display of loop-player to sidebar