options: # czym jest rzucane TNT na twoim serwerze rzucane-tnt: tnt named "&6Rzucane &cTNT" # maksymalne ilości koxów, refilli, pereł endu oraz rzucanych TNT w ekwipunku gracza koxy-max: 2 refy-max: 12 perly-max: 3 rzucane-max: 6 # informacje dotyczące depozytu depozyt-cena: 1 gold block depozyt-nazwa: &c&lDepozyt function reloadDepozytGUI(p: player): if {KOXY::%{_p}%} is not set: set {KOXY::%{_p}%} to 0 if {REFY::%{_p}%} is not set: set {REFY::%{_p}%} to 0 if {PERLY::%{_p}%} is not set: set {PERLY::%{_p}%} to 0 if {RZUCANE::%{_p}%} is not set: set {RZUCANE::%{_p}%} to 0 set slot 1 of {_p}'s current inventory to enchanted golden apple named "&c&lKOXY" with lore "&6Kliknij i wyplac koxy z depozytu!" and "" and "&bPosiadasz: &e%{KOXY::%{_p}%}%" and "" and "&7Kliknij &aLPM&7, aby wyplacic!" set slot 3 of {_p}'s current inventory to golden apple named "&c&lREFY" with lore "&6Kliknij i wyplac refy z depozytu!" and "" and "&bPosiadasz: &e%{REFY::%{_p}%}%" and "" and "&7Kliknij &aLPM&7, aby wyplacic!" set slot 5 of {_p}'s current inventory to ender pearl named "&c&lPERLY" with lore "&6Kliknij i wyplac perly z depozytu!" and "" and "&bPosiadasz: &e%{PERLY::%{_p}%}%" and "" and "&7Kliknij &aLPM&7, aby wyplacic!" set slot 7 of {_p}'s current inventory to tnt named "&6&lRzucane &c&lTNT" with lore "&6Kliknij i wyplac rzucane TNT z depozytu!" and "" and "&bPosiadasz: &e%{RZUCANE::%{_p}%}%" and "" and "&7Kliknij &aLPM&7, aby wyplacic!" every 1 second: loop all players: if loop-player has ({@koxy-max} + 1) of enchanted golden apple: add ((amount of enchanted golden apple in loop-player's inventory) - {@koxy-max}) to {KOXY::%loop-player%} remove ((amount of enchanted golden apple in loop-player's inventory) - {@koxy-max}) of enchanted golden apple from loop-player's inventory send "&cMiales za duzo koxow! Przeniesiono nadmiar do depozytu!" to loop-player if loop-player has ({@refy-max} + 1) of golden apple: add ((amount of golden apple in loop-player's inventory) - {@refy-max}) to {REFY::%loop-player%} remove ((amount of golden apple in loop-player's inventory) - {@refy-max}) of golden apple from loop-player's inventory send "&cMiales za duzo refow! Przeniesiono nadmiar do depozytu!" to loop-player if loop-player has ({@perly-max} + 1) of ender pearl: add ((amount of ender pearl in loop-player's inventory) - {@perly-max}) to {PERLY::%loop-player%} remove ((amount of ender pearl in loop-player's inventory) - {@perly-max}) of ender pearl from loop-player's inventory send "&cMiales za duzo perel! Przeniesiono nadmiar do depozytu!" to loop-player if loop-player has ({@rzucane-max} + 1) of {@rzucane-tnt}: add ((amount of {@rzucane-tnt} in loop-player's inventory) - {@rzucane-max}) to {RZUCANE::%loop-player%} remove ((amount of {@rzucane-tnt} in loop-player's inventory) - {@rzucane-max}) of {@rzucane-tnt} from loop-player's inventory send "&cMiales za rzucanych TNT! Przeniesiono nadmiar do depozytu!" to loop-player command /depozyt: trigger: if player doesn't have {@depozyt-cena}: send "&6Aby otworzyc depozyt, potrzebujesz &ezlotego bloku&6!" to player stop open chest with 1 row named "{@depozyt-nazwa}" to player remove {@depozyt-cena} from player loop 9 times: set slot loop-number - 1 of player's current inventory to gray glass pane named " " reloadDepozytGUI(player) on command "/schowek": cancel event send "&c&l/schowek&6? Co to? Znam tylko &2/depozyt&6." to player on inventory click: if inventory name of player's current inventory is not "{@depozyt-nazwa}": stop if clicked inventory is player's inventory: stop cancel event if clicked slot is 1: if player has {@koxy-max} enchanted golden apple: send "&cJuz masz &6{@koxy-max} &ckoxy!" to player stop if {KOXY::%player%} is less than 1: send "&cProbowalem wyplacic koxa.. ale masz pusty depozyt." to player stop if player doesn't have enough space for 1 enchanted golden apple: send "&cProbowalem wyplacic koxa.. ale masz pelny ekwipunek." to player stop loop {@koxy-max} times: if player has {@koxy-max} enchanted golden apple: exit loop if {KOXY::%player%} is less than 1: exit loop if player doesn't have enough space for 1 enchanted golden apple: exit loop add enchanted golden apple to player remove 1 from {KOXY::%player%} add 1 to {_num} if {_num} is not set: stop send "&aWyplacono &6%{_num}% &akoxow!" to player reloadDepozytGUI(player) else if clicked slot is 3: if player has {@refy-max} golden apple: send "&cJuz masz &6{@refy-max} &crefow!" to player stop if {REFY::%player%} is less than 1: send "&cProbowalem wyplacic refa.. ale masz pusty depozyt." to player stop if player doesn't have enough space for 1 golden apple: send "&cProbowalem wyplacic refa.. ale masz pelny ekwipunek." to player stop loop {@refy-max} times: if player has {@refy-max} golden apple: exit loop if {REFY::%player%} is less than 1: exit loop if player doesn't have enough space for 1 golden apple: exit loop add golden apple to player remove 1 from {REFY::%player%} add 1 to {_num} if {_num} is not set: stop send "&aWyplacono &6%{_num}% &arefow!" to player reloadDepozytGUI(player) else if clicked slot is 5: if player has {@perly-max} ender pearl: send "&cJuz masz &6{@perly-max} &cperly!" to player stop if {PERLY::%player%} is less than 1: send "&cProbowalem wyplacic perle.. ale masz pusty depozyt." to player stop if player doesn't have enough space for 1 ender pearl: send "&cProbowalem wyplacic perle.. ale masz pelny ekwipunek." to player stop loop {@perly-max} times: if player has {@perly-max} ender pearl: exit loop if {PERLY::%player%} is less than 1: exit loop if player doesn't have enough space for 1 ender pearl: exit loop add ender pearl to player remove 1 from {PERLY::%player%} add 1 to {_num} if {_num} is not set: stop send "&aWyplacono &6%{_num}% &aperel!" to player reloadDepozytGUI(player) else if clicked slot is 7: if player has {@rzucane-max} {@rzucane-tnt}: send "&cJuz masz &6{@rzucane-max} &crzucanych TNT!" to player stop if {RZUCANE::%player%} is less than 1: send "&cProbowalem wyplacic rzucane TNT.. ale masz pusty depozyt." to player stop if player doesn't have enough space for 1 {@rzucane-tnt}: send "&cProbowalem wyplacic rzucane TNT.. ale masz pelny ekwipunek." to player stop loop {@rzucane-max} times: if player has {@rzucane-max} {@rzucane-tnt}: exit loop if {RZUCANE::%player%} is less than 1: exit loop if player doesn't have enough space for 1 {@rzucane-tnt}: exit loop add {@rzucane-tnt} to player remove 1 from {RZUCANE::%player%} add 1 to {_num} if {_num} is not set: stop send "&aWyplacono &6%{_num}% &arzucanych TNT!" to player reloadDepozytGUI(player) on damage: if inventory name of victim's current inventory is "{@depozyt-nazwa}": close victim's inventory