Jump to content

Auto Smelt/Auto pickup In 1 Skript


Recommended Posts

on break of iron ore:
    cancel event
    set block to air
    give player iron ingot

on break of cobblestone:
    cancel event
    set block to air
    give player stone

on break of diamond ore:
    cancel event
    set block to air
    give player diamond

on break of gold ore:
    cancel event
    set block to air
    give player gold ingot

on break of emerald ore:
    cancel event
    set block to air
    give player emerald

on break of ancient debris:
    cancel event
    set block to air
    give player netherite ingot

on break of coal ore:
    cancel event
    set block to air
    give player coal

Link to comment
Share on other sites

  • 2 weeks later...

Here, I made a better version of this skript (But with semi-working fortune) (made in 1 min pls dont hate)


on break:
    set {_fortune} to the level of fortune on player's tool
    if event-block is cobblestone:
        clear drops
        give 1 of stone to player
    if event-block is iron ore:
        clear drops
        give (1 + {_fortune}) of iron ingot to player
    if event-block is gold ore:
        clear drops
        give (1 + {_fortune}) of gold ingot to player
    if event-block is emerald ore:
        clear drops
        give (1 + {_fortune}) of emerald to player
    if event-block is ancient debris:
        clear drops
        give 1 of netherite ingot to player

 

Edited by Aeyth
Link to comment
Share on other sites

  • 1 year later...

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

 

Link to comment
Share on other sites

On 7/29/2022 at 4:52 AM, ItzOgSheep said:

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

 

this forum is over a year old.

 

IGN: enalecks

Discord: enalecks

 

🎸Hobbies: Gaming (Minecraft, Apex Legends, and some other irrelevant ones,) Guitar (Electric), Watching YouTube, Playing Strucid (yes on Roblox but it's fun), Skateboarding, owning Discord servers, and Listening to Music (Avenged Sevenfold, Slipknot, and Five Finger Death Punch.)</> I might have forgotten some but I'll add them when they dawn on me.

-ALEX-

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...