Detecting a GUI item slot

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

BaranHan

Member
Oct 22, 2017
3
0
0
24
PD0bbQ.png


link of image: http://i.hizliresim.com/PD0bbQ.png
What i really need to know is to know how this system works. Whenever someone puts an item on that specific item slot it(code) will detect if that put item's lore contains "blabla" and put item's name contains "blabla". I tried with "on inventory click" event but it didn't seem to be working well.

It is not working + it does detect lore of item but doesn't detect name of item. I would be very happy if someone could help me... (I guess image files are unable to be seen. In the image there is a chest gui named "&f鍐 &cEritme &f鍐". In chest GUI the only empty slot is 13th slot which is located in the middle of the chest. I use TuSKe's GUI Manager)
[doublepost=1531832598,1531830309][/doublepost]
code_language.skript:
on inventory click:
    if inventory name of player's current inventory is "            &f鍐 &cEritme &f鍐":
        if slot 13 of player's current inventory is set:
            set {_whatever} to slot 13 of player's current inventory
            if lore of {_whatever} contains "b":
                send "%lore of {_whatever}%"
                if name of {_whatever} contains "a":
                    send "%name of {_whatever}%"

It is not working as I said before i need help
 
PD0bbQ.png


link of image: http://i.hizliresim.com/PD0bbQ.png
What i really need to know is to know how this system works. Whenever someone puts an item on that specific item slot it(code) will detect if that put item's lore contains "blabla" and put item's name contains "blabla". I tried with "on inventory click" event but it didn't seem to be working well.

It is not working + it does detect lore of item but doesn't detect name of item. I would be very happy if someone could help me... (I guess image files are unable to be seen. In the image there is a chest gui named "&f鍐 &cEritme &f鍐". In chest GUI the only empty slot is 13th slot which is located in the middle of the chest. I use TuSKe's GUI Manager)
[doublepost=1531832598,1531830309][/doublepost]
code_language.skript:
on inventory click:
    if inventory name of player's current inventory is "            &f鍐 &cEritme &f鍐":
        if slot 13 of player's current inventory is set:
            set {_whatever} to slot 13 of player's current inventory
            if lore of {_whatever} contains "b":
                send "%lore of {_whatever}%"
                if name of {_whatever} contains "a":
                    send "%name of {_whatever}%"

It is not working as I said before i need help
try this
code_language.skript:
on inventory click:
    if inventory name of player's current inventory is "            &f鍐 &cEritme &f鍐":
        if clicked slot is 13:
            set {_whatever} to player's cursor
            if lore of {_whatever} contains "b":
                send "%lore of {_whatever}%"
                if name of {_whatever} contains "a":
                    send "%name of {_whatever}%"
 
Status
Not open for further replies.