Help with custom blocks.

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

Skizzors

Member
Sep 11, 2021
1
0
1
23
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.
 
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.
Try this instead:

Code:
options:
    block: polished diorite
    name: "test"

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

Code:
options:
    block: polished diorite
    name: "test"

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

That's not gonna work, blocks don't have names
 
That's not gonna work, blocks don't have names
Then maybe something like this:

Code:
options:
    block: polished diorite
    name: "test"
 
on break of ancient debris:
    chance of 10%:
        set event-block to {@block}
        set {variable::%event-location%} to true
on break:
    if event-block is {@block}:
        if {variable::%event-location%} is true:
            broadcast "bruh"
            set {variable::%event-location%} to false
or well you could skip the "if event-block is {@block}" part I guess
 
Status
Not open for further replies.