#Drops Skript help STILL NEEDS HELP😔

1 messages · Page 1 of 1 (latest)

azure magnet
#

on block drop:
cancel event
loop (1 + level of fortune of player's tool) time:
give or drop event-items to player

can someone help me by editting this skript so it auto smelts the block and also if the player mines a for example coal block it gets turned into 9 coal or 9 smelted iron

azure magnet
#

this is a script help

#

is it not

amber bramble
#

"can someone do this for me" isn't exactly asking for help

azure magnet
#

ill format it better mb

amber bramble
# azure magnet on block drop: cancel event loop (1 + level of fortune of player's tool)...
on load:
    registerDecompressed(coal block, coal, 9)

function registerDecompressed(fromType: itemtype, toType: itemtype, amount: integer):
    set {decompressed::%{_fromType}%} to {_toType}
    set {decompressed::%{_fromType}%::amount} to {_amount}

function decompressItem(p: player, fromType: itemtype):
    set {_inv} to {_p}'s inventory

    set {_decompressedItem} to {decompressed::%{_fromType}%}
    set {_amount} to {decompressed::%{_fromType}%::amount}

    set {_n} to amount of {_fromType} in {_inv}
    remove {_n} of {_fromType} from {_inv}

    set {_amount} to {_n} * {_amount}
    give {_amount} of {_decompressedItem} to {_p}
#

somthing like that

#

please don't make 3 posts for the same skript help question

azure magnet
#

Sorry I deleted the old ones

amber bramble
#

how did you use it

azure magnet
#

I first tried putting it in by itself but didnt work

#

then put it infront of the old code

#

still didnt work

#

it all reloaded correctly

amber bramble
# azure magnet still didnt work
on block drop:
    cancel event
    loop event-items:
        loop (1 + level of fortune of player's tool) times:
            decompressItem(player, event-item)```
azure magnet
#

is this how it should look

#

how do I put it into a script format like your code u just sent

#

on block drop:
cancel event
loop event-items:
loop (1 + level of fortune of player's tool) times:
decompressItem(player, event-item)

on load:
registerDecompressed(coal block, coal, 9)

function registerDecompressed(fromType: itemtype, toType: itemtype, amount: integer):
set {decompressed::%{_fromType}%} to {_toType}
set {decompressed::%{_fromType}%::amount} to {_amount}

function decompressItem(p: player, fromType: itemtype):
set {_inv} to {_p}'s inventory

set {_decompressedItem} to {decompressed::%{_fromType}%}
set {_amount} to {decompressed::%{_fromType}%::amount}

set {_n} to amount of {_fromType} in {_inv}
remove {_n} of {_fromType} from {_inv}

set {_amount} to {_n} * {_amount}
give {_amount} of {_decompressedItem} to {_p}
amber bramble
#

yeah I think that should work

azure magnet
#

there was an error

amber bramble
azure magnet
#

all the coal disapears from my inventory

#

blocks and regular

#

everying reloaded correctly

amber bramble
#

hmm

#

honestly I'm too tired for this rn

#

I can help you tomorrow tho

azure magnet
#

hmm alr

#

Drops Skript help STILL NEEDS HELP

#

Drops Skript help STILL NEEDS HELP😔

azure magnet
#

can ayone help?

night vine