Durabilty

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

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

Tom1222322

Member
Feb 5, 2021
19
0
1
22
Hi, I'm trying to make my own enchantment ss. When I enchant an item I add it to the list of enchanted items. However, when the item's durability list changes, it is no longer visible and it no longer performs its assigned task. How can I fix that? My code:
1. enchanting the item
Code:
        set {_enchtel} to enchanted book
        set name of {_enchtel} to "&eEnchanted Book"
        set lore of {_enchtel} to "&9Tools" and "&7Telepathy I"
        if player's held item is tool:
            if player's inventory contains {_enchtel}:
                remove {_enchtel} from player's inventory
                set {_nameitem} to name of player's held item
                set {_geench} to player's held item
                remove player's held item from player's inventory
                set name of {_geench} to "&b%{_nameitem}%"
                set lore of {_geench} to "&7Telepathy I"
                add {_geench} to {sce.telepathy::*}
                give {_geench} to player
2. using the enchantment
Code:
on break:
    if {sce.telepathy::*} contains tool of player:
        clear drops
        give event-block to the player
 
Code:
on block break:
  if player has thing stuff check here:
    cancel drops
    give drops to player
maybe this work maybe not
 
Status
Not open for further replies.