I need a skript that auto compresses items with gradients and lore but nothing works

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

i tried this multiple different ways

on mine of iron ore:
if player is holding compass named "&fIron AutoCompressor" in off hand:
set {amountIron} to amount of iron ore in player's inventory
loop {amountIron} / 32 times:
remove 32 iron ore from player's inventory
set {Iron} to glowing iron ingot named "&fCompressed Iron"
add {Iron} to player's inventory
 
i tried this multiple different ways

on mine of iron ore:
if player is holding compass named "&fIron AutoCompressor" in off hand:
set {amountIron} to amount of iron ore in player's inventory
loop {amountIron} / 32 times:
remove 32 iron ore from player's inventory
set {Iron} to glowing iron ingot named "&fCompressed Iron"
add {Iron} to player's inventory
if player's offhand item contains compass named "&fIron AutoCompressor":
 
try this, it passed the Parser and i changed a little bit of the variable definitions
Code:
on mine of iron ore:
    if player is holding compass named "&fIron AutoCompressor" in off hand:
        set {_amountIron} to number of iron ore in player's inventory
        loop {_amountIron} / 32 times:
            remove 32 iron ore from player's inventory
            set {_iron} to glowing iron ingot
            add {_iron} named "&fCompressed Iron" to player's inventory
 
I haven't tested this yet but this should work.
Code:
on block break:
    if event-block is iron ore:
        if player's off hand contains a compass with name "blah":
            if player's inventory contains more than 32 raw iron ingots:
                remove 32 raw iron ingots from player
                give player "&f&lCompressed Iron"
 
I haven't tested this yet but this should work.
Code:
on block break:
    if event-block is iron ore:
        if player's off hand contains a compass with name "blah":
            if player's inventory contains more than 32 raw iron ingots:
                remove 32 raw iron ingots from player
                give player "&f&lCompressed Iron"
havent tested but raw iron is not raw_iron_ingot its raw_iron and you didnt define what you were giving the player
Code:
on block break:
    if event-block is iron ore:
        if player's off hand contains a compass named "blah":
            if player's inventory contains more than 31 raw iron:
                remove 32 raw iron from player
                give player 1 iron block named "&f&lCompressed Iron"
 
havent tested but raw iron is not raw_iron_ingot its raw_iron and you didnt define what you were giving the player
Code:
on block break:
    if event-block is iron ore:
        if player's off hand contains a compass named "blah":
            if player's inventory contains more than 31 raw iron:
                remove 32 raw iron from player
                give player 1 iron block named "&f&lCompressed Iron"
Oh yeah, that was a silly mistake of mine. Sorry!