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

My gui won't work

Discussion in 'Skript' started by Petervpg, Jun 14, 2018.

Thread Status:
Not open for further replies.
  1. Petervpg

    Petervpg Member

    Joined:
    Jul 27, 2017
    Messages:
    18
    Likes Received:
    0
    So im making this gui for my prison server (The server is on 1.8.9). and my skript wont work.
    This is my code that works:
    Code (Skript):
    1. Command /vs:
    2.     trigger:
    3.         open chest with 5 rows named "&2&lVagt Shop" to player
    4.         wait 1 tick
    5.         set slot 4 of player's current inventory to gold helmet named "&7&lC-Vagt Hjelm" with lore "&a&lKlik her &a| Hjelmen koster | &a100$"
    6.  
    7. command /test:
    8.     trigger:
    9.         make console execute command "/say test"
    But when I add "to run" or "to close then run" it wont work
    Code (Skript):
    1. Command /vs:
    2.     trigger:
    3.         open chest with 5 rows named "&2&lVagt Shop" to player
    4.         wait 1 tick
    5.         set slot 4 of player's current inventory to gold helmet named "&7&lC-Vagt Hjelm" with lore "&a&lKlik her &a| Hjelmen koster | &a100$" to close then run [make player execute command "test"]
    6.  
    7. command /test:
    8.     trigger:
    9.         make console execute command "/say test"
    and in game it just says "&a&lKlik her &a| Hjelmen koster | &a100$" to close then run [make player execute command "test"] is not a text
     
  2. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,106
    Likes Received:
    150
  3. NonicPvP

    NonicPvP Member

    Joined:
    Mar 23, 2017
    Messages:
    3
    Likes Received:
    1


    Code (Skript):
    1. Command /vs:
    2.     trigger:
    3.         open chest with 5 rows named "&2&lVagt Shop" to player
    4.         wait 1 tick
    5.         format slot 4 of player with gold helmet named  "&7&lC-Vagt Hjelm" with lore "&a&lKlik her &a| Hjelmen koster | &a100$" to close then run [make player execute command "test"]
    6.  
    7. command /test:
    8.     trigger:
    9.         make console execute command "/say test"
    btw. Fedt at du er dansk :emoji_wink:
     
    • Like Like x 1
  4. Petervpg

    Petervpg Member

    Joined:
    Jul 27, 2017
    Messages:
    18
    Likes Received:
    0
    Det virkede stadigvæk ikke for mig, den sagde bare det samme... at det ikke er en text
    --- Double Post Merged, Jun 14, 2018, Original Post Date: Jun 14, 2018 ---
    How does Tuske work tho?
     
  5. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,106
    Likes Received:
    150
    click the link... all the expressions/syntaxes are there
     
    • Like Like x 1
  6. Petervpg

    Petervpg Member

    Joined:
    Jul 27, 2017
    Messages:
    18
    Likes Received:
    0
    Dident see that I could click the simple and advanced gui XD
     
  7. MusicManSK

    MusicManSK Well-Known Member

    Joined:
    Nov 30, 2017
    Messages:
    197
    Likes Received:
    8
    just add this:

    Code (Skript):
    1. on inventory click:
    2.     if name of current inventory of player is "&2&lVagt Shop":
    3.         if clicked slot is 4:
    4.             execute console command "/say you clicked"
     
  8. TheRazorGod

    TheRazorGod Member

    Joined:
    Jun 9, 2018
    Messages:
    17
    Likes Received:
    0
    Using TuSKe can be useful for you.

    Example Code:
    Code (Skript):
    1. command /guiExample:
    2.     trigger:
    3.         open virtual chest inventory to player
    4.         format gui slot 0 of player with stone named "It won't do anything"
    5.         format gui slot 1 of player with stone named "It will just close" to close
    6.         format gui slot 2 of player with stone named "It will just close but only with pressing a number key" to close using number key
    7.         format gui slot 3 of player with stone named "It will make the player execute a command, but he might not have permission" to run player command "/gui"
    8.         format gui slot 4 of player with stone named "It will make the player execute a command with ""*"" permission" to run player command "/gui" with permission "*"
    9.         format gui slot 5 of player with stone named "It will make the console execute a command" to run console command "/gui"
    10.         format gui slot 6 of player with stone named "It will run the function doSomething()" to run function doSomething()
    11.         format gui slot 7 of player with stone named "It will close and then run the function doSomething()" to close then run function doSomething()
    12.         format gui slot 8 of player with stone named "It will run doSomething() if you click on it with a stone" to run function doSomething() with cursor stone
    13.         format gui slot 9 of player with stone named "It will run the gui event" to run gui event
    14.  
    15. function doSomething(i: int = 0): #TuSKe will run this function even if it was loaded after the command above. Need 1.7.2+ for it.
    16.     broadcast "And it did"

    For You Example Code:
    Code (Skript):
    1.  
    2. function Shop(p: Player):
    3.     open virtual chest with size 5 named "&7&lC-Vagt Hjelm" to {_p}
    4.     make gui slot 4 of {_p} with gold helmet named "&7&lC-Vagt Hjelm" with lore "&a&lKlik her &a| Hjelmen koster | &a100$" to close then run player command "/test"
    5.  
    6. command /test:
    7.     trigger:
    8.         make console execute command "/say test"
    9. command /shop:
    10.     trigger:
    11.          Shop(Player)
     
    #8 TheRazorGod, Jun 14, 2018
    Last edited: Jun 14, 2018
  9. Petervpg

    Petervpg Member

    Joined:
    Jul 27, 2017
    Messages:
    18
    Likes Received:
    0
    Dident work for me either
    --- Double Post Merged, Jun 15, 2018, Original Post Date: Jun 15, 2018 ---
    Both of the codes you sent dident work.
    Maybe you could say which plugins I need
     
  10. Take!!

    Take!! Member

    Joined:
    Mar 4, 2018
    Messages:
    18
    Likes Received:
    3
    you need skript and tuske
     
  11. Petervpg

    Petervpg Member

    Joined:
    Jul 27, 2017
    Messages:
    18
    Likes Received:
    0
    allready got those 2 plugins installed. Maybe its because of the skript plugins. I got Skript, Tuske, Wildskript, skUtilities, skRayFall, SkQuery and SkAction
     
Thread Status:
Not open for further replies.
Loading...