Custom Enchants

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

Status
Not open for further replies.

Turtlord

Member
Feb 11, 2021
14
0
1
So I made a new custom enchant...
And I don't know how to apply the enchantment on a tool
Code:
on skript load:
        register a new custom enchantment with id name "Replanish"
        set {_enchantment} to "Replanish" parsed as custom enchantment
        set max level of {_enchantment} to 1
        set rarity of {_enchantment} to 0.01
        set accepted items for {_enchantment} to "Hoe"
        set lore name of {_enchantment} to "Replanish"

command /ce [<text>]:
    permission: op
    trigger:
        if arg-1 is "Replanish":
            enchant player's held tool with {_enchantment}
            send "&2You enchanted your tool with Replanish" to player
 
You are storing the enchantment in a local variable. Local variables can’t be accessed outside of triggers.
 
Status
Not open for further replies.