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.

Chest Gui need help

Discussion in 'Skript' started by Petervpg, Dec 27, 2017.

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

    Petervpg Member

    Joined:
    Jul 27, 2017
    Messages:
    18
    Likes Received:
    0
    So I have this Skript where it opens a "Chest Gui" where there are 3 Shiny Music Disc and some grey glass panels in the sides.

    So i tryied to write this
    Code (Skript):
    1. set slot 0 of player's current inventory to black stained glass named "&6" to be unstealable
    And it dosent work. but when i remove the to be unstealable it works.
    I also wanted to do that with you click on one of the 3 Music Disc you would buy it (Im Danish so ignore the Lore) I want to use the to close then run command but it dosent work :emoji_frowning:
    Code (Skript):
    1. set slot 2 of player's current inventory to strad music disc named "&c&lIronPolet" with lore "&aBruges til at åbne en &f&lIron Crate|| ||&aPris &2250$|| ||&4ADVARSEL||&aHusk at have plads i din inventory!" to close then run [ make console execute command "/cironpolet"]
    And the /cironpolet command is a command I have longer down in my skript. again im Danish so ignore the text
    Code (Skript):
    1. command /cironpolet:
    2.     executable by: player
    3.     trigger:
    4.         if player's balance is greater or equal to 250:
    5.             execute console command "/scrate givekey IronCrate %player% 1"
    6.             subtract 250 from player's balance
    7.         else:
    8.             send "&cDu har ikke penge nok!"

    I really hope you guys can help me cause i really need this :emoji_grinning:
    --- Double Post Merged, Dec 27, 2017, Original Post Date: Dec 27, 2017 ---
     
  2. Selvati

    Selvati Active Member

    Joined:
    Jun 26, 2017
    Messages:
    190
    Likes Received:
    9
    This should work, I haven't tested it though, goodluck!

    Code (Skript):
    1. #Chest GUI command
    2. command /chest-gui:
    3.     trigger:
    4.         open chest with 3 rows named "&6Crate Key Shop" to player
    5.         wait 1 tick
    6.         set {_row0} to 0
    7.         set {_row1} to 18
    8.         format slot 13 of player with strad music disc named "&c&lIronPolet" with lore "&aBruges til at åbne en &f&lIron Crate|| ||&aPris &2250$|| ||&4ADVARSEL||&aHusk at have plads i din inventory!" to close then run [ make console execute command "/cironpolet"] #"make PLAYER execute command" instead of "make CONSOLE execute command" because you want the chest to open to the player, not the console
    9.         loop 8 times:
    10.             format slot {_row0} of player with black stained glass named "&0" to be unstealable
    11.             format slot {_row1} of player with black stained glass named "&0" to be unstealable
    12.             add 1 to {_row0}
    13.             add 1 to {_row1}
    14. #Crate key command
    15. command /cironpolet:
    16.     executable by: player
    17.     trigger:
    18.         if player's balance is greater or equal to 250:
    19.             execute console command "/scrate givekey IronCrate %player% 1"
    20.             subtract 250 from player's balance
    21.         else:
    22.             send "&cDu har ikke penge nok!"
     
  3. Petervpg

    Petervpg Member

    Joined:
    Jul 27, 2017
    Messages:
    18
    Likes Received:
    0

    No it dident work but Thank you for trying to help me. Btw im playing 1.8.9
     
  4. Pikachu

    Moderator Supporter Addon Developer

    Joined:
    Jan 25, 2017
    Messages:
    871
    Likes Received:
    139
    Medals:
    Use tuske guis
     
  5. Petervpg

    Petervpg Member

    Joined:
    Jul 27, 2017
    Messages:
    18
    Likes Received:
    0
    Hey Pikachu.
    Thanks for your reply.
    Theres only one problem, I dont know how to use tuske XD
     
  6. ChisleLP

    ChisleLP Well-Known Member

    Joined:
    Jan 26, 2017
    Messages:
    789
    Likes Received:
    58
    Then learn it like you learn Skript x)
     
  7. Petervpg

    Petervpg Member

    Joined:
    Jul 27, 2017
    Messages:
    18
    Likes Received:
    0
    :emoji_frowning:
     
Thread Status:
Not open for further replies.

Share This Page

Loading...