how do i make random drops

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

thunderlord

New Member
Feb 19, 2024
5
0
1
18
i want to make a random drop skript with a % to see how hard is it to get like 1 stick from dirt block = 50% so i will get it 50% of the time sticks from mingin dirt
 
use a random number generator
Code:
[CODE]set {_r} to random integer between 0 and 100
if {_r} < 50: # 50% chance
    give player dirt
else if {_r} < 75: # 25% chance
    give player stick
[/CODE]
 
i want to make a random drop skript with a % to see how hard is it to get like 1 stick from dirt block = 50% so i will get it 50% of the time sticks from mingin dirt
you can do this, it's not tested cuz I'm on mobile device.

Code:
on mine:
    if event-block is dirt:
        chance of 50%:
            give player stick
 
you can do this, it's not tested cuz I'm on mobile device.

Code:
on mine:
    if event-block is dirt:
        chance of 50%:
            give player stick
chance of becomes a lot more unintuitive once you start stacking probabilities.