Hello, I'm new to skript coding and I'm trying to make it so if an item has a certain name such as "&2Test", you cannot add lores. I've tried so many different lines, But none work. Any ideas?
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!
on inventory click:
set {_item} to cursor item of player
if "%clicked item%" is "nether_star":
if "%name of clicked item%" is "&4Pyro Axe":
if "%lore of clicked item%" is "&4I come from the Iron Hills":
if "%clicked action%" is "swap with cursor":
cancel event
[doublepost=1532865584,1532865430][/doublepost]Then I tried this
on inventory click:
if "%clicked item%" is "nether_star":
if "%name of clicked item%" is "&4Pyro Axe":
cancel event
on inventory click:
event-player's cursor slot's name = "&4Pyro Axe"
event-item's name = "&2test"
cancel event
code_language.skript:on inventory click: event-player's cursor slot's name = "&4Pyro Axe" event-item's name = "&2test" cancel event
cursor slot is the item on the cursor; event-item is the item that was clicked upon. i empathize with your confusion, took me a while to figure this out aswell
I'm getting a skript error once I reloaded that code.Why are you asking?
Which Skript version are you using?
"Latest" is an inaccurate description. The latest version is Skript dev37c, are you using that?Latest?, does it work for u? lol. And is it ok if u get on the server?
In that case you're extremely far (4 years worth of updates) behind. The latest version is available here: https://github.com/SkriptLang/Skript/releases
Until you update to a much newer version, what you're trying to do might not be possible - at least i wouldn't know how
If you're using an additional plugin to add the custom enchants via those nether star, you should try setting skripts priority higher in the config.sk. It appears that the plugin you're using is faster in registering the event currently.
Yes, just try. It won't break anything