variables: {misja-1} = 10 #ile mobow trzeba zabic {misja-2} = 15 #ile mobow trzeba zabic function misja(p:player,n:number): {misja::%{_p}%::%{_n}%} is false if {misja::%{_p}%::%{_n}%::postep} is not set: set {misja::%{_p}%::%{_n}%::postep} to 0 add 1 to {misja::%{_p}%::%{_n}%::postep} if {misja::%{_p}%::%{_n}%::postep} >= {misja-%{_n}%}: send "ukonczyles misje" to {_p} set {misja::%{_p}%::%{_n}%} to true if {_n} < 9: add 1 to {_n} set {misja::%{_p}%::%{_n}%} to false on rightclick on entity: event-entity is villager name of event-entity = "&cnazwa" open chest inventory named "&cnazwa" with 1 row to player loop 9 times: #9 - ilosc misji if {misja::%player%::%loop-number%} is true: set slot (loop-number - 1) of player's current inventory to yellow stained glass pane else if {misja::%player%::%loop-number%} is false: set slot (loop-number - 1) of player's current inventory to green stained glass pane else: set slot (loop-number - 1) of player's current inventory to gray stained glass pane on join: if {misja::%player%::1} is not set: set {misja::%player%::1} to false on death: attacker is a player victim is not a player # MISJA 1: if name of victim is "&cnazwa": misja(attacker,1) # MISJA 2: else if name of victim is "&cnazwa2": misja(attacker,2) on inventory click: name of player's inventory = "&cnazwa" clicked inventory is not player's inventory cancel event