I modified the script above to follow vanilla fortune mechanics. I gave fortune to everything regardless of if the tool is correct as I plan to use this for a skymining server and another plugin enforces the correct tool is being used. Seems to work so far.
on mine:
if gamemode of player is survival:
if player is in world "world":
set {_fortune} to the level of fortune on player's tool
set {_no_bonus_chance} to 2 / ({_fortune} + 2)
set {_rand_pick} to a random number between 0 and 1
set {_num_drops} to 1
if {_rand_pick} is greater than {_no_bonus_chance}:
set {_num_drops} to a random integer between 2 and ({_fortune} + 1)
clear drops
if event-block is oak log:
give {_num_drops} of oak log to player
else if event-block is stone:
give {_num_drops} of cobblestone to player
else if event-block is coal ore:
give {_num_drops} of coal to player
else if event-block is iron ore:
give {_num_drops} of raw iron to player
else if event-block is gold ore:
give {_num_drops} of raw gold to player
else if event-block is diamond ore:
give {_num_drops} of diamond to player
else if event-block is emerald ore:
give {_num_drops} of emerald to player
else if event-block is nether quartz ore:
give {_num_drops} of quartz to player
else if event-block is netherrack:
give {_num_drops} of netherrack to player
Auto Smelt/Auto pickup In 1 Skript
in Script Releases
Posted
I modified the script above to follow vanilla fortune mechanics. I gave fortune to everything regardless of if the tool is correct as I plan to use this for a skymining server and another plugin enforces the correct tool is being used. Seems to work so far.
on mine: if gamemode of player is survival: if player is in world "world": set {_fortune} to the level of fortune on player's tool set {_no_bonus_chance} to 2 / ({_fortune} + 2) set {_rand_pick} to a random number between 0 and 1 set {_num_drops} to 1 if {_rand_pick} is greater than {_no_bonus_chance}: set {_num_drops} to a random integer between 2 and ({_fortune} + 1) clear drops if event-block is oak log: give {_num_drops} of oak log to player else if event-block is stone: give {_num_drops} of cobblestone to player else if event-block is coal ore: give {_num_drops} of coal to player else if event-block is iron ore: give {_num_drops} of raw iron to player else if event-block is gold ore: give {_num_drops} of raw gold to player else if event-block is diamond ore: give {_num_drops} of diamond to player else if event-block is emerald ore: give {_num_drops} of emerald to player else if event-block is nether quartz ore: give {_num_drops} of quartz to player else if event-block is netherrack: give {_num_drops} of netherrack to player