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.

Help with custom blocks.

Discussion in 'Skript' started by Skizzors, Sep 11, 2021.

  1. Skizzors

    Skizzors Member

    Joined:
    Sep 11, 2021
    Messages:
    1
    Likes Received:
    0
    I'm trying to recreate titanium from hypixel skyblock inside of skript, but I have no way of determining whether they broke the block i want instead of a placed polished diorite. Here's my code so far:

    options:
    block: polished diorite
    name: "test"

    on break of ancient debris:
    chance of 10%:
    set event-block to {@block}
    on break of {@block}:
    broadcast "bruh"

    Right now if you break any polished diorite is broadcasts bruh.
     
  2. TheCubPlays

    TheCubPlays Member

    Joined:
    Jun 22, 2021
    Messages:
    33
    Likes Received:
    3
    Try this instead:

    Code (Text):
    1. options:
    2.     block: polished diorite
    3.     name: "test"
    4.  
    5. on break of ancient debris:
    6.     chance of 10%:
    7.         set event-block to {@block}
    8. on break:
    9.     if event-block is {@block}:
    10.         broadcast "bruh"
     
  3. oToghty

    VIP Supporter +

    Joined:
    Sep 1, 2020
    Messages:
    39
    Likes Received:
    2
    That's not gonna work, blocks don't have names
     
  4. TheCubPlays

    TheCubPlays Member

    Joined:
    Jun 22, 2021
    Messages:
    33
    Likes Received:
    3
    Then maybe something like this:

    Code (Text):
    1. options:
    2.     block: polished diorite
    3.     name: "test"
    4.  
    5. on break of ancient debris:
    6.     chance of 10%:
    7.         set event-block to {@block}
    8.         set {variable::%event-location%} to true
    9. on break:
    10.     if event-block is {@block}:
    11.         if {variable::%event-location%} is true:
    12.             broadcast "bruh"
    13.             set {variable::%event-location%} to false
    or well you could skip the "if event-block is {@block}" part I guess
     

Share This Page

Loading...