Solved On inventory click

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

    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.

OMG_Tobias

Member
Jan 26, 2017
13
0
0
Skript Version: Skript 2.2
Minecraft Version: 1.11

I am wondering if there is a way so when I click an item in a GUI, it will display another GUI. I know you can do them with just commands. But I just wanna know if there is any other way to do them.
I've tried some stuff, non seem to work.
Full Code:
code_language.skript:
on rightclick holding rose red:
    player's world is "Map1":
        Open chest with 3 row named "&c&lInfected" to player
        Wait 2 tick
        format slot 10 of player with rose red named "&rStoryline" to run [execute player command "storyline"]
        format slot 13 of player with skull of player named "&rProfile" to close
        format slot 16 of player with bow named "&rPeripherals" to run [execute player command "profile"]

       
       
on inventory click:
    if name of player's current inventory is "&c&lInfected":
        if clicked slot is 13:
            open chest with 3 row named "&c&lProfile" to player
            Wait 2 tick
            format slot 10 of player with rose red named "&rStoryline" to run [execute player command "storyline"]
[/CODE


[B]Addons using (including versions):[/B]
SkQuery 3.22.1
[B]
Troubleshooting:[/B]

[B]Have you tried searching the docs?[/B] Yes
[B]Have you tried searching the forums?[/B] No
 
1. Format slot is not good. Because its buggy and won't support anymore. use TuSKE or Umbaska (If im correct) GUI.

to you question:
code_language.skript:
command /1gui:
    trigger:
        open chest with 1 rows named "Im 1. GUI!" to player
        set slot 9 of player's current inventory to stone named "Next Gui?"

on inventory click:
    if name of player's current inventory is "Im 1. GUI":
        cancel event # Cancel that player steal the items.
        close player's inventory#im not sure if this need
        open chest with 2 rows named "I got now 2. Rows" to player
        set slot 18 of player's current inventory to grass named "Yey."
 
Just use:
wait a tick
open chest with x slot named "name" to player
set slot 10 of player's current inventory to stone named "banana"

on inventory click:
if clicked slot is 10:
cancel event


This is an "ore" version... If you want the good one, just ask.
 
Status
Not open for further replies.