NoutLost_ Posted January 12, 2022 Share Posted January 12, 2022 okay so im trying to make a gui with skript and tuske but as soon as i add a format to the created gui it just doesn't work.... And it doesn't show an error either. command /guide: permission: survival.guide trigger: open virtual chest inventory with size 5 named "&f&lSMP &b&lGuide" to player format gui slot 12 of player with grass block named "&e&l/Spawn" with lore "&7Teleport to Spawn using /spawn" and "Or Click here" (it works perfectly fine without the 5th line) am i typing something wrong? Link to comment Share on other sites More sharing options...
Wyndexx Posted January 12, 2022 Share Posted January 12, 2022 # I do not use Tuske # This is just skript # not tested command /guide: permission: survival.guide trigger: set {_gui} to a new chest inventory with 5 row named "&f&lSMP &b&lGuide" set slot 12 of {_gui} to grass block named "&e&l/Spawn" with lore "&7Teleport to Spawn using /spawn" and "Or Click here" on inventory click: if name of event-inventory is "&f&lSMP &b&lGuide": if event-slot is 12: make player execute command "/spawn" Main MC account: Gam3rBoi (VIP in MH) Alt MC account: *Gam3rBoi2147 Farcade server owner Skripter with 6+ months experience + time learning coding concepts Message me through the forums if you need anything! Link to comment Share on other sites More sharing options...
NoutLost_ Posted January 12, 2022 Author Share Posted January 12, 2022 4 minutes ago, Gam3rBoi said: # I do not use Tuske # This is just skript # not tested command /guide: permission: survival.guide trigger: set {_gui} to a new chest inventory with 5 row named "&f&lSMP &b&lGuide" set slot 12 of {_gui} to grass block named "&e&l/Spawn" with lore "&7Teleport to Spawn using /spawn" and "Or Click here" on inventory click: if name of event-inventory is "&f&lSMP &b&lGuide": if event-slot is 12: make player execute command "/spawn" the command now shows up but it doesn't open a gui yet Link to comment Share on other sites More sharing options...
Wyndexx Posted January 12, 2022 Share Posted January 12, 2022 31 minutes ago, NoutLost_ said: the command now shows up but it doesn't open a gui yet # I do not use Tuske # This is just skript # not tested command /guide: permission: survival.guide trigger: set {_gui} to a new chest inventory with 5 row named "&f&lSMP &b&lGuide" set slot 12 of {_gui} to grass block named "&e&l/Spawn" with lore "&7Teleport to Spawn using /spawn" and "Or Click here" open {_gui} to player on inventory click: if name of event-inventory is "&f&lSMP &b&lGuide": if event-slot is 12: make player execute command "/spawn" My bad... I forgot to open the gui to the player. 1 Main MC account: Gam3rBoi (VIP in MH) Alt MC account: *Gam3rBoi2147 Farcade server owner Skripter with 6+ months experience + time learning coding concepts Message me through the forums if you need anything! Link to comment Share on other sites More sharing options...
NoutLost_ Posted January 12, 2022 Author Share Posted January 12, 2022 1 hour ago, Gam3rBoi said: # I do not use Tuske # This is just skript # not tested command /guide: permission: survival.guide trigger: set {_gui} to a new chest inventory with 5 row named "&f&lSMP &b&lGuide" set slot 12 of {_gui} to grass block named "&e&l/Spawn" with lore "&7Teleport to Spawn using /spawn" and "Or Click here" open {_gui} to player on inventory click: if name of event-inventory is "&f&lSMP &b&lGuide": if event-slot is 12: make player execute command "/spawn" My bad... I forgot to open the gui to the player. Tank you this works great and im going to experment with it more Link to comment Share on other sites More sharing options...
Wyndexx Posted January 12, 2022 Share Posted January 12, 2022 2 hours ago, NoutLost_ said: Tank you this works great and im going to experment with it more No problem! Here are some helpful tips: Put these after the trigger: in the command line To set all slots to the same thing: set {_slot} to 0 loop 45 times: set slot {_slot} of {_gui} to [item] add 1 to {_slot} To create a blank space: set slot [number] to air Put this instead of the inventory click event I had earlier. To stop the player from taking an item from the GUI: on inventory click: if name of event-inventory is "&f&lSMP &b&lGuide": cancel event if event-slot is 12: #code here Main MC account: Gam3rBoi (VIP in MH) Alt MC account: *Gam3rBoi2147 Farcade server owner Skripter with 6+ months experience + time learning coding concepts Message me through the forums if you need anything! Link to comment Share on other sites More sharing options...
NoutLost_ Posted January 13, 2022 Author Share Posted January 13, 2022 20 hours ago, Gam3rBoi said: No problem! Here are some helpful tips: Put these after the trigger: in the command line To set all slots to the same thing: set {_slot} to 0 loop 45 times: set slot {_slot} of {_gui} to [item] add 1 to {_slot} To create a blank space: set slot [number] to air Put this instead of the inventory click event I had earlier. To stop the player from taking an item from the GUI: on inventory click: if name of event-inventory is "&f&lSMP &b&lGuide": cancel event if event-slot is 12: #code here not sure if im doing it right but the first one doesn't work... and when i tried added named "" it didn't work either (this is so it doesn't show any text) Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now