Kod:
Wymaga wcisniecia ppm trzymajac ksiazke z nazwa "Ulepszenie"
on right click with book:
name of player's held item is "Ulepszenie"
open chest with 3 rows named "&3Ulepszenie" to player
set slot (integers between 0 and 27) of player's current inventory to black stained glass pane named "&8*"
set slot 13 of player's current inventory to air
on inventory click:
name of event-inventory is "&3Ulepszenie"
clicked slot is black stained glass pane
cancel event
on inventory close:
name of event-inventory is "&3Ulepszenie"
set {_i} to slot 13 of event-inventory
{_i} is not air
{_i} is any armor:
enchant {_i} with protection 4 and thorns 1
give player {_i}
{_i} is any sword:
enchant {_i} with sharpness 6 and bane of arthropods 2 and smite 1
give player {_i}
else:
send "&cMożesz ulepszyć tylko zbroje i miecze!"
Jeżeli chcesz aby zabieralo ci ta ksiazke po otwarciu to między name of player's held item, a open chest with 3 rows dodaj linijke "remove event-item from player"