#why this not working
1 messages · Page 1 of 1 (latest)
Is there an integer in {_remove}?
yes
ill ful lskritp
options:
compressAmount: 32
triggerItem: nether star
name: &fCompressed Cobblestone
function compressedCobble() :: item:
set {_i} to cobblestone
set name of {_i} to "{@name}"
set lore of {_i} to "&7Compressed from 32 Cobblestone"
return {_i}
on inventory click:
compressCheck(player)
on pickup:
compressCheck(player)
function compressCheck(_p: player):
if offhand item of {_p} is not {@triggerItem}:
stop
wait 2 ticks
set {_amount} to amount of cobblestone in {_p}'s inventory
set {_compressed} to floor({_amount} / {@compressAmount})
if {_compressed} > 0:
set {_remove} to {_compressed} * {@compressAmount}
remove {_remove} cobblestone from {_p}
loop {_compressed} times:
give {_p} compressedCobble()