Solved Check enchant level (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.

Tropical

Member
Jan 29, 2017
19
0
1
29
Skript Version: Skript 2.2 (dev25c)
Skript Author: Bensku
Minecraft Version: 1.8
---
Full Code:
code_language.skript:
command /eff:
    trigger:
        if {UpgradePoints.%player%} is greater than or equal to {@EffUP}:
            send "   {@UpgradeSuccess}"
            remove 1 from {UpgradePoints.%player%}
            evaluate "enchant player's tool with efficiency %level of efficiency of player's tool + 1%"
        else:
            send "   {@MissingPoints}"


Errors on Reload:
N/A

Console Errors:
N/A

Addons using (including versions):
SkQuery / TuSKe

Troubleshooting:
N/A

Have you tried searching the docs? Yes
Have you tried searching the forums? No
What other methods have you tried to fix it? I've tried multiple methods like:
evaluate "if %level of efficiency of player's tool% is greater than or equal to 5" but that doesn't work.

The Skript works, but here's what I want- Currently you can enchant infinity times. I need to stop player's from enchanting if their tool is already Efficiency 5 or higher.
 
Why are you using evaluate?

code_language.skript:
if level of effifency of player's tool is greater than or equal to 5:
    send "Youre too high!"
else:
    enchant player's tool with effifency (level of efficiency of player's tool +1)
(Im pretty sure there its some error, cuz i write too fast. (effifency)
 
Why are you using evaluate?

code_language.skript:
if level of effifency of player's tool is greater than or equal to 5:
    send "Youre too high!"
else:
    enchant player's tool with effifency (level of efficiency of player's tool +1)
(Im pretty sure there its some error, cuz i write too fast. (effifency)
Type values only accept literals so you'll have to parse instead:
code_language.skript:
enchant the tool with "efficiency %level of efficiency of the tool + 1%" parsed as enchantment type
 
Why are you using evaluate?

code_language.skript:
if level of effifency of player's tool is greater than or equal to 5:
    send "Youre too high!"
else:
    enchant player's tool with effifency (level of efficiency of player's tool +1)
(Im pretty sure there its some error, cuz i write too fast. (effifency)
Type values only accept literals so you'll have to parse instead:
code_language.skript:
enchant the tool with "efficiency %level of efficiency of the tool + 1%" parsed as enchantment type
Thank you both!
 
Status
Not open for further replies.