Solved Auto-generation

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

Code:
on chunk generate:
    if random integer between 0 and 10 is 1:
        loop blocks within event-chunk:
            if y-pos of loop-block is less than 60:
                if loop-block is air:
                    if block under loop-block is stone:
                        set {_c} to 0
                        loop blocks in radius 2 of loop-block:
                            if loop-block-2 is air:
                                add 1 to {_c}
                        if {_c} is more than 3:
                            if random integer between 0 and 200 is 1:
                                set loop-block to gold block
                                broadcast "&6Special block generated on &b%location of loop-block%&6!" to event-world
                                exit
You can change chance (in my example 200) of generating "special" blocks on line
Code:
if random integer between 0 and 800 is 1:
But do not use small number because there will be a lot of "special" blocks!
And chance of choosing chunk (in my example 10):
Code:
if random integer between 0 and 10 is 1:
 
Last edited:
  • Like
Reactions: Flajakay
Status
Not open for further replies.