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!

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

Virus Block

Discussion in 'Requests' started by CheckmateChris1, Jul 17, 2020.

  1. CheckmateChris1

    Joined:
    Jun 30, 2020
    Messages:
    11
    Likes Received:
    1
    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 Like x 1
  2. Orangesanta8415

    Joined:
    Nov 21, 2020
    Messages:
    28
    Likes Received:
    0
    Just saying, the /stop command can stop the server so maybe pick another command if you still need this.
     
  3. acai

    acai Active Member

    Joined:
    Oct 23, 2020
    Messages:
    89
    Likes Received:
    1
    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 (Text):
    1. on place of purple concrete:
    2.   if {dospread} is 1:
    3.     set {blocklocation} to event-block's location
    4.     loop {looploop} times:
    5.       add 1 to {looploop}
    6.       add 1 to {blockspread}
    7.       loop all blocks in radius {blockspread} of event-block:
    8.         if loop-block is not air:
    9.           set loop-block to purple concrete
    10.  
    11. on script load:
    12.   set {looploop} to 2
    13.   set {blockspread} to 5
    14.  
    15. command /spread [<text>]:
    16.   permission: skunity.ontop
    17.   trigger:
    18.     if arg-1 is "stop":
    19.       set {dospread} to 0
    20.     else:
    21.       if arg-1 is "start":
    22.         set {dospread} to 1
    23.  
     
    #3 acai, Dec 3, 2020
    Last edited: Dec 4, 2020
  4. Purple Pixel

    Purple Pixel Member

    Joined:
    Sep 23, 2020
    Messages:
    40
    Likes Received:
    3
    Wouldn't that be really fast? Is there a way to add a delay between each spread?
     
  5. acai

    acai Active Member

    Joined:
    Oct 23, 2020
    Messages:
    89
    Likes Received:
    1
    yes, but you should add a delay (wait 1 seconds) before it sets block
     

Share This Page

Loading...