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!

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

Solved Custom enchants not working

Discussion in 'Requests' started by Conutik, Feb 12, 2020.

  1. Conutik

    Conutik Member

    Joined:
    Jan 12, 2020
    Messages:
    19
    Likes Received:
    1
    Code (Text):
    1. command hi:
    2.   permission: core.admin
    3.   trigger:
    4.     give player 1 paper named "&5&lEnchanted Paper &7[Divine]"
    5.  
    6. on inventory click:
    7.   if cursor slot of player is paper:
    8.     if name of cursor slot of player is "&5&lEnchanted Paper &7[Divine]":
    9.       if slot item is stone sword:
    10.         set lore of event-item to "&b&lDivine"
    11.         send "&aSuccess!" to the player
    12.         set cursor slot of player to air
    13.       else:
    14.         send "&cError! &7The item you are trying to enchant isn't a sword!"
    15.  
    16. on damage:
    17.   if lore of attacker's tool contains "&b&lDivine":
    18.     command "smite %victim%"
    19.     damage attacker by 2 hearts
    20.  
    21.  
    I have no errors everything goes successfully except that if the item is enchanted it wont work and if it works it doesnt add the lore
     
  2. Goose

    Goose Well-Known Member

    Joined:
    Nov 23, 2019
    Messages:
    400
    Likes Received:
    28
    Give this a try?

    Code (Text):
    1. command hi:
    2.   permission: core.admin
    3.   trigger:
    4.     give player 1 paper named "&5&lEnchanted Paper &7[Divine]"
    5.  
    6. on inventory click:
    7.   if cursor slot of player is paper:
    8.     if name of cursor slot of player is "&5&lEnchanted Paper &7[Divine]":
    9.       if event-item is stone sword:
    10.         set lore of event-item to "&b&lDivine"
    11.         send "&aSuccess!" to the player
    12.         set cursor slot of player to air
    13.       else:
    14.         send "&cError! &7The item you are trying to enchant isn't a sword!"
    15.  
    16. on damage:
    17.   if lore of attacker's tool contains "&b&lDivine":
    18.     command "smite %victim%"
    19.     damage attacker by 2 hearts
     
  3. Conutik

    Conutik Member

    Joined:
    Jan 12, 2020
    Messages:
    19
    Likes Received:
    1
    Nvm I fized but thnz tho
     
    • Friendly Friendly x 1
  4. Goose

    Goose Well-Known Member

    Joined:
    Nov 23, 2019
    Messages:
    400
    Likes Received:
    28
    Oh ok, no problem. Also this should've went in the Skript help section and not Requests because this isnt really a request and you would've gotten help much sooner :I
     
Loading...