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 - Drops contents

Discussion in 'Skript' started by Simon942, Dec 25, 2018.

Tags:
Thread Status:
Not open for further replies.
  1. Simon942

    Simon942 Member

    Joined:
    Sep 22, 2018
    Messages:
    46
    Likes Received:
    1
    Hi there

    I am in trouble with this Skript: https://pastebin.com/TfutphNt
    If a player spam the command, it drops the glass pane :emoji_frowning:

    Is there something in the skript that is written wrong? Please tell me.

    Best regards Simon
     
  2. Runakai

    Supporter

    Joined:
    Apr 27, 2018
    Messages:
    497
    Likes Received:
    31
    Remove the „wait .. ticks/seconds“ and which version of Skript are you running?
     
  3. XanderWander

    XanderWander Member

    Joined:
    Jan 27, 2017
    Messages:
    71
    Likes Received:
    5
    Try this (not tested).
    Code (Skript):
    1. command /infobook2:
    2.         trigger:
    3.                 send "&cKommer snart..."
    4.  
    5. #Indstillinger
    6. options:
    7.     prefix: &a&lInfo: &c
    8.  
    9. #GUI setup
    10. command /infobook:
    11.     executable by: players
    12.     trigger:
    13.         open chest with 5 row named "&2&l&nInformation" to player
    14.         set {_s} to 0
    15.         set {Info.%player%.lastused} to now
    16.         loop 45 times:
    17.             set slot {_s} of player's current inventory to GRAY GLASS named "&c&lIndlæser..." with lore "&c&l&oVent venligst..."
    18.             wait 0.03 seconds
    19.             ifinventory name of player's current inventory is not "&2&l&nInformation":
    20.                 stop
    21.             add 1 to {_s}
    22.         format slot 21 of player with book named "&c&lIndlæser" to close then run [send "{@prefix} &c&l&oVent venligst..."]
    23.         format slot 23 of player with book named "&c&lIndlæser" to close then run [send "{@prefix} &c&l&oVent venligst..."]
    24.         format slot 21 of player with paper named "&2&lMap-Byggere" to close then run [execute player command "/MapBuilders"]
    25.         format slot 23 of player with paper named "&2&lGenerel &nInformation" to run [execute player command "/GI"]
    26.         set {_s} to 0
    27.         loop 45 times:
    28.             set slot {_s} of player's current inventory to GREEN GLASS named "&f&lIndlæst"
    29.             wait 0.03 seconds
    30.             add 1 to {_s}
    31.             ifinventory name of player's current inventory is not "&2&l&nInformation":
    32.                 stop
    33.         format slot 21 of player with paper named "&2&lMap-Byggere" to run [execute player command "/MapBuilders"]
    34.         format slot 23 of player with paper named "&2&lGenerel &nInformation" to run [execute player command "/GI"]
    35.      
    36.    
    37. on inventory click:
    38.     if inventory name of player's current inventory is "&2&l&nInformation":
    39.         cancel event
     
  4. Simon942

    Simon942 Member

    Joined:
    Sep 22, 2018
    Messages:
    46
    Likes Received:
    1
    Thank you guys, it worked like a champ :emoji_slight_smile:

    Best regards Simon
     
Thread Status:
Not open for further replies.

Share This Page

Loading...