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.

Solved Animated GUI

Discussion in 'Skript' started by iParis, Dec 15, 2017.

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

    iParis Well-Known Member

    Joined:
    Jan 28, 2017
    Messages:
    46
    Likes Received:
    1
    Hi,

    I want to create a animated GUI that basically has gray glass as the outline of the GUI then one by one it will change to a green glass.

    Thanks, Jack

     
  2. Best Answer:
    Post #6 by Donut, Dec 16, 2017
  3. ChisleLP

    ChisleLP Well-Known Member

    Joined:
    Jan 26, 2017
    Messages:
    789
    Likes Received:
    59
    Im not sure if i understand correctly.
    Code (Skript):
    1. command /test:
    2.     trigger:
    3.         open chest with 3 rows named "GHI" to player
    4.         set {_s} to 0
    5.         loop 20 times:
    6.             set slot {_s} of player's current inventory to gray stained glass pane
    7.             add 1 to {_s}
    8.             if {_s} is 10:
    9.                 add 8 to {_s} #!<=== IM not sure, if it 8 or 7.#
    10.         set {_s} to 0
    11.         loop 20 times:
    12.             set slot {_s} of player's current inventory to green stained glass pane
    13.             add 1 to {_s}
    14.             if {_s} is 10:
    15.                 add 8 to {_s} #!<=== IM not sure, if it 8 or 7.#
    16.             wait 5 ticks #!<== You can choose time #
     
  4. iParis

    iParis Well-Known Member

    Joined:
    Jan 28, 2017
    Messages:
    46
    Likes Received:
    1
    Yeah it's supposed to look like this - https://i.gyazo.com/0a8bd1590758b0e454ceb1bb201adeb0.mp4 - and for your code it creates the outline but there isn't any green glass that goes round and when I do the command I get a message saying internal error while attempting to perform this command. I've managed to come around it but whenever I close the GUI I get the items from the GUI into my inventory - https://i.gyazo.com/5d6b733d3a28d3d587e19132ebe3807e.mp4
     
  5. ChisleLP

    ChisleLP Well-Known Member

    Joined:
    Jan 26, 2017
    Messages:
    789
    Likes Received:
    59
    Just add check if youre still in the inventory with

    Code (Skript):
    1. if name of player's current inventory is "...":
    2.     set slot..
     
  6. iParis

    iParis Well-Known Member

    Joined:
    Jan 28, 2017
    Messages:
    46
    Likes Received:
    1
    That's my current code

    Code (Skript):
    1.         wait 5 ticks
    2.         open chest with 5 rows named "Player Profiles" to player
    3.         while inventory name of player's current inventory is "Player Profiles":
    4.             format slot 0 of player with light green glass to be unstealable
    5.             wait 5 ticks
    6.             format slot 0 of player with black glass to be unstealable
    7.             format slot 1 of player with light green glass to be unstealable
    8.             wait 5 ticks
    9.             format slot 1 of player with black glass to be unstealable
    10.             format slot 2 of player with light green glass to be unstealable
    11.             wait 5 ticks
    12.             format slot 2 of player with black glass to be unstealable
    13.             format slot 3 of player with light green glass to be unstealable
    14.             wait 5 ticks
    15.             format slot 3 of player with black glass to be unstealable
    16.             format slot 4 of player with light green glass to be unstealable
    17.             wait 5 ticks
    18.             format slot 4 of player with black glass to be unstealable
    19.             format slot 5 of player with light green glass to be unstealable
    20.             wait 5 ticks
    21.             format slot 5 of player with black glass to be unstealable
    22.             format slot 6 of player with light green glass to be unstealable
    23.             wait 5 ticks
    24.             format slot 6 of player with black glass to be unstealable
    25.             format slot 7 of player with light green glass to be unstealable
    26.             wait 5 ticks
    27.             format slot 7 of player with black glass to be unstealable
    28.             format slot 8 of player with light green glass to be unstealable
    29.             wait 5 ticks
    30.             format slot 8 of player with black glass to be unstealable
    31.             format slot 17 of player with light green glass to be unstealable
    32.             wait 5 ticks
    33.             format slot 17 of player with black glass to be unstealable  
    34.             format slot 26 of player with light green glass to be unstealable
    35.             wait 5 ticks
    36.             format slot 26 of player with black glass to be unstealable      
    37.             format slot 35 of player with light green glass to be unstealable
    38.             wait 5 ticks
    39.             format slot 35 of player with black glass to be unstealable          
    40.             format slot 44 of player with light green glass to be unstealable
    41.             wait 5 ticks
    42.             format slot 44 of player with black glass to be unstealable
    43.             format slot 43 of player with light green glass to be unstealable
    44.             wait 5 ticks
    45.             format slot 43 of player with black glass to be unstealable      
    46.             format slot 42 of player with light green glass to be unstealable
    47.             wait 5 ticks
    48.             format slot 42 of player with black glass to be unstealable      
    49.             format slot 41 of player with light green glass to be unstealable
    50.             wait 5 ticks
    51.             format slot 41 of player with black glass to be unstealable          
    52.             format slot 40 of player with light green glass to be unstealable
    53.             wait 5 ticks
    54.             format slot 40 of player with black glass to be unstealable  
    55.             format slot 39 of player with light green glass to be unstealable
    56.             wait 5 ticks
    57.             format slot 39 of player with black glass to be unstealable      
    58.             format slot 38 of player with light green glass to be unstealable
    59.             wait 5 ticks
    60.             format slot 38 of player with black glass to be unstealable  
    61.             format slot 37 of player with light green glass to be unstealable
    62.             wait 5 ticks
    63.             format slot 37 of player with black glass to be unstealable      
    64.             format slot 36 of player with light green glass to be unstealable
    65.             wait 5 ticks
    66.             format slot 36 of player with black glass to be unstealable
    67.             format slot 27 of player with light green glass to be unstealable
    68.             wait 5 ticks
    69.             format slot 27 of player with black glass to be unstealable      
    70.             format slot 18 of player with light green glass to be unstealable
    71.             wait 5 ticks
    72.             format slot 18 of player with black glass to be unstealable      
    73.             format slot 9 of player with light green glass to be unstealable
    74.             wait 5 ticks
    75.             format slot 9 of player with black glass to be unstealable          
    76.         wait 1 second
     
  7. Donut

    Donut Well-Known Member

    Joined:
    Mar 27, 2017
    Messages:
    1,340
    Likes Received:
    175
    Medals:
    you should use tuske guis instead of format slot. with tuske:
    Code (Skript):
    1. command /test:
    2.     trigger:
    3.         set {_blackSlots::*} to 0, 1, 2, 3, 4, 5, 6, 7, 8, 17, 26, 35, 44, 43, 42, 41, 40, 39, 38, 37, 36, 27, 18, and 9
    4.         open chest with 5 rows named "Player Profiles" to player
    5.         while inventory name of player's current inventory is "Player Profiles":
    6.             make gui slot {_blackSlots::*} of player with black glass to do nothing
    7.             loop 24 times:
    8.                 make gui slot {_blackSlots::%loop-value -1%} of player with black glass to do nothing
    9.                 make gui slot {_blackSlots::%loop-value%} of player with light green glass to do nothing
    10.                 wait 5 ticks
     
    • Like Like x 1
  8. iParis

    iParis Well-Known Member

    Joined:
    Jan 28, 2017
    Messages:
    46
    Likes Received:
    1
    I'll start to use that then instead and thanks for solving my problem :emoji_slight_smile:
     
Thread Status:
Not open for further replies.
Loading...