1. 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!

  2. LOOKING FOR A VERSION OF SKRIPT?

    You can always check out our Wiki for downloads and any other information about Skript!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Solved Skript Gui

Discussion in 'Skript' started by Purple Pixel, Sep 23, 2020.

Thread Status:
Not open for further replies.
  1. Purple Pixel

    Purple Pixel Member

    Joined:
    Sep 23, 2020
    Messages:
    40
    Likes Received:
    3
    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:

     
  2. Best Answer:
    Post #4 by Dogloverblue, Sep 24, 2020
  3. Last_Minecraft

    Joined:
    Jul 28, 2020
    Messages:
    10
    Likes Received:
    0
    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:
     
  4. Purple Pixel

    Purple Pixel Member

    Joined:
    Sep 23, 2020
    Messages:
    40
    Likes Received:
    3
    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:
     
  5. Dogloverblue

    Dogloverblue Member

    Joined:
    Sep 24, 2020
    Messages:
    14
    Likes Received:
    2
    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 (Text):
    1. #I have no idea how to use permissions, but you can add those later
    2. command /punish [<offlineplayer>]:
    3.   trigger:
    4.     set {BannedPlayer} to arg-1
    5.     set {_gui} to a new chest inventory with 6 row with name "Ban Gui"
    6.     set slot 0 of {_gui} to red wool named "&ePerm Ban"
    7.     set slot 1 of {_gui}  to green wool named "&e1 Day Ban"
    8.     open {_gui} to player
    9.  
    10. on inventory click:
    11.   if name of event-inventory is "Ban Gui":
    12.     if index of event-slot = 0:
    13.       cancel event
    14.       execute console command "ban %{BannedPlayer}%"  
    15.       Send "&eYou have perm banned &4%{BannedPlayer}%"
    16.     if index of event-slot = 1:
    17.       cancel event
    18.                   # You can do what you want with this
     
  6. Purple Pixel

    Purple Pixel Member

    Joined:
    Sep 23, 2020
    Messages:
    40
    Likes Received:
    3
    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:
     
  7. Dogloverblue

    Dogloverblue Member

    Joined:
    Sep 24, 2020
    Messages:
    14
    Likes Received:
    2
    Yes, feel free to use it in a video, if ya give me even a little bit of credit.
     
Thread Status:
Not open for further replies.

Share This Page

Loading...