Solved Clearlag

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

DrunkSheep73

Member
May 29, 2023
24
2
3
22
Hello!
I have made a script to remove entities:
Code:
every 5 minutes:
  wait 60 seconds
  broadcast "&4BMJbox » &cAll entities will be removed in &760 &cseconds!"
  actionbar "&4BMJbox » &cAll entities will be removed in &760 &cseconds!"
  wait 30 seconds
  broadcast "&4BMJbox » &cAll entities will be removed in &730 &cseconds!"
  actionbar "&4BMJbox » &cAll entities will be removed in &730 &cseconds!"
  wait 20 seconds
  broadcast "&4BMJbox » &cAll entities will be removed in &710 &cseconds!"
  actionbar "&4BMJbox » &cAll entities will be removed in &710 &cseconds!"
  wait 5 seconds
  broadcast "&4BMJbox » &cAll entities will be removed in &75 &cseconds!"
  actionbar "&4BMJbox » &cAll entities will be removed in &75 &cseconds!"
  wait 5 seconds
  execute console command "/killall entities world"
  broadcast "&4BMJbox » &cAll entities are removed!"
command /clearlagg:
  permission: op
  trigger:
    execute console command "/killall entities world"
    send "&cKilled all entities" to player
every 5 seconds:
  loop dropped items at world
  if loop-value is more than 50:
    execute console command "/killall entities world"
The errors are:
Line 10: (extraclearlag.sk)
Can't understand this condition/effect: actionbar "&4BMJbox ? &cAll entities will be removed in &710 &cseconds!"
Line: actionbar "&4BMJbox ? &cAll entities will be removed in &710 &cseconds!"
Line 13: (extraclearlag.sk)
Can't understand this condition/effect: actionbar "&4BMJbox ? &cAll entities will be removed in &75 &cseconds!"
Line: actionbar "&4BMJbox ? &cAll entities will be removed in &75 &cseconds!"
Line 23: (extraclearlag.sk)
Can't understand this condition/effect: loop dropped items at world
Line: loop dropped items at world
Line 24: (extraclearlag.sk)
There's no loop that matches 'loop-value'
Line: if loop-value is more than 50:
Encountered 6 errors while reloading extraclearlag.sk! (12ms)

What I want is:
If there are more than 50 dropped items then execute console command "/killall entities world"
And the actionbar

Thank you for help!
 
send actionbar "&4BMJbox » &cAll entities will be removed in &710 &cseconds!"

You can't send action bar if you don't specify the player, moreover you need to loop all players to do that since you placed it on a interval where none entities are concerned.

  • every 5 seconds:
  • loop dropped items at world
  • if loop-value is more than 50:
execute console command "/killall entities world"


Here, you are basically verifying if the item is more than 50. loop-value is the output of the loop.
You need to add a number on a variable on the loop to get the amount of dropped items


Code:
every 5 seconds:
  loop all dropped items in "world":
    add 1 to {_dropped_items}
  if {_dropped_items} > 50:
      execute console command "/killall entities world"
 
Last edited:
  • Like
Reactions: DrunkSheep73
Thank you!
[doublepost=1685875839,1685875725][/doublepost]How to set thread status to "no longer open for further replies"?