Run Commands on GUI Click (skUtilities, TuSKe)

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

ThatBraxGuy

Member
Aug 1, 2017
2
0
0
Hi all! I'm currently writing a skript that opens a GUI (Using TuSKe's skript addon) that will have multiple options to enable/disable different skripts. Basically I run a UHC Server and I'm trying to create a scenario manager.

My question is would it be possible to create a multi-tiered options section (or even a .yml file although I've heard bad things about them with skript) so that I can add/remove scenarios without going into the actual code. If that doesn't make sense I've created a little mockup below

code_language.skript:
ScenarioAmount: 2
Scenario: 0
    Scenario Name: Example Scenario
    Scenario Enable Command: /scenexample enable
    Scenario Disable Command: /scenexample disbale
Scenario: 1
    Scenario Name: Example Scenario 2
    Scenario Enable Command: /scenexample2 enable
    Scenario Disable Command: /scenexample2 disbale

So with a yml file something like that, then in the code I could do

code_language.skript:
open virtual chest inventory named "Scenario Manager" to player
loop {ScenarioAmount} times:
    format slot {ScenNum} of player with "white wool" to run function MyFunction()

Where MyFunction would open ANOTHER GUI and there would be two items, one to run the enable command and one to run the disable command. Is this possible? Any help would be appreciated. Even pointing me toward a tutorial would be great. :emoji_slight_smile:
 
Status
Not open for further replies.