variables: {misja-1} = 3 {misja-2} = 15 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: name of event-entity = "&cnazwa" open chest with 1 rows named "&cnazwa" to player loop 9 times: if {misja::%player%::%loop-number%} is true: format slot (loop-number - 1) of player with yellow stained glass pane to close else if {misja::%player%::%loop-number%} is false: format slot (loop-number - 1) of player with green stained glass pane to close else: format slot (loop-number - 1) of player with gray stained glass pane to close 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 "&7Rycerz &3( lvl 1-10 )": misja(attacker,1) # MISJA 2: else if name of victim is "&cnazwa2": misja(attacker,2)