Solved Little problem

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

Mayor0701

Member
Oct 20, 2018
13
2
0
19
Hello! I have a little problem. I want to do what's on the gif, but I don't know because for some reason it's doesn't work.

I did this:
Code:
on inventory click:
    if cursor item is stone:
        if clicked item is pickaxe:
            set lore of clicked item to "asd"
            set clicked item to glowing clicked item
            set cursor item to air
            cancel event

I don't know why, but it doesn't work

This is the gif:

giphy.gif


It does not write any errors, writes "Successfully reloaded".
I use these: Skript dev25, SkQuery, Umbaska
 
Code:
    if cursor item is stone:
You put the cursor item as stone, and you right clicked a book onto the pickaxe. Since it wasn't stone, your code didn't apply, and you had a custom enchant plugin. Try right clicking a stone on the pickaxe?
 
of course I want to do it with a book, the stone was just a test.
Here you go then.
Code:
on inventory click:
    if cursor item is a book:
        if clicked item is pickaxe:
            cancel event
            set lore of clicked item to "asd"
            set clicked item to glowing clicked item
            set cursor item to air
            cancel event
Let me explain what that would do. It first of all checks if you're putting a book on a pickaxe, it'll then cancel the event, and do the rest of the code, so the CE plugin won't interfere. Hoping that helps! Didn't test it though.
 
Status
Not open for further replies.