Jump to content

Auto Compressor Skript


Enchanted_Reeses

Recommended Posts

Issue I'm having is that it will take any ore for example if i set ore1 to redstone, it will take any redstone like enchanted redstone or renamed redstone when i want it to be generic redstone, any ideas would be helpful!



command /autocompresser:
    permission: autocompress
    trigger:
        if {autoc::%player%} is true:
            set {autoc::%player%} to false
            send "&aAuto Compresser Is Now &cDisabled&a!"
        else:
            set {autoc::%player%} to true
            send "&aAuto Compresser Is Now Enabled!"
on load:
    set {autoc::%player%} to false
every 0.05 seconds:
    loop all players:
        if {autoc::%loop-player%} is true:
            if inventory of loop-player contains {ore1}:
                if loop-player has enough space for 1 lapis block:
                    remove {ore1} from loop-player's inventory
                    give loop-player 1 lapis block
            if inventory of loop-player contains {ore2}:
                if loop-player has enough space for 1 coal block:
                    remove {ore2} from loop-player's inventory
                    give loop-player 1 coal block
            if inventory of loop-player contains {ore3}:
                if loop-player has enough space for 1 redstone block:
                    remove {ore3} from loop-player's inventory
                    give loop-player 1 redstone block
            if inventory of loop-player contains {ore4}:
                if loop-player has enough space for 1 diamond block:
                    remove {ore4} from loop-player's inventory
                    give loop-player 1 diamond block
command /setore1:
    permission: op
    trigger:
        set {ore1} to 9 of player's tool
command /setore2:
    permission: op
    trigger:
        set {ore2} to 9 of player's tool
command /setore3:
    permission: op
    trigger:
        set {ore3} to 9 of player's tool
command /setore4:
    permission: op
    trigger:
        set {ore4} to 9 of player's tool

Edited by Enchanted_Reeses

Just a skripter who likes to have fun

I also think I'm pretty good at it

PS my discord is Enchanted#3933 incase idk anything?

Link to comment
Share on other sites

Maybe you could rename the redstone ore to something specific, and then try and have it single that one named item out? 

For Example:

If {ore1} is redstone ore named "&4Redstone Ore":

Or you could just remove the {ore1} and replace it with:

if inventory of loop-player contains redstone ore named "&4Redstone Ore":

You could also have it so that it drops that named redstone when you break or recieve normal redstone
        



 

Edited by LunarBurn101
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...