1. 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!

  2. LOOKING FOR A VERSION OF SKRIPT?

    You can always check out our Wiki for downloads and any other information about Skript!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

on inventory click help

Discussion in 'Skript' started by Viiral, Jan 13, 2020.

Thread Status:
Not open for further replies.
  1. Viiral

    Viiral New Member

    Joined:
    Apr 26, 2019
    Messages:
    9
    Likes Received:
    0
    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 (Text):
    1.  
    2. on inventory click:
    3.     if name of cursor slot of player contains "&6&lArmor Crystal (&c&lPhantom&6&l)":
    4.         if event-item's lore contains "&6&lArmor Crystal":
    5.             cancel event
    6.             send "&c&l(!)&c You have already got a crystal on this peice of armor!"
    7.         else:
    8.             if event-item is air:
    9.                 stop
    10.             else:
    11.                 cancel event
    12.                 set cursor slot of player to air
    13.                 play sound "SUCCESSFUL_HIT" to player with volume 1 and pitch 2
    14.  
    15.                 set lore of event-item to "%lore of event-item%||&6&lArmor Crystal (&c&lPhantom&6&l)"
    16.                 send "{@prefix} &aYou have successfully applied a crystal on your armor!" to player
    17.  
    18.  
    Skript Version 2.2-dev33
    Spigot version - 1.8.8
    Skript addons - SkQuery, Skellet, skRayFall, skUtilities, Skript-Mirror, TuSKe
    --- Double Post Merged, Jan 14, 2020, Original Post Date: Jan 13, 2020 ---
    bump
     
  2. Goose

    Goose Well-Known Member

    Joined:
    Nov 23, 2019
    Messages:
    402
    Likes Received:
    28
    Any console errors?
     
  3. Viiral

    Viiral New Member

    Joined:
    Apr 26, 2019
    Messages:
    9
    Likes Received:
    0
    nope just doesnt add the lore
     
  4. Runakai

    Runakai Well-Known Member

    Joined:
    Apr 27, 2018
    Messages:
    473
    Likes Received:
    28
    Add debugs and replace event-item with event-slot
     
Thread Status:
Not open for further replies.
Loading...