on script load:
register new shaped recipe for diamond pickaxe named "emerald kilof" using emerald, emerald, emerald, air, stick, air, air, stick, air
on craft:
loop all items in player's inventory:
if loop-item's name is "emerald kilof":
if loop-item is enchanted:
stop
set {_x} to random integer between 1 and 4
set {_item} to "%loop-item%" parsed as item type
if {_x} is 1:
enchant {_item} with efficiency 5
nawet kiedy dostawie x jest 2 3 4 dalej nie dziala