#why this not working

1 messages · Page 1 of 1 (latest)

verbal hawk
#

remove {_remove} cobblestone from {_p}

lament geyser
verbal hawk
#

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()
random flax
#

try remove 1 of cobblestone from {_p}

#

or remove 1 of cobblestone from inventory of {_p}