Solved Skript Gui

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

Purple Pixel

Member
Sep 23, 2020
40
4
8
26
Hello Skript community :emoji_grinning:,

I have recently been wanting to create a ban gui on my minecraft server I have over and over again looked through the web so find a solution... Nothing worked. I am pretty sure skript has had a update in the past year that has changed skript chest gui's. So I have come here to look for a answer. Every time I try to reload the file it always says Can't understand this condition/effect. Here is the code:

command /punish [<offlineplayer>]:
permission: gui.punish
permission message: &4Only Mods, Admins, Managers, and Owners Can Use That Command!
cooldown: 5 seconds
cooldown message: &2Please Do Not Spam The Command!
trigger:
open chest with 3 rows named "&4Ban Gui" to player

Edit: There are tabs there. That is not the problem :emoji_grinning:
 
Send your codes in a text box, so we can see the actual codes, also I have checked your Skript, I don't recommend using SkQuery since SkQuery's GUI is just this addon's branch feature, I do recommend you to use the Skript addons that mainly focusing on GUI management, I do recommend TuSKe since it is made for a GUI Manager. Also if you can send your error messages in a Pastebin(/Hastebin) I would appreciate it, since there is nothing wrong in your code in my investigation. :emoji_grinning:
 
Send your codes in a text box, so we can see the actual codes, also I have checked your Skript, I don't recommend using SkQuery since SkQuery's GUI is just this addon's branch feature, I do recommend you to use the Skript addons that mainly focusing on GUI management, I do recommend TuSKe since it is made for a GUI Manager. Also if you can send your error messages in a Pastebin(/Hastebin) I would appreciate it, since there is nothing wrong with your code in my investigation. :emoji_grinning:
Ok, I am sorry for not using the help format since I am new I didn't know about it and I thought that there was a way to open chest gui's in regular skript without having to use any other plugins. Can you please tell me if I am correct? :emoji_grinning:
 
yes, there is a way to open virtual chests without add-ons IF you have skript versions 2.3+ i believe.
Here is some code that might help you get a base line
Code:
#I have no idea how to use permissions, but you can add those later
command /punish [<offlineplayer>]:
  trigger:
    set {BannedPlayer} to arg-1
    set {_gui} to a new chest inventory with 6 row with name "Ban Gui"
    set slot 0 of {_gui} to red wool named "&ePerm Ban"
    set slot 1 of {_gui}  to green wool named "&e1 Day Ban"
    open {_gui} to player
 
on inventory click:
  if name of event-inventory is "Ban Gui":
    if index of event-slot = 0:
      cancel event
      execute console command "ban %{BannedPlayer}%"  
      Send "&eYou have perm banned &4%{BannedPlayer}%"
    if index of event-slot = 1:
      cancel event
                  # You can do what you want with this
 
yes, there is a way to open virtual chests without add-ons IF you have skript versions 2.3+ i believe.
Here is some code that might help you get a base line
Code:
#I have no idea how to use permissions, but you can add those later
command /punish [<offlineplayer>]:
  trigger:
    set {BannedPlayer} to arg-1
    set {_gui} to a new chest inventory with 6 row with name "Ban Gui"
    set slot 0 of {_gui} to red wool named "&ePerm Ban"
    set slot 1 of {_gui}  to green wool named "&e1 Day Ban"
    open {_gui} to player
 
on inventory click:
  if name of event-inventory is "Ban Gui":
    if index of event-slot = 0:
      cancel event
      execute console command "ban %{BannedPlayer}%" 
      Send "&eYou have perm banned &4%{BannedPlayer}%"
    if index of event-slot = 1:
      cancel event
                  # You can do what you want with this
Thank you soo much for this :emoji_grinning:. Do you think I can use this to make a youtube tutorial too? If not that is fine too, but thanks so much :emoji_grinning:
 
Status
Not open for further replies.