Solved Custom enchants not working

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

Conutik

Member
Jan 12, 2020
19
1
0
17
Code:
command hi:
  permission: core.admin
  trigger:
    give player 1 paper named "&5&lEnchanted Paper &7[Divine]"

on inventory click:
  if cursor slot of player is paper:
    if name of cursor slot of player is "&5&lEnchanted Paper &7[Divine]":
      if slot item is stone sword:
        set lore of event-item to "&b&lDivine"
        send "&aSuccess!" to the player
        set cursor slot of player to air
      else:
        send "&cError! &7The item you are trying to enchant isn't a sword!"
 
on damage:
  if lore of attacker's tool contains "&b&lDivine":
    command "smite %victim%"
    damage attacker by 2 hearts

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
 
Give this a try?

Code:
command hi:
  permission: core.admin
  trigger:
    give player 1 paper named "&5&lEnchanted Paper &7[Divine]"
 
on inventory click:
  if cursor slot of player is paper:
    if name of cursor slot of player is "&5&lEnchanted Paper &7[Divine]":
      if event-item is stone sword:
        set lore of event-item to "&b&lDivine"
        send "&aSuccess!" to the player
        set cursor slot of player to air
      else:
        send "&cError! &7The item you are trying to enchant isn't a sword!"
 
on damage:
  if lore of attacker's tool contains "&b&lDivine":
    command "smite %victim%"
    damage attacker by 2 hearts
 
Give this a try?

Code:
command hi:
  permission: core.admin
  trigger:
    give player 1 paper named "&5&lEnchanted Paper &7[Divine]"
 
on inventory click:
  if cursor slot of player is paper:
    if name of cursor slot of player is "&5&lEnchanted Paper &7[Divine]":
      if event-item is stone sword:
        set lore of event-item to "&b&lDivine"
        send "&aSuccess!" to the player
        set cursor slot of player to air
      else:
        send "&cError! &7The item you are trying to enchant isn't a sword!"
 
on damage:
  if lore of attacker's tool contains "&b&lDivine":
    command "smite %victim%"
    damage attacker by 2 hearts
Nvm I fized but thnz tho
 
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