custom fortune 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!

wed622

Member
Jun 21, 2023
1
0
1
67
im making a boxs server on minehut and i dont know how to make a skript that makes it so the level of fortune gives one more drop so for example no fortune drops 1 gold (from gold ore) fortune 1 gives 2 gold and so on. So can somone please code that.
 
a basic concept but you can certainly build upon it, i believe in you!

Code:
on mine:
    if player's tool is pickaxe of fortune 1:
        give player 2 gold ingot
    if player's tool is pickaxe of fortune 2:
        give player 3 gold ingot
    if player's tool is pickaxe of fortune 3:
        give player 4 gold ingot
 
You can use this function to replicate the general vanilla behavior of fortune, more on that Here.
Code:
function Fortune(l:integer) :: integer:
  loop {_l} times:
    add 1 to {_r} if chance of (100/({_l}+2))%
  return {_r}
 
  • Like
Reactions: BryHunter