Solved Drag and drop custom enchantments help!!

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

Selvati

Active Member
Jun 26, 2017
190
10
18
22
Okay so I have been making custom lore enchantments, the last piece of this puzzle is to make a skript that allows the player to 'drag and drop' the custom enchantment book over certain items, and it should add a custom lore to the clicked item and remove 1 of the enchantment books from the player's inventory.

I use the latest version of Spigot 1.12
I use TuSke, Skript, skRayfall 1.9.7, Skellet, SharpSK, skQueryLime 1.11, SkStuff,Umbaska 3.3, and skUtilities 0.9.0

So I have made this code which outputs no errors at all but it doesn't seem to be working!

code_language.skript:
on inventory click:
    cursor slot of player is enchanted book named "&fSmelt I":
        event-slot is a wooden_pickaxe:
            cancel the event
            set cursor slot of player to air
            set lore of event-item to "%lore of event-slot%||&fSmelt I"
            send "&aSuccess!" to the player
[doublepost=1498614915,1498503898][/doublepost]Bump
 
Oh, old Skript issue. Make:
code_language.skript:
cursor slot of player is enchanted book:
    name of cursor slot of player is "&fSmelt I":
            cancel the event
            set cursor slot of player to air
            set lore of event-item to "%lore of event-slot%||&fSmelt I"
            send "&aSuccess!" to the player
 
Oh, old Skript issue. Make:
code_language.skript:
cursor slot of player is enchanted book:
    name of cursor slot of player is "&fSmelt I":
            cancel the event
            set cursor slot of player to air
            set lore of event-item to "%lore of event-slot%||&fSmelt I"
            send "&aSuccess!" to the player
I'm officially stumped -.-
code_language.skript:
on inventory click:
    cursor slot of player is enchanted book:
        name of cursor slot of player is "&fSmelt I":
            cancel the event
            set cursor slot of player to air
            set lore of event-item to "%lore of event-slot%||&fSmelt I"
            send "&aSuccess!" to the player

Not sure why, again it comes back no errors, but still doesn't work! I even tried skMorkaz's click events.. nothing!
I really appreciate the help. ;D
[doublepost=1498666931,1498666382][/doublepost]This is what I've also come up with..... that also doesn't want to work, again no errors in console but not a single line of it actually works.

code_language.skript:
on inventory click:
    if cursor slot of player is enchanted book:
        if name of cursor slot of player is "&fSmelt I":
            if event-slot is any pickaxe:
                cancel the event
                set lore of event-slot to "%lore of event-slot%||&fSmelt I"
                send "&aSuccess!" to the player
                set cursor slot of player to air
 
Try to broadcast "%event-slot%" and you'll see what is the problem there.
I'll give it a go, thanks :emoji_grinning: !
[doublepost=1498670876,1498670710][/doublepost]I made:
code_language.skript:
on inventory click:
    broadcast "%event-slot%"
And always got "air"

I changed it to:
code_language.skript:
on inventory click:
    broadcast "%event-item%"
And always got "<none>"
 
I'll give it a go, thanks :emoji_grinning: !
[doublepost=1498670876,1498670710][/doublepost]I made:
code_language.skript:
on inventory click:
    broadcast "%event-slot%"
And always got "air"

I changed it to:
code_language.skript:
on inventory click:
    broadcast "%event-item%"
And always got "<none>"
Yep, and that's the problem.
For some reason, it just say it's air.

You're best of adding the option to the player use an anvil for this (combining there).
Cya.
 
Wait - Selvati, could you post your code and say what you did for it to work because I might use something like that on my server! :emoji_slight_smile: Thanks man
 
Status
Not open for further replies.