Solved Enchant item

  • 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.
Dec 19, 2019
31
2
8
Hello,
I tried this (code under this message) but it didn't work it give an error and idk how to fix it.
Thanks.
Code:
command /enchant <player> [<text>]:
    permission: rank.admin
    permission message: &8[&f&lServer&8] &7No Permissions!
    trigger:
        if arg-2 is not set:
            wait 3 ticks
            open chest with 4 rows named "&5&lEnchanting" to arg-1
            if arg-1's tool is any sword:
                format slot 11 of arg-1 with enchanted book named "&b&lSharpness" to close then run [execute console command "enchant %arg-1% sharpness"]
            if arg-1's tool is any pickaxe or any axe or any shovel:
                broadcast "ddd"
            if arg-1's held item is any helmet or any chestplate or any leggings or any boots:
                broadcast "ddd"
        if arg-2 is not set:
            if arg-2 is "sharpness":
                if level of sharpness of arg-1's tool is greater than 4:
                    send "Youre too high!" to arg-1
                else:
                    enchant the tool of arg-1 with "sharpness %level of sharpness of %arg-1%'s tool + 1%" parsed as enchantment type

Code:
Line 74: Can't understand this expression: level of sharpness of (script.sk, line 74: enchant the tool of arg-1 with "sharpness %level of sharpness of %arg-1%'s tool + 1%" parsed as enchantment type')
[doublepost=1586537169,1586526004][/doublepost]
Code:
enchant the tool of arg-1 with "efficiency %level of efficiency of arg-1' tool + 1%" parsed as enchantment type
 
Status
Not open for further replies.