Define a placed block

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

Kezard

Member
May 22, 2020
11
0
1
So I've been trying to make a skript that makes a block such as dirt to have multiple drops. (basically a separate type of block)

I've tried variables such as:

on place:
set {grass::%event-block%} to true

on break:
if {grass::%event-block%} is true:
chance of 60%:
drop 5 gold ingots
chance of 40%:
drop 3 gold ingots
chance of 10%:
drop 2 gold ingots
chance of 45%:
drop wheat seeds named "&a&lGrass Seeds"

I thought that would work but it didn't can someone help me with this?
 
Code:
on break:
    if event-block is dirt:
        chance of 10%:
            drop 5 gold ingots at event-block's location
        chance of 35%:
            drop 3 gold ingots at event-block's location
        chance of 60%:
            drop 2 gold ingots at event-block's location
        chance of 45%:
            drop 1 seed named "&a&lGrass Seeds" at event-block's location

This works fine for me :emoji_slight_smile:
 
what i mean is if the block is grass i want it to act as grass but then i also want it to act as glowstone something like that
 
What do you mean? Do you mean every block should have more drops like redstone or glowstone?
 
What do you mean? Do you mean every block should have more drops like redstone or glowstone?

It's pretty hard to explain but I'll try. Basically if you placed a named block I want it to be a unique block with other drops from the same block as itself. Example: I place a grass block named "Crimson Ore" and I place another grass block right next to it named "Ruby Ore" I want them to have seperate drops even though they are both grass blocks.
[doublepost=1596267269,1594716290][/doublepost]I still need this if anyone is willing to help out.
 
It's pretty hard to explain but I'll try. Basically if you placed a named block I want it to be a unique block with other drops from the same block as itself. Example: I place a grass block named "Crimson Ore" and I place another grass block right next to it named "Ruby Ore" I want them to have seperate drops even though they are both grass blocks.
[doublepost=1596267269,1594716290][/doublepost]I still need this if anyone is willing to help out.

You can't do it with 2 grass blocks, your idea to change their name won't work because once you place a block it loses its name.
If you want you can use other blocks and use the code above.
Also next time you send a code please use this:
S00801-12074514.jpg
 
Last edited:
Status
Not open for further replies.