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.

Loop blocks skript?

Discussion in 'Skript' started by bebeli555, May 6, 2020.

Thread Status:
Not open for further replies.
  1. bebeli555

    bebeli555 Member

    Joined:
    Feb 6, 2020
    Messages:
    28
    Likes Received:
    0
    Im not very sure how to use the loop blocks thing in skript im trying to make like a thing that will remove ”lag machines” if the tps is low so how can you like loop blocks around a player like in radius 20 and then check if the looped block is piston and after that check if the block below is observer and then remove them both?
     
  2. Dave

    Dave Active Member

    Joined:
    Jul 20, 2018
    Messages:
    228
    Likes Received:
    9
    do you want a command or an periodical event?
    --- Double Post Merged, May 7, 2020, Original Post Date: May 6, 2020 ---
    I used WildSkript to get the actual tps cuz I tested it on 1.8.8
    Code (Text):
    1. every 5 minutes:
    2.     set {tps} to tps
    3.     if {tps} < 20:
    4.         loop all players:
    5.             loop all blocks in radius 20 around loop-player:
    6.                 if loop-block is piston or sticky piston:
    7.                     set block at loop-block to air
    8.  
    9.         delete {tps}
    10.     else:
    11.         stop
     
  3. bebeli555

    bebeli555 Member

    Joined:
    Feb 6, 2020
    Messages:
    28
    Likes Received:
    0
    thanks
     
  4. Dave

    Dave Active Member

    Joined:
    Jul 20, 2018
    Messages:
    228
    Likes Received:
    9
    update this thread as ''solved'' if it works
     
Thread Status:
Not open for further replies.

Share This Page

Loading...