Virus 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!

Jun 30, 2020
11
1
0
33
Category:
Skript
Suggested name:
Virus Block
Spigot/Skript Version:
Newest Skript version
What I want:
A simple Skript that detects all purple concrete blocks and replicates them onto other blocks (except air). Then, it destroys the old block, so the block eats the world.

Ideas for commands:
/stop: This stops the spreading from progressing in case of lag
Ideas for permissions:

When I'd like it by: Under a week
 
  • Like
Reactions: acai
Just saying, the /stop command can stop the server so maybe pick another command if you still need this.
 
Not very simple, but did do. Will spread around X, Y, and Z, unfortunately. Can not figure out how to limit to X axis :emoji_stuck_out_tongue:

Updated code that I fed into Parser:

Code:
on place of purple concrete:
  if {dospread} is 1:
    set {blocklocation} to event-block's location
    loop {looploop} times:
      add 1 to {looploop}
      add 1 to {blockspread}
      loop all blocks in radius {blockspread} of event-block:
        if loop-block is not air:
          set loop-block to purple concrete

on script load:
  set {looploop} to 2
  set {blockspread} to 5

command /spread [<text>]:
  permission: skunity.ontop
  trigger:
    if arg-1 is "stop":
      set {dospread} to 0
    else:
      if arg-1 is "start":
        set {dospread} to 1
 
Last edited:
Not very simple, but did do. Will spread around X, Y, and Z, unfortunately. Can not figure out how to limit to X axis :emoji_stuck_out_tongue:

Updated code that I fed into Parser:

Code:
on place of purple concrete:
  if {dospread} is 1:
    set {blocklocation} to event-block's location
    loop {looploop} times:
      add 1 to {looploop}
      add 1 to {blockspread}
      loop all blocks in radius {blockspread} of event-block:
        if loop-block is not air:
          set loop-block to purple concrete

on script load:
  set {looploop} to 2
  set {blockspread} to 5

command /spread [<text>]:
  permission: skunity.ontop
  trigger:
    if arg-1 is "stop":
      set {dospread} to 0
    else:
      if arg-1 is "start":
        set {dospread} to 1
Wouldn't that be really fast? Is there a way to add a delay between each spread?
 
yes, but you should add a delay (wait 1 seconds) before it sets block