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.

`If clicked slot` detecting multiple slots

Discussion in 'Skript' started by Harro, Mar 20, 2020.

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

    Harro Member

    Joined:
    Mar 12, 2020
    Messages:
    12
    Likes Received:
    1
    Hey so I've been working on this crafting skript and I've encountered a bug.

    The following code :
    Code (Text):
    1. if clicked slot is 18:
    Seems to detect both slot 18 in the current gui and slot 18 in the player's inventory. I just need it to detect ONLY the GUI slot 18

    I've tried using the following:
    - if clicked slot of player's current inventory is 18
    - if clicked slot of current inventory of player is 18
    - if event-slot is slot 18 of player's current inventory
    - if event-slot is slot 18 of current inventory of player
    - if event-slot is slot 18 of player
    No errors on any of them, they all do the exact same thing however.

    Please reply if you've got any ideas/suggestions
     
  2. couger44

    Supporter

    Joined:
    Feb 19, 2017
    Messages:
    714
    Likes Received:
    31
    Uh... i didnt understood what you want. But if you want a idea of how to detect only the chest gui slot 18, make this:

    Code (Skript):
    1.  
    2. on inventory click:
    3.     clicked inventory isn't player's inventory
    4.     if inventory name of player's current inventory is "§aName of the open inventory":
    5.         clicked slot = 18:
    6.             #do something
    7.  
     
    • Agree Agree x 1
  3. Runakai

    Moderator Supporter

    Joined:
    Apr 27, 2018
    Messages:
    497
    Likes Received:
    31
Thread Status:
Not open for further replies.

Share This Page

Loading...