random # gen

  • 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!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

dankmemes

Member
Jan 27, 2019
15
0
1
24
Code:
on rightclick on white wool:
    if distance between player and event-block is more than 3:
        stop
    else:
        set targeted block to air
        chance of 7%:
            add 5 iron ingot named "&6&lMetal Frags" to inventory of player
        chance of 22%:
            add 8 diamond named "Shot Gun Shell" to inventory of player
        chance of 23%:
            add 7 oak wood planks to inventory of player
        chance of 7%:
            add 1 wooden shovel named "&6&lDirtiest Shovel" to inventory of player
        chance of 13%:
            add 1 Stone sword named "&6&lMachete" to inventory of player
        chance of 21%:
            add 6 gold ingot named "&6&lSulfur" to inventory of player
        chance of 13%:
            add 6 cobblestone to inventory of player
        chance of 7%:
            add 5 gunpowder named "&6&lGun Powder" to inventory of player
        chance of 13%:
            add 16 wheat named "&6&lCloth" to inventory of player
        chance of 10%:
            add 7 seeds named "&6&lLow Grade" to inventory of player
        chance of 8%:
            add 25 coal named "&6&lCharcoal" to inventory of player
        chance of 5%:
            add 5 gray dye named "&6&lSMG Body" to inventory of player
        chance of 8%:
            add 4 pink dye named "&6&lSemi Automatic Body" to inventory of player
        chance of 10%:
            add 3 Magenta dye named "&6&lRifle Body" to inventory of player
        chance of 24%:
            add 3 nether quartz named "&6&lHigh quality metal" to inventory of player
        chance of 20%:
            add 8 sugar named "&6&l5.56 Rounds" to inventory of player
        chance of 1%:
            add 1 golden apple named "&6&lHydra" to inventory of player
        wait 3 second
        set block at event-location to white wool
i want to put
a random # for chance and add to players inventory
 
delete {shish}
set {shish} to random integer between 1 and 100
if {shish} is 1 or 2 or 3:
@send "3%"
else:
@send "97%"
 
Status
Not open for further replies.