if victim is a mob issue

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

Status
Not open for further replies.

varboosted

Active Member
Apr 20, 2020
50
3
8
24
on death:
if player is in world "Mining":
if attacker is a player:
if victim is mob:
if chance of 50%:
drop gold ingot at location of victim
if chance of 40%:
drop 2 gold ingots at location of victim
if chance of 9%:
drop 3 gold ingots at location of victim
if chance of 1%:
drop diamond at location of victim



how to fix that it is not working?
and how can i do same percentages but for diamond block break
 
I think this will work for you
Code:
on death:
    if player's world = "Mining":
        if attacker is a player:
            if victim is a entity:
                chance of 50%:
                    drop 1 gold ingot at victim
                chance of 40%:
                    drop 2 gold ingot at victim
                chance of 9%:
                    drop 3 gold ingot at victim   
                chance of 1%:
                    drop diamond at victim
 
I think this will work for you
Code:
on death:
    if player's world = "Mining":
        if attacker is a player:
            if victim is a entity:
                chance of 50%:
                    drop 1 gold ingot at victim
                chance of 40%:
                    drop 2 gold ingot at victim
                chance of 9%:
                    drop 3 gold ingot at victim  
                chance of 1%:
                    drop diamond at victim

Thank you, how can i do the same but for block breaking diamond/emerald/iron and it will make console execute command?
 
Try this
Code:
on block break:
    if player's world = "Mining":
        if event-block is gold ore:
            cancel event
            set event-block to air
            chance of 50%:
                drop 1 gold ingot at event-block
            chance of 40%:
                drop 2 gold ingot at event-block
            chance of 9%:
                drop 3 gold ingot at event-block 
            chance of 1%:
                    drop diamond at event-block     
        if event-block is iron ore:
            cancel event
            set event-block to air
            chance of 50%:
                drop 1 gold ingot at event-block
            chance of 40%:
                drop 2 gold ingot at event-block
            chance of 9%:
                drop 3 gold ingot at event-block 
            chance of 1%:
                drop diamond at event-block
        if event-block is diamond ore:
            cancel event
            set event-block to air
            chance of 50%:
                drop 1 gold ingot at event-block
            chance of 40%:
                drop 2 gold ingot at event-block
            chance of 9%:
                drop 3 gold ingot at event-block 
            chance of 1%:
                drop diamond at event-block


You can change, what the droppings is :emoji_grinning:
 
Status
Not open for further replies.