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

  2. LOOKING FOR A VERSION OF SKRIPT?

    You can always check out our Wiki for downloads and any other information about Skript!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Define a placed block

Discussion in 'Skript' started by Kezard, Jul 9, 2020.

Thread Status:
Not open for further replies.
  1. Kezard

    Kezard Member

    Joined:
    May 22, 2020
    Messages:
    11
    Likes Received:
    0
    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?
     
  2. ChrilleDEV

    ChrilleDEV Member

    Joined:
    Jul 6, 2020
    Messages:
    11
    Likes Received:
    0
    Code (Text):
    1. on break:
    2.     if event-block is dirt:
    3.         chance of 10%:
    4.             drop 5 gold ingots at event-block's location
    5.         chance of 35%:
    6.             drop 3 gold ingots at event-block's location
    7.         chance of 60%:
    8.             drop 2 gold ingots at event-block's location
    9.         chance of 45%:
    10.             drop 1 seed named "&a&lGrass Seeds" at event-block's location
    This works fine for me :emoji_slight_smile:
     
  3. Kezard

    Kezard Member

    Joined:
    May 22, 2020
    Messages:
    11
    Likes Received:
    0
    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
     
  4. xCoini

    xCoini Member

    Joined:
    Apr 19, 2019
    Messages:
    14
    Likes Received:
    0
    What do you mean? Do you mean every block should have more drops like redstone or glowstone?
     
  5. Kezard

    Kezard Member

    Joined:
    May 22, 2020
    Messages:
    11
    Likes Received:
    0
    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.
    --- Double Post Merged, Aug 1, 2020, Original Post Date: Jul 14, 2020 ---
    I still need this if anyone is willing to help out.
     
  6. Time4Games

    Time4Games Active Member

    Joined:
    Jul 25, 2020
    Messages:
    202
    Likes Received:
    4
    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
     
    #6 Time4Games, Aug 1, 2020
    Last edited: Aug 1, 2020
Thread Status:
Not open for further replies.

Share This Page

Loading...