Simplified version (Enchant help)

  • 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 community!

    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!

LeeifMR

Member
Oct 2, 2024
27
1
3
I am making a skript that helps me make items quicker, but I am having trouble with enchanting, here is what I have
Code:
command /lllll [<number>]:
    permission: op
    trigger:
        if player's tool is not air:
            enchant player's tool with sharpness arg-1
        else:
            send "&cYou must be holding an item to enchant."

I also tried:

command /lllll [<number>]:
    permission: op
    trigger:
        if player's tool is not air:
            set {_i} to arg-1
            enchant player's tool with sharpness {_i}
        else:
            send "&cYou must be holding an item to enchant."
 
I see. Here is the corrected script (that I tried myself):

Code:
command /lllll [<number>]:
    permission: op
    trigger:
        if player's tool is not air:
            enchant player's tool with "sharpness %arg-1%" parsed as enchantment type
        else:
            send "&cYou must be holding an item to enchant." to player