options: tag: &6sr&6&lHalloween &7»&f #tag który pojawia się przed wiadomosciami pumpkin_creator: observer #blok którym tworzymy lokacje dyn on load: if {srhalloween::dynie} is not set: set {srhalloween::dynie} to 0 on join: if {srhalloween::%player%::dynie} is not set: set {srhalloween::%player%::dynie} to 0 on npc right click: if citizen is named "&6&lHalloween": if {srhalloween::%player%::dynie} is bigger or equal to {srhalloween::dynie}: if player can hold 1 diamond_pickaxe: send "{@tag} Gratulacje! Udalo Ci sie zebrac wszystkie dynie, o to twoja nagroda:&6 MegaKilof" give player diamond_pickaxe of unbreaking 10 and efficiency 10 and fortune 5 named "&a&lMEGA&f&l KILOF" with lore "Kilof Zostal Stworzony z kos z csgo" delete {srhalloween::%player%::lista::*} delete {srhalloween::%player%::dynie} stop else: send "{@tag} Nie mozesz odebrac nagrody poniewaz nie posiadasz miejsca w ekwipunku" to player stop else: send " " send "&7» &6Witaj &6&l%player%&6 w evencie z okazji Halloween" send "&7»&f Na mapie zostało ukrytych &6%{srhalloween::dynie}% dyn&f, odnajdz je wszystkie i zdobadz znakomita nagrode!" send " " on place {@pumpkin_creator}: if player has permission "srhalloween.create": if "%{srhalloween::event::*}%" contains "%location at event-block%": remove location at event-block from {srhalloween::event::*} set event-block to air set action bar of player to "&c&lUsunieto dynie:&f&l %location at event-block%" if {srhalloween::dynie} is smaller or equal to 0: set {srhalloween::dynie} to 0 else: remove 1 from {srhalloween::dynie} else: add location at event-block to {srhalloween::event::*} add 1 to {srhalloween::dynie} set event-block to pumpkin set action bar of player to "&a&lDodano dynie:&f&l %location at event-block%" else: stop on right click on pumpkin: if "%{srhalloween::%player%::lista::*}%" contains "%location at event-block%": send "{@tag} Niestety ale odnalazles juz ta dynie" to player stop else: if "%{srhalloween::event::*}%" contains "%location at event-block%": add location at event-block to {srhalloween::%player%::lista::*} add 1 to {srhalloween::%player%::dynie} send "{@tag} Gratulacje, odnalazles dynie" to player stop command /halloween [] []: trigger: if {srhalloween::%player%::dynie} is not set: set {srhalloween::%player%::dynie} to 0 if player has permission "srhalloween.admin": if arg 1 is not set: set action bar of player to "Zebrane dynie:&6 %{srhalloween::%player%::dynie}%&f /&6 %{srhalloween::dynie}%" stop if arg 1 is "on": #włacza event halloween loop {srhalloween::event::*}: set block at loop-value to pumpkin broadcast "&6&l%player%&e&l Wlaczyl event Halloween" stop if arg 1 is "off": #wyłącza event halloween loop {srhalloween::event::*}: set block at loop-value to air broadcast "&6&l%player%&e&l Wylaczyl event Halloween" stop if arg 1 is "list": #pokazuje lokalizacje wszystkich dyn loop {srhalloween::event::*}: send "&6%loop-index%&f %loop-value%" stop if arg 1 is "gracz": #wyswietla ilosc zebranych dyn podanego gracza send "&6&lDynie %arg 2% &7» &e%{srhalloween::%arg 2%::dynie}%" else: set action bar of player to "Zebrane dynie:&6 %{srhalloween::%player%::dynie}%&f /&6 %{srhalloween::dynie}%" stop