right click event within a gui

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

code: https://hastebin.com/ebacoficew.sql

(in lore you can use '' || '' for other line like: with lore "&7Your Lore ||&aAnother line"
Example :emoji_slight_smile:
2018-07-24_16.01.59.png
2018-07-24_16.03.25.png
 
What I want: right click on an item WITHIN the GUI that triggers a command

Ideas for commands: None

Ideas for permissions: None

When I'd like it by: Any time

This example doesn't work: https://forums.skunity.com/threads/gui-right-click-event.3879/

Do not use SkQuery for GUIs. Use TuSKe for guis instead.


code_language.skript:
command /gui:
    trigger:
        create a gui with virtual chest with %number% rows named "%string%":
            make gui slot %string% with %itemstack%:
                set {_action} to "%gui-click-action%"
                {_action} is "left mouse button":
                    your code here
                {_action} is "right mouse button":
                    your code here
        open last gui to player