Solved AntiLore Skript

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

LesbianMan

Member
Jul 29, 2018
10
0
0
22
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?
 
on inventory click:
if "%clicked item%" is "nether_star":
if "%name of clicked item%" is "&4Pyro Axe":
cancel event

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

I'm just trying to make a skript so if the name of Nether star is "&2test" you cannot drag and drop or enchant it on to a special named Axe with custom named lore.
[doublepost=1532872692][/doublepost]help
 
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
 
Last edited:
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

Do u have discord?
 
Latest?, does it work for u? lol. And is it ok if u get on the server?
"Latest" is an inaccurate description. The latest version is Skript dev37c, are you using that?
I don't want to get on your server. Yes, the code is working for me - i copy pasted it from one of my scripts and just changed the strings to fit with yours.
 
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.
 
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.

Do I put it to plugin priority: highest?
 
Doesn't work :emoji_frowning:
[doublepost=1532881317,1532881205][/doublepost]You know what I'm trying to do right? I just don't want those custom enchants to work on that special axe
 
Yes i know what you're trying to do. But i don't really know any more potential solutions.
Atleast we got your Skript version upgraded, that will help surely