on join: if {gui::%player%} is not set: set {gui::%player%} to true set {gui::%player%::1} to 2 260 named "Poczatkowy item!" command /gui [] [] []: trigger: if sender has permission "gui.admin": if arg 1 is not set: send "Komendy gui." send "/gui dodaj - dodaje item do gui gracza." send "/gui dodaj * - dodaje item do gui wszystkich graczy." send "/gui pokaz - pokazuje textowo twoje itemy." stop if arg 1 is "dodaj": if arg 2 is "*": if arg 3 is set: loop {gui::*}: add arg 3 to {gui::%loop-index%::*} broadcast "Administrator %player% dal %arg 3% do waszych gui!" stop send "Podaj item." stop if {gui::%arg 2%} is not set: send "Nie ma takiego gracza." stop if arg 3 is set: add arg 3 to {gui::%arg 2%::*} send "Dales %arg 3% dla gracza %arg 2%" send "Otrzymales %arg 3% od admina %player%" to "%arg 2%" parsed as offlineplayer stop send "Podaj item." stop send "zly argument." stop send "Brak permissi." stop command /guiotworz: trigger: open chest with 6 rows named "Twoje itemy." to player wait 2 tick loop {gui::%player%::*}: set {_i} to "%loop-index%" parsed as integer if {_i} is smaller than 63: set player's current inventory's slot {_i}-1 to loop-value stop on inventory close: if "%inventory name of player's current inventory%" contains "twoje itemy": set {_i} to 0 loop 54 times: set {_i1} to {_i} + 1 set {gui::%player%::%{_i1}%} to player's current inventory's slot {_i} add 1 to {_i} loop {gui::%player%::*}: if "%loop-value%" is "air": delete {gui::%player%::%loop-index%}