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!


    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.

random # gen

Discussion in 'Skript' started by dankmemes, Feb 1, 2019.

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

    dankmemes Member

    Jan 27, 2019
    Likes Received:
    Code (Text):
    1. on rightclick on white wool:
    2.     if distance between player and event-block is more than 3:
    3.         stop
    4.     else:
    5.         set targeted block to air
    6.         chance of 7%:
    7.             add 5 iron ingot named "&6&lMetal Frags" to inventory of player
    8.         chance of 22%:
    9.             add 8 diamond named "Shot Gun Shell" to inventory of player
    10.         chance of 23%:
    11.             add 7 oak wood planks to inventory of player
    12.         chance of 7%:
    13.             add 1 wooden shovel named "&6&lDirtiest Shovel" to inventory of player
    14.         chance of 13%:
    15.             add 1 Stone sword named "&6&lMachete" to inventory of player
    16.         chance of 21%:
    17.             add 6 gold ingot named "&6&lSulfur" to inventory of player
    18.         chance of 13%:
    19.             add 6 cobblestone to inventory of player
    20.         chance of 7%:
    21.             add 5 gunpowder named "&6&lGun Powder" to inventory of player
    22.         chance of 13%:
    23.             add 16 wheat named "&6&lCloth" to inventory of player
    24.         chance of 10%:
    25.             add 7 seeds named "&6&lLow Grade" to inventory of player
    26.         chance of 8%:
    27.             add 25 coal named "&6&lCharcoal" to inventory of player
    28.         chance of 5%:
    29.             add 5 gray dye named "&6&lSMG Body" to inventory of player
    30.         chance of 8%:
    31.             add 4 pink dye named "&6&lSemi Automatic Body" to inventory of player
    32.         chance of 10%:
    33.             add 3 Magenta dye named "&6&lRifle Body" to inventory of player
    34.         chance of 24%:
    35.             add 3 nether quartz named "&6&lHigh quality metal" to inventory of player
    36.         chance of 20%:
    37.             add 8 sugar named "&6&l5.56 Rounds" to inventory of player
    38.         chance of 1%:
    39.             add 1 golden apple named "&6&lHydra" to inventory of player
    40.         wait 3 second
    41.         set block at event-location to white wool
    i want to put
    a random # for chance and add to players inventory
  2. Itqly_

    Itqly_ Member

    Sep 20, 2018
    Likes Received:
    delete {shish}
    set {shish} to random integer between 1 and 100
    if {shish} is 1 or 2 or 3:
    @send "3%"
    @send "97%"
Thread Status:
Not open for further replies.

Share This Page