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

  2. LOOKING FOR A VERSION OF SKRIPT?

    You can always check out our Wiki for downloads and any other information about Skript!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How to set enchant level for my /enchant command?

Discussion in 'Skript' started by Norsumara_, Oct 22, 2021.

  1. Norsumara_

    Norsumara_ Member

    Joined:
    Oct 22, 2021
    Messages:
    1
    Likes Received:
    0
    I found a way to enchant item in players hand, but it can enchant that item only for level 1. I want to enchant that item to higher level. Please help me.

    Code (Text):
    1. command /emeenchant <enchantment type> [<text>]:
    2.     description: Enchants item in player's hand.
    3.     permission: eme.rename
    4.     trigger:
    5.         if player's held item is not air:
    6.             if arg-1 is set:
    7.                 enchant player's tool with arg-1
    --- Double Post Merged, Oct 22, 2021, Original Post Date: Oct 22, 2021 ---
    EDIT: I found way to enchant with just testing things for 2h! :emoji_slight_smile: My command works now like this:

    command /emeenchant <text> [<enchantment type>] [<text>]:
    description: Enchants item in player's hand.
    permission: eme.rename
    trigger:
    set {enchant_} to "%arg-2% %arg-3%" parsed as enchantment type
    if arg-1 is set:
    if arg-1 is "add":
    if player's held item is not air:
    if arg-2 is set:
    enchant player's tool with {enchant_}
    if arg-1 is "set":
    if player's held item is not air:
    if arg-2 is set:
    disenchant player's tool
    enchant player's tool with {enchant_}
    if arg-1 is "disenchant":
    if player's held item is not air:
    disenchant player's tool
    else:
    message "/emeenchant <add|set|disenchant> <enchant> <level>"
     
  2. Minecoll_YT

    Supporter Forums Helper

    Joined:
    Dec 2, 2018
    Messages:
    597
    Likes Received:
    37
    please mark this as solved in the corner right
     

Share This Page

Loading...