Jump to content

why isnt my skript working


CryLool

Recommended Posts

variables:
    {%player%.compress} = true


command autocompressortoggle:
    aliases: /act, /autocompt, /comptoggle, /toggleac
    permission: autocomp.comp
    permission message: &cBuy the voucher in shops!
    cooldown: 3 seconds
    cooldown bypass: op
    cooldown message: &cPlease wait %remaining time% before using this command again!
    trigger:
        if {%player%.compress} is true:    
            set {%player%.compress} to false
            send "&cAuto-Compressor is now set to %{%player%.compress}%!"
        else if {%player%.compress} is false:
            set {%player%.compress} to true
            send "&aAuto-Compressor is now set to %{%player%.compress}%!"

every 0.1 second:    
    loop all players:
        if loop-player has conduit named "&6Auto-Compressor":
            if {%loop-player%.compress} is true:
                if loop-player has 64 diamond:
                    remove 64 diamond from loop-player
                    give loop-player 1 diamond block of mending 1 with all flags hidden named "&6&lCompressed Diamonds" with lore "&7[Holds 64 diamonds]"
                else if loop-player has 64 netherite ingot:
                    remove 64 netherite ingot from loop-player
                    give loop-player 1 netherite block of mending 1 with all flags hidden named "&6&lCompressed Netherite Ingots" with lore "&7[Holds 64 netherite ingots]"
                else if loop-player has 64 iron ingot:
                    remove 64 iron ingot from loop-player
                    give loop-player 1 iron block of mending 1 with all flags hidden named "&6&lCompressed Iron Ingots" with lore "&7[Holds 64 iron ingots]"
                else if loop-player has 64 gold ingot:
                    remove 64 gold ingot from loop-player
                    give loop-player 1 gold block of mending 1 with all flags hidden named "&6&lCompressed Gold Ingots" with lore "&7[Holds 64 gold ingots]"
                else if loop-player has 64 emerald:
                    remove 64 emerald from loop-player
                    give loop-player 1 emerald block of mending 1 with all flags hidden named "&6&lCompressed Emeralds" with lore "&7[Holds 64 emeralds]"
                else if loop-player has 64 lapis lazuli:
                    remove 64 lapis lazuli from loop-player
                    give loop-player 1 block of lapis lazuli of mending 1 with all flags hidden named "&6&lCompressed Lapis" with lore "&7[Holds 64 lapis lazuli]"
                else if loop-player has 64 redstone:
                    remove 64 redstone from loop-player
                    give loop-player 1 redstone block of mending 1 with all flags hidden named "&6&lCompressed Redstone" with lore "&7[Holds 64 redstone]"
 

Link to comment
Share on other sites

You need to explain more on what isn't working.

Discord - tarna256

In-game name - _Tarna_

Website - https://tarna.dev
Paste Site: https://paste.tarna.dev

---------------------------------------------------------

[VIP] - 7/27/2020

Community Support - 7/8/20 | 11/3/20

Helper  - 11/3/20 - 2/21/21

Moderator - 2/21/21 - 5/17/21

❤️ - 5/17/21 - now

Moderator - 12/20/22 - now

---------------------------------------------------------

image.png.70849a9b84e0347ce107b8e3eaee312c.pngimage.png.2111009afbd8bef10966ba9ede35a199.png

Link to comment
Share on other sites

  • 1 month later...

It's a good idea to use

{compress::%uuid of player%}

at all times instead of {compress::%player%}
uuid of player uses players uuid which doesn't change if the player changes their minecraft name.

                                                                        Skærmbillede 2024-02-11 151140.png

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...