on inventory click 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.

Viiral

New Member
Apr 26, 2019
9
0
0
19
England
So Im trying to make it so I drag and drop an item on top of a peice of gear and it will set a lore onto it but it isnt working.

When I reload the skript there is 0 errors it just doesnt seem to work.
Code:
on inventory click:
    if name of cursor slot of player contains "&6&lArmor Crystal (&c&lPhantom&6&l)":
        if event-item's lore contains "&6&lArmor Crystal":
            cancel event
            send "&c&l(!)&c You have already got a crystal on this peice of armor!"
        else:
            if event-item is air:
                stop
            else:
                cancel event
                set cursor slot of player to air
                play sound "SUCCESSFUL_HIT" to player with volume 1 and pitch 2

                set lore of event-item to "%lore of event-item%||&6&lArmor Crystal (&c&lPhantom&6&l)"
                send "{@prefix} &aYou have successfully applied a crystal on your armor!" to player

Skript Version 2.2-dev33
Spigot version - 1.8.8
Skript addons - SkQuery, Skellet, skRayFall, skUtilities, Skript-Mirror, TuSKe
[doublepost=1579026999,1578944786][/doublepost]bump
 
Status
Not open for further replies.