Jump to content

Help with enchanting items using skript


Recommended Posts

Hi there everyone! I am experiencing some issues with a code that I am writing. I am trying to enchant an item using a variable, but no matter which addons i use, it either doesn't work, or gives me an error. Here is a sample of the code:

command /enchantitem <player> <number>:
        set {_p} to arg-1
        set {_level} to arg-2
        create a gui with virtual chest inventory named "&benchants":
            format gui slot 0 with enchanted book named "&bEfficiency":
                create a gui with virtual chest inventory with 1 rows named "&bEfficiency":
                    format gui slot 1 with enchanted book named "&bEfficiency":
                        enchant {_p}'s held item with efficiency level {_level}

I am using the following addons currently, but I am willing to download any other ones if it can make the code work:

- Skript

- SkBee

- SkQuery

- Skript-GUI

- Essentials

- LuckPerms

I would greately appreciate it if you can help me out!

  • Confused 1

If I have helped you out in your post or you liked what I posted, please upvote and react to my post! It helps me a lot!

Some Minehut Links:

Server Rules • Staff Applications • News & Updates • Reports • Appeals

Minehut: VIP (07/04/2021 --> Current)
Elestra/Versa Realms: Manager (12/04/2021 --> Current)

If you have any questions contact me!
My Discord: BanditEagle#2481
My Spigot Profile: https://www.spigotmc.org/members/banditeagle.935281/
My IGN: BanditEagle

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