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 "%sender% 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 %sender%" to "%arg 2%" parsed as offlineplayer stop send "Podaj item." stop send "zly argument." stop send "Brak permissi." stop command /guiotworz: trigger: if size of {gui::%player%::*} is 0: send "Pusto." stop 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: if player's current inventory's slot {_i} is not air: if "%{gui::%player%::*}%" contains "%player's current inventory's slot {_i}%": send "%{gui::%player%::*}% &c%player's current inventory's slot {_i}%" add player's current inventory's slot {_i} to {_gui::*} else: give player's current inventory's slot {_i} to player add 1 to {_i} if size of {_gui::*} is 0: delete {gui::%player%::*} stop set {gui::%player%::*} to {_gui::*} stop