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.

Items isn t spawn in enderchest

Discussion in 'Skript' started by AKRODOGY, Nov 10, 2018.

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

    AKRODOGY Active Member

    Joined:
    Mar 20, 2018
    Messages:
    51
    Likes Received:
    2
    I have that skript
    Code (Skript):
    1. variables:
    2.     {rewards::1} = emerald
    3.     {rewards::2} = diamond
    4.     {rewards::3} = apple
    5.  
    6. command /admin [<text>] [<text>] [<text>]:
    7.     trigger:
    8.         if the arg-1 is "crate":
    9.             if the arg-2 is "set":
    10.                 if arg-3 is "1" or "2" or "3" or "4" or "5" or "6" or "7" or "8" or "9" or "10" or "11" or "12" or "13" or "14" or "15":
    11.                     set {location.%arg-3%.chestspawn} to player's location
    12.                     send "Chestspawn %arg-3% created."
    13.                  
    14. every 1 minute:
    15.     set {_random} to a random integer between 1 and 3
    16.     set block at {location.%{_random}%.chestspawn} to ender chest named "&cLootCrate"
    17.     broadcast "Chest spawned at %{location.%{_random}%.chestspawn}%"
    18.     set {_random2} to a random integer between 4 and 7
    19.     set block at {location.%{_random2}%.chestspawn} to ender chest named "&cLootCrate"
    20.     broadcast "Chest spawned at %{location.%{_random2}%.chestspawn}%"
    21.     set {_random3} to a random integer between 8 and 10
    22.     set block at {location.%{_random3}%.chestspawn} to ender chest named "&cLootCrate"
    23.     broadcast "Chest spawned at %{location.%{_random3}%.chestspawn}%"
    24.     set {_random4} to a random integer between 11 and 13
    25.     set block at {location.%{_random4}%.chestspawn} to ender chest named "&cLootCrate"
    26.     broadcast "Chest spawned at %{location.%{_random4}%.chestspawn}%"
    27.     set {_random5} to a random integer between 14 and 15
    28.     set block at {location.%{_random5}%.chestspawn} to ender chest named "&cLootCrate"
    29.     broadcast "Chest spawned at %{location.%{_random5}%.chestspawn}%"
    30.          
    31.  on rightclick:
    32.     loop integers between 1 and 15:
    33.         clicked block's location is {location.%loop-number%.chestspawn}
    34.         cancel event
    35.         if {LootCrate.open} is true:
    36.             message "&cSomeone else opened this crate already" to player
    37.             stop
    38.         else:
    39.             set {LootCrate.open} to true
    40.             wait 0.5 seconds
    41.             give player a random item out of {rewards::*}
    42.             launch burst firework colored blue at clicked block timed 0.1
    43.             wait 0.5 seconds
    44.             set {LootCrate.open} to false
    The problems are:

    1.The items aren t spawn in enderchest
    2.The name from enderchest are "Ender Chest" and not "&cLootChest)"
    3.Firework not work

    And i dont know :
    1.I want to run this skript when is 5players or more?
    2.How can i put a item in enderchest with a name and a lore ex : a diamond sword named "&cExtra" with lore "Magic for you"?

    WARNING : I WANT A EXAMPLE EX: (if the player is op: ) NOT SOME WORDS WITH WHAT ARE YOU WANT TO EXPLAIN, THE CODE I WANT
     
Thread Status:
Not open for further replies.

Share This Page

Loading...