Dobra, czyściło ekwipunek bo zamiast close dałem clear XD
tutaj gotowy kod, który został przeze mnie przetestowany i działa:
options:
item1: dirt
item2: stone
item3: diamond
item4: emerald
item5: obsidian
item6: chest
item7: sand
item8: sandstone
item9: diamond
on load:
set {prize::*} to {@item1}, {@item2}, {@item3}, {@item4}, {@item5}, {@item6}, {@item7}, {@item8} and {@item9}
command /zdrapka [<text>]:
trigger:
open chest inventory named "&2&lMC&6&lSquare&f&l.pl &8&l| &6&lZDRAPKI &8&l|" with 5 rows to player
set slot (integers from 0 to 9), 17, 18, 26, 27, (integers from 35 to 45) of player's current inventory to gray stained glass pane named "" with lore ""
set slot 10,11,15,16,19,20,24,25,28,29,33 and 34 of player's current inventory to white stained glass pane named "" with lore ""
set slot 12,13,14,21,22,23,30,31 and 32 of player's current inventory to blue stained glass pane named "&6Zdrapka" with lore "&7Zdrap, używając &aLPM!"
on inventory click:
name of player's current inventory is "&2&lMC&6&lSquare&f&l.pl &8&l| &6&lZDRAPKI &8&l|"
clicked inventory is not player's inventory
cancel event
type of clicked slot is blue stained glass pane
if amount of blue stained glass pane in player's current inventory > 6:
set {_it} to "%random element out of {prize::*}%" parsed as itemtype
set {_am} to random integer between 1 and 5
set slot (index of clicked slot) of player's current inventory to {_am} of {_it}
add {_am} of {_it} to player's inventory
stop
close player's inventory