Jump to content

Why is this not working?


Nutin_rf

Recommended Posts

on mine of iron ore:
    if player's held item is wooden pickaxe:
        cancel event
        send "&b&nStone pickaxe or higher &f&nneeded to mine in this cave!"
    else:
        cancel event
        set event-block to stone
        give player 1 iron ore
        wait 7 seconds
        set event-block to iron ore

 

These exact lines work just fine for coal ore and cobble stone. However, When I mine Iron ore with a wooden pickaxe, it just disappears, instead of doing nothing. The part where it gives me the Iron ore works fine, however.

Edit: I tried restarting the server and that didn't work either.

Edited by Nutin_rf

IF I HELPED LEAVE A LIKE

 

JUST A RANDOM PERSON WHO PLAYS MINEHUT! 🌅

image.png.bb52c4745a522a9b2696361873eda501.png

 

 

Link to comment
Share on other sites

on mine of iron ore:
    if player's tool is a wooden pickaxe:
        cancel event
        send "&b&nYou need a Stone pickaxe or higher &f&nneeded to mine in this cave!"
    else:
        cancel event
        set event-block to stone
        give player 1 iron ore
        wait 7 seconds
        set event-block to iron ore

 

imgonline-com-ua-resize-CNNkL1drx5M-removebg-preview.png.d6a8ae8b5eb862005fb056c21f934200.png

Link to comment
Share on other sites

Wait nevermind! I got it fixed now. I learned that on mine only works if you have the right type of pickaxe, so I had to use the on break.

 

Here is the new skript:

on break:
    if event-block is iron ore:
        if player's world = "mine":
            set event-block to stone
            if player's held item is wooden pickaxe:
                set event-block to iron ore
                send "&b&nStone pickaxe or higher &f&nneeded to mine in this cave!" to player
            else:
                cancel event
                set event-block to stone
                give player 1 iron ore
                wait 25 seconds
                set event-block to iron ore

 

Can a mod close this thread?

IF I HELPED LEAVE A LIKE

 

JUST A RANDOM PERSON WHO PLAYS MINEHUT! 🌅

image.png.bb52c4745a522a9b2696361873eda501.png

 

 

Link to comment
Share on other sites

On 8/1/2021 at 10:53 PM, Nutin_rf said:

Wait nevermind! I got it fixed now. I learned that on mine only works if you have the right type of pickaxe, so I had to use the on break.

 

Here is the new skript:

on break:
    if event-block is iron ore:
        if player's world = "mine":
            set event-block to stone
            if player's held item is wooden pickaxe:
                set event-block to iron ore
                send "&b&nStone pickaxe or higher &f&nneeded to mine in this cave!" to player
            else:
                cancel event
                set event-block to stone
                give player 1 iron ore
                wait 25 seconds
                set event-block to iron ore

 

Can a mod close this thread?

good

  • Like 2

Every time you tell a lie, You'll have to tell a 100 more.

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...