`If clicked slot` detecting multiple slots

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

Harro

Member
Mar 12, 2020
12
1
0
25
Hey so I've been working on this crafting skript and I've encountered a bug.

The following code :
Code:
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
 
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_language.skript:
on inventory click:
    clicked inventory isn't player's inventory
    if inventory name of player's current inventory is "§aName of the open inventory":
        clicked slot = 18:
            #do something
 
Status
Not open for further replies.