Omex Posted June 3, 2023 Share Posted June 3, 2023 i have this script which works with skript but it doesnt display hello message when i do it, i removed the "if diamond sword is enchanted with sharpness 5" part and it worked, but i am trying to do it with enchants, can someone help me? on inventory click: if event-inventory = (metadata tag "pickaxe" of player): if index of event-slot is 11: if player has diamond sword: if diamond sword is enchanted with sharpness 5: send "hello" to player Link to comment Share on other sites More sharing options...
RatOnMars Posted June 3, 2023 Share Posted June 3, 2023 on inventory click: if event-inventory = (metadata tag "pickaxe" of player): if index of event-slot is 11: if player has diamond sword: if diamond sword has sharpness 5: send "hello" to player please let me know if this works Link to comment Share on other sites More sharing options...
Omex Posted June 4, 2023 Author Share Posted June 4, 2023 it didnt work for me Link to comment Share on other sites More sharing options...
JoshG Posted June 4, 2023 Share Posted June 4, 2023 Hey hey! The issue with your Skript script lies in the way you're checking for enchantments on the diamond sword. Here's an updated version of the script that properly checks for a diamond sword with Sharpness 5 enchantment: on inventory click: if event-inventory = (metadata tag "pickaxe" of player): if index of event-slot is 11: if player has diamond sword: if "SHARPNESS:5" is in lore of diamond sword: send "hello" to player In this updated version, we're checking if the lore of the diamond sword contains the specific string "SHARPNESS:5". Note that the exact string may vary depending on your server's enchantment plugin or configuration. Make sure to save the script with a .sk extension, reload your Skript scripts or restart the server, and test the interaction with the diamond sword again. It should now display the "hello" message when the conditions are met. If I helped you at all please consider boosting my account with the follow button! Minehut ♥ [VIP] 12/19/2020 - Present I am either extremely active or not lol. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now