Jump to content

My skript command won't work, even though there are no errors.


RiverOfGold

Recommended Posts

I was watching a skript gui tutorial and made this skript: 

command /gui:
 permission: op
 permission message: "&4You can't do this!"
 trigger:
  open virtual chest inventory with size 3 named "&4GUI" to player
  format gui slot 11 of player with grass block named "&2Survival" with lore "&6Change gamemode to:" and "&6Survival"

It looks exactly like how it does in the video but when i reload it it says it was successful but if I do /gui it says unknown command.

Link to comment
Share on other sites

  • 3 months later...
  • 2 weeks later...
On 3/2/2022 at 2:50 PM, GamerDanny09 said:

When Will It Be Fixed Bc Its Happening To Me Too

Never. TuSKe has been unsupported for a while.
The developers have said that they will not update TuSKe.

Instead try look into how Vanilla GUIs are made or use another plugin.

Here's an example:

function gui_suicide(p: player, i: integer):
	set {_gui} to chest inventory with 3 rows named "&cERROR" # will only show if you give an invalid {_i}
	i = 0: # Page 1
		set {_gui} to chest inventory with 3 rows named "GUI"
		set slot 13 of {_gui} to barrier named "&cClick to die."
	set metadata tag "gui.suicide.%{_i}%" of {_p} to {_gui}
	open {_gui} to player

on inventory click:
	event-inventory = metadata tag "gui.suicide.0" of player:
		cancel event # make the gui unstealable
		if event-slot = 13: # check which slot was clicked
        	kill the player
            send "%player% has committed suicide" to all players

command /suicide:
	trigger:
		gui_suicide(player, 0)

The function uses an integer ID system so you can manage many pages inside of a GUI
If this looks to hard to use here is a simpler example:

command /suicide:
	trigger:
		set metadata "gui.suicide" of player to chest inventory with 3 rows named "GUI"
		set slot 13 of (metadata "gui.suicide" of player) to barrier named "&cClick to kill"
		open (metadata "gui.suicide" of player) to player

on inventory click:
	event-inventory = metadata "gui.suicide" of player
	cancel event
	event-slot = 13
	kill player
	send "%player% has committed suicide" to all players

The reason I start with the first one, is that its usually the best option for large GUIs such as shops, menus or other big projects.

If this helped please like (💙) the comment. It doesn't seem like much, but it motivates me to post/help more!

Minecraft Ranks
[DEFAULT] - 9th October 2020
[PRO] - 21st November 2020
[PATRON] - 27th October 2021

Proficiency
Python - 8 Years
C/C++ - 5 Years
Skript - 4 Years
Javascript - 3 Year
Java - 1 Year

Links
Discord - kegnh#1234

 
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...