How to get enchant level using Tuske

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

flaxeneel2

New Member
Jun 1, 2020
5
0
1
19
so I wanted to make a custom enchant named "Token hunter" with id "Token". I successfully registered the command and was able to put it on my item, but how do i get the level of the enchant on a held player's item?
im using tuske 1.8.2 with skript 2.2 and mc version 1.8.8

Code:
     set {_tokenhunterlvl} to level of Token of {_p}'s held tool

This gave me the following error:

Code:
 Can't understand this expression: 'level of Token of {_p}'s held tool' (script.sk, line 6: set {_fishinglvl} to level of Token of {_p}'s held tool')
 
Hey flaxeneel2,

You can get the level of a custom enchant of an item by using this:
Code:
 level of custom enchantment %custom enchantment% of %itemstack%

I hope this helps!
 
Status
Not open for further replies.