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.

Generator drop skript makes server lag

Discussion in 'Requests' started by _BraydenKing, Jun 11, 2022.

Tags:
  1. _BraydenKing

    _BraydenKing Member

    Joined:
    May 12, 2021
    Messages:
    13
    Likes Received:
    0
    Hi, I'm trying to create a generator drop skript for my generators. I have found out a way for it to work.. but the only problem is that it really makes the server lag. Anyone know how to fix this? The {generator::1::verify::*} variable is the generator's location and then the player's name. The level options are the items the generators drop.

    There is no errors on reload and everything works but is super laggy.

    Code (Text):
    1. options:
    2.     level1: wheat
    3.     level2: red mushroom
    4.     level3: melon slice
    5.     level4: pumpkin pie
    6.     level5: coal
    7.     level6: redstone
    8.     level7: iron ingot
    9.     level8: copper ingot
    10.     level9: gold ingot
    11.     level10: diamond
    12.     level11: emerald
    13.     level12: netherite ingot
    14.     level13: prismarine crystals
    15.     level14: glowstone dust
    16.     level15: magma cream
    17.  
    18. every 100 ticks in "Plots":
    19.     loop all players:
    20.         loop all blocks in radius 25 around loop-player:
    21.             if {generator::1::verify::*} contains "%loop-block's location% . %loop-player%":
    22.                 drop {@level1} 0.5 meters above loop-block's location
    23.             if {generator::2::verify::*} contains "%loop-block's location% . %loop-player%":
    24.                 drop {@level2} 0.5 meters above loop-block's location
    25.             if {generator::3::verify::*} contains "%loop-block's location% . %loop-player%":
    26.                 drop {@level3} 0.5 meters above loop-block's location
    27.             if {generator::4::verify::*} contains "%loop-block's location% . %loop-player%":
    28.                 drop {@level4} 0.5 meters above loop-block's location
    29.             if {generator::5::verify::*} contains "%loop-block's location% . %loop-player%":
    30.                 drop {@level5} 0.5 meters above loop-block's location
    31.             if {generator::6::verify::*} contains "%loop-block's location% . %loop-player%":
    32.                 drop {@level6} 0.5 meters above loop-block's location
    33.             if {generator::7::verify::*} contains "%loop-block's location% . %loop-player%":
    34.                 drop {@level7} 0.5 meters above loop-block's location
    35.             if {generator::8::verify::*} contains "%loop-block's location% . %loop-player%":
    36.                 drop {@level8} 0.5 meters above loop-block's location
    37.             if {generator::9::verify::*} contains "%loop-block's location% . %loop-player%":
    38.                 drop {@level9} 0.5 meters above loop-block's location
    39.             if {generator::10::verify::*} contains "%loop-block's location% . %loop-player%":
    40.                 drop {@level10} 0.5 meters above loop-block's location
    41.             if {generator::11::verify::*} contains "%loop-block's location% . %loop-player%":
    42.                 drop {@level11} 0.5 meters above loop-block's location
    43.             if {generator::12::verify::*} contains "%loop-block's location% . %loop-player%":
    44.                 drop {@level12} 0.5 meters above loop-block's location
    45.             if {generator::13::verify::*} contains "%loop-block's location% . %loop-player%":
    46.                 drop {@level13} 0.5 meters above loop-block's location
    47.             if {generator::14::verify::*} contains "%loop-block's location% . %loop-player%":
    48.                 drop {@level14} 0.5 meters above loop-block's location
    49.             if {generator::15::verify::*} contains "%loop-block's location% . %loop-player%":
    50.                 drop {@level15} 0.5 meters above loop-block's location
     

Share This Page

Loading...