#Drops Skript help STILL NEEDS HELP😔
1 messages · Page 1 of 1 (latest)
"can someone do this for me" isn't exactly asking for help
ill format it better mb
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
Sorry I deleted the old ones
This script dosent work
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
on block drop:
cancel event
loop event-items:
loop (1 + level of fortune of player's tool) times:
decompressItem(player, event-item)```
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}
yeah I think that should work
on block drop:
cancel event
loop event-items:
loop (1 + level of fortune of player's tool) times:
decompressItem(player, loop-value-1)```
all the coal disapears from my inventory
blocks and regular
everying reloaded correctly
hmm alr
Drops Skript help STILL NEEDS HELP
Drops Skript help STILL NEEDS HELP😔
can ayone help?
if register decompress is called on load you should use ram variables
