clear lag

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

p1ver

New Member
Aug 11, 2024
5
0
1
20
Hey guys, Im pretty new to Skript and trying to make a clear lag script, so what I got all the hostile mobs killed by using
kill all Monsters
But I want it to kill slimes and magma cubes as well, keep nametagged monsters, and not touch any armor stands, frames etc.
 
I dont really care about slimes and magma cubes, but this script keeps killing name tagged monsters
 
Is it possible to remove them, instead of killing, cuz I don’t want the loot to drop
I don't think you could just delete them, however, you could do something where when that command is called, is sets a variable to true, then another statement checks on death with the same requirements for mob as the loop you made, then cancel all drops and then you can delete the variable you set to true after all the drops are cancelled.
 
  • Like
Reactions: p1ver
I don't think you could just delete them, however, you could do something where when that command is called, is sets a variable to true, then another statement checks on death with the same requirements for mob as the loop you made, then cancel all drops and then you can delete the variable you set to true after all the drops are cancelled.
do you mean I need to kill all mobs wait a sec and delete all drops?
 
do you mean I need to kill all mobs wait a sec and delete all drops?
Nope. You would use a separate event all together. An on death event then check if the mob is of the requirement (The proper type and named) then cancel all drops if the variable (Which would be set to true once all the mobs are killed) is set, then cancel the drops and delete the variable afterwards.

So:
Command/trigger that kills all mobs (That meet criteria) then sets {Example} to true

Another event (On death) checks if victim is the same criteria as the command/trigger.
If it is, then will check if {Example} is true
Cancels all drops once it detects {Example} is true
Then deletes {Example} since it is no longer needed.
 
  • Like
Reactions: p1ver