Custom command argument?

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

Pisjun

Member
Dec 11, 2017
4
0
1
28
Hi guys! Please, help me to write a simple command to trigger on GUI-click.

code_language.skript:
on rightclick on a hay block with golden axe:
   open chest with 1 row named "&cMaterials" to player
   wait 1 tick

   format slot 0 of player with oak planks named "Wood" with lore "lol" to close then run "?????"

I need this slot clicking to trigger this (previously worked without GUI):


code_language.skript:
loop blocks in radius 1.9:
       loop-block is hay block:
           player cannot build at the loop-block:
               stop
           player has planks:
               remove 1 planks from player
               set loop-block to oak planks
 
Could you explain what you mean? I don't understand. For which part?

I posted 2 parts of code before. The first part opens GUI on rightclicking on the block.
I need GUI-button click to call the command from part 2. Previously it looked like this:

code_language.skript:
on rightclick on a hay block:
loop blocks in radius 1.9:
       loop-block is hay block:
           player cannot build at the loop-block:
               stop
           player has planks:
               remove 1 planks from player
               set loop-block to oak planks
But now i need this event to call GUI and then (after clicking button in GUI) to do this:

code_language.skript:
loop blocks in radius 1.9:
       loop-block is hay block:
           player cannot build at the loop-block:
               stop
           player has planks:
               remove 1 planks from player
               set loop-block to oak planks
But i can't understand, how to replace event-block in the command (called by slot-clicking)
 
Status
Not open for further replies.