Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #--------------------------------------------------#
- # Credits & things! #
- #--------------------------------------------------#
- # Nate's scatter skript, version [4.3] by NatePlays
- # Skript 2.1 & Below Version (Not suggested to use this one)
- # Need help installing it? Contact me through twitter! (@NatePlaysUHC)
- # Want to see it in action before using it? Then follow @OblivionUHC on Twitter to play a game!
- # Thank you, Cam (Camaro6460), for making & letting me use the /invis part in the skript!
- # Feel free to send to anyone, just give the right credit!
- # Also, feel free to edit for your own use!
- # Used the same variables as Cam's & Midnight's (Guideless) scatter for easy customization!
- # Some parts of the skript are orginally NOT MINE
- # Other then that, hope you like it!
- options:
- #--------------------------------------------------#
- # Config/Options #
- #--------------------------------------------------#
- P: &c&lScatter &8»
- # Prefix! Ex: (Prefix)&c&lScatter &8» (Main Chat Color)Everyone is now invisible!
- C: &7
- # Main chat color! Ex: (Prefix)&c&lScatter &8» (Main Chat Color)The scatter is now (Highlight Chat Color)complete!
- H: &c
- # Highlight chat color! Ex: (Prefix)&c&lScatter &8» (Highlight Chat Color)You (Main Chat Color)were scattered!
- BC: &8
- # Bracket, colon, and etc. color, it is this "[]" and ":" in chat!
- Permission: skript.scatter
- # The permission you give ops/hosts/staff/etc. to use all of the commands!
- Sounds: true
- # Do you want sounds?
- ScatterSound: random.pop
- # The main sound in the scatter!
- Tries: 1001
- # I do not suggest changing this!
- LoadGeneratedChunks: true
- # Ummm, load the generated chunks? This helps some people, other it does not, for me it does help! (Use "true" or "false")
- Vanish: true
- # Vanish players while scattering? This helps tps on 90% of servers! (Use "true" or "false") **Requires SimpleVanish plugin**
- Butcher: true
- # Butch mobs while scattering? If you have a problem, with /butcher, don't use this option! (Use "true" or "false") **Requires Worldedit & Worldguard plugin**
- MobSpawning: true
- # Should mobs spawn while scattering? I suggest you set this to "true", but if you have horrible provider, like McProHosting set it to "false" (Use "true" or "false")
- UnitRatePlayers: 100
- # The unit rate number in player amount!
- # Example: I want to wait 10 ticks between each chunk & 1 tick between each scatter of a player, with a 100 player fill in a FFA game,
- # so I would set this option to 100, the next to 10, and the one after that one to 1!
- UnitRateChunks: 10
- # The amount of ticks between each chunk to be loaded with the unit rate!**Use Ticks**
- # Example: I have 200 players in a FFA game, and my options are default in this config, then the math is 10/100*200, which equals 20 ticks,
- # so the chunkload player waits 20 ticks (1 second) before the chunkload player is teleported to the next chunk!
- UnitRateScatter: 1
- # The amount of ticks between each player to be scattered with the unit rate! **Use Ticks**
- # Example: I have 200 players in a FFA game, and my options are default in this config, then the math is 1/100*200, which equals 2 ticks,
- # so we wait 2 ticks, before the next player is scattered! (This does not effect the five second wait!)
- ScaTimes: 10
- # The amount of players gets scattered, then you wait 5 seconds for the next amount of players to be scattered!
- SpecVariable: {Spec::%loop-player%}
- # Your spectating variable, if you are using a skript, if your using a plugin then this is worthless, ignore it!
- #--------------------------------------------------#
- # Main Command #
- #--------------------------------------------------#
- command /sca [<world>] [<integer>] [<text>] [<integer>] [<integer>] [<integer>] [<integer>] [<integer>] :
- aliases: /teamsscatter, /scatterall, /teamscatter
- permission: {@Permission}
- trigger:
- #--------------------------------------------------#
- # Arguments #
- #--------------------------------------------------#
- if arg-1 is not set:
- send "{@P}{@H} /sca {@BC}<{@H}world{@BC}> <{@H}radius{@BC}> <{@H}*/teams/player{@BC}> {@BC}[{@C}Mindist{@BC}] [{@C}X-Coordinate{@BC}] [{@C}Z-Coordinate{@BC}] [{@C}Chunk Load Ticks{@BC}] [{@C}Scatter Ticks{@BC}]"
- command "/playsound random.break %command sender% ~ ~ ~ 1 1 1"
- stop trigger
- else if arg-2 is not set:
- send "{@P}{@H} /sca {@BC}<{@H}world{@BC}> <{@H}radius{@BC}> <{@H}*/teams/player{@BC}> {@BC}[{@C}Mindist{@BC}] [{@C}X-Coordinate{@BC}] [{@C}Z-Coordinate{@BC}] [{@C}Chunk Load Ticks{@BC}] [{@C}Scatter Ticks{@BC}]"
- command "/playsound random.break %command sender% ~ ~ ~ 1 1 1"
- stop trigger
- else if arg-3 is not set:
- send "{@P}{@H} /sca {@BC}<{@H}world{@BC}> <{@H}radius{@BC}> <{@H}*/teams/player{@BC}> [{@C}Mindist{@BC}] [{@C}X-Coordinate{@BC}] [{@C}Z-Coordinate{@BC}] [{@C}Chunk Load Ticks{@BC}] [{@C}Scatter Ticks{@BC}]"
- command "/playsound random.break %command sender% ~ ~ ~ 1 1 1"
- stop trigger
- #--------------------------------------------------#
- # FFA/Solo Scatter #
- #--------------------------------------------------#
- if arg-3 is "all" or "*":
- if command sender is console:
- stop trigger
- set {_ToScatter::*} to (all players)
- loop all players:
- {@SpecVariable} is true
- remove loop-player from {_ToScatter::*}
- set {_Size} to (size of {_ToScatter::*})
- if arg-4 is set:
- if arg-4 is equal to 0:
- set {_Mindist} to (arg-2/{_Size})*3.5
- if arg-2 is less than {_Mindist}:
- set {_Mindist} to argument 2-100
- else:
- set {_Mindist} to arg-4
- else:
- set {_Mindist} to (arg-2/{_Size})*3.5
- if arg-2 is less than {_Mindist}:
- set {_Mindist} to argument 2-100
- if arg-5 is set:
- set {_X} to arg-5
- else:
- set {_X} to 0
- if arg-6 is set:
- set {_Z} to arg-6
- else:
- set {_Z} to 0
- if arg-7 is set:
- set {_ChunkLoadTicks} to arg-7
- else:
- set {_ChunkLoadTicks} to round({@UnitRateChunks}/{@UnitRatePlayers}*{_Size})
- if arg-8 is set:
- set {_ScatterTicks} to arg-8
- else:
- set {_ScatterTicks} to round({@UnitRateScatter}/{@UnitRatePlayers}*{_Size})
- if {_ChunkLoadTicks} is 0:
- set {_ChunkLoadTicks} to 1
- if {_ScatterTicks} is 0:
- set {_ScatterTicks} to 1
- while (block at {_CMDLocB}) is air:
- set {_CMDLocB} to location 1 below {_CMDLocB}
- if y-coordinate of {_CMDLocB} is less than 3:
- set {_CMDLocB} to (location at (0, 256, 0) of the world arg-1)
- wait 1 tick
- teleport the command sender to (location 1 above {_CMDLocB})
- if {@MobSpawning} is false:
- player command "/gamerule doMobSpawning false"
- set {_ApproxTime} to ({_Size}*({_ChunkLoadTicks}+{_ScatterTicks})/20)+(({_Size}/{@ScaTimes})*5)
- broadcast "{@P}{@C} Attempting to scatter {@BC}[{@H}%{_Size}%{@C}{@BC}] {@C}players around {@H}%{_X}%,%{_Z}%!"
- command "/scattersound"
- wait 2 ticks
- broadcast "{@P}{@C} Lowest Mindist{@BC}: {@H}%{_Mindist}%{@C} Radius{@BC}: {@H}%arg-2%"
- command "/scattersound"
- wait 2 ticks
- broadcast "{@P}{@C} Chunk Loading Ticks{@BC}: {@H}%{_ChunkLoadTicks}%{@C} Scatter Ticks{@BC}: {@H}%{_ScatterTicks}%"
- command "/scattersound"
- wait 2 ticks
- broadcast "{@P}{@C} This operation will take approximately {@H}%{_ApproxTime}% seconds!"
- command "/scattersound"
- loop ({_Size}) times:
- loop {@Tries} times:
- if (loop-number-2) is {@Tries}:
- loop ({_Size}) times:
- loop {@Tries} times:
- if (loop-number-2) is {@Tries}:
- broadcast "{@P}{@C}Couldn't scatter {@BC}[{@H}%({_Size})-(loop-number-1)%{@BC}/{@H}%{_Size}%{@BC}]{@C} players!"
- send "{@P} {@C}Locations couldn't be found! {@BC}[{@C}Too big of a {@H}mindist!{@BC}]"
- send "{@P} {@C}You may want to do {@H}/tpall!"
- command "/scatterbroke"
- stop trigger
- set {_Location.Good} to true
- set {_Location.Sky} to (the location at ((random integer between ({_X}-(arg 2)) and ((arg 2)-1))+0.5), 255, ((random integer between ({_Z}-(arg 2)) and ((arg 2)-1))+0.5) of the world (arg 1))
- loop ((loop-number-1)-1) times:
- (distance between {_Location.Sky} and {_GoodLocation.Sky::%loop-number-3%}) is less than ({_Mindist})
- delete {_Location.Good}
- if {_Location.Good} is true:
- set {_Location.GroundLevel} to {_Location.Sky}
- while (block at {_Location.GroundLevel}) is air:
- if (y-coordinate of ({_Location.GroundLevel})) is less than 4:
- delete {_Location.Good}
- exit loop
- set {_Location.GroundLevel} to (location 1 below ({_Location.GroundLevel}))
- if {_Location.Good} is true:
- if (block at {_Location.GroundLevel}) is lava, water or cactus:
- delete {_Location.Good}
- else:
- set {_GoodLocation.Sky::%loop-number-1%} to ({_Location.Sky})
- set {_GoodLocation.GroundLevel::%loop-number-1%} to (location 1 above {_Location.GroundLevel})
- wait 1 tick
- exit 9 sections
- set {_Location.Good} to true
- set {_Location.Sky} to (the location at ((random integer between ({_X}-(arg-2)) and (({_X}-1))+0.5)+arg-2), 255, ((random integer between ({_Z}-(arg-2)) and (({_Z}-1))+0.5)+arg-2) of the world (arg-1))
- loop ((loop-number-1)-1) times:
- (distance between {_Location.Sky} and {_GoodLocation.Sky::%loop-number-3%}) is less than ({_Mindist})
- delete {_Location.Good}
- if {_Location.Good} is true:
- set {_Location.GroundLevel} to {_Location.Sky}
- while (block at {_Location.GroundLevel}) is air:
- if (y-coordinate of ({_Location.GroundLevel})) is less than 4:
- delete {_Location.Good}
- exit loop
- set {_Location.GroundLevel} to (location 1 below ({_Location.GroundLevel}))
- if {_Location.Good} is true:
- if (block at {_Location.GroundLevel}) is lava, water or cactus:
- delete {_Location.Good}
- else:
- set {_GoodLocation.Sky::%loop-number-1%} to ({_Location.Sky})
- set {_GoodLocation.GroundLevel::%loop-number-1%} to (location 1 above {_Location.GroundLevel})
- wait 1 tick
- exit loop
- if {@Vanish} is true:
- command "/invis on"
- set {Scatter.DontUnloadChunks} to true
- broadcast ""
- set {_Time} to now
- set {_Size2} to {_Size}
- broadcast "{@P} {@C}Locations found! Starting the {@H}scatter {@C}process!"
- while {_Size2} is more than 0:
- if {_Size2} is less than {@ScaTimes}+1:
- if {@LoadGeneratedChunks} is true:
- loop {_Size2} times:
- if command sender is not online:
- broadcast "{@P} {@C}Stopping {@H}scatter! {@C}Chunkloading player logged out."
- command "/scatterbroke"
- stop trigger
- add 1 to {_Chunks}
- teleport command sender to {_GoodLocation.GroundLevel::%{_Chunks}%}
- if {@Butcher} is true:
- player command "/butcher %arg-2%"
- loop {_ChunkLoadTicks} times:
- wait 1 tick
- loop {_Size2} times:
- if {@LoadGeneratedChunks} is not true:
- if {@Butcher} is true:
- player command "/butcher %arg-2%"
- set {_Scatter.Player} to a random element out of {_ToScatter::*}
- set {_Scatter.Player} to {_Scatter.Player} parsed as offlineplayer
- remove {_Scatter.Player} from {_ToScatter::*}
- add 1 to {_Scattered}
- if {_Scatter.Player} is not online:
- if {_Scatter.Player} is "%command sender%":
- set {_CMDSender} to {_GoodLocation.GroundLevel::%{_Scattered}%}
- else:
- set {SchedueldScatter::%{_Scatter.Player}%} to ({_GoodLocation.GroundLevel::%{_Scattered}%})
- else:
- if {_Scatter.Player} is "%command sender%":
- set {_CMDSender} to {_GoodLocation.GroundLevel::%{_Scattered}%}
- else:
- teleport {_Scatter.Player} to ({_GoodLocation.GroundLevel::%{_Scattered}%})
- send "{@P}{@H} You {@C}were scattered!" to {_Scatter.Player}
- loop {_ScatterTicks} times:
- wait 1 tick
- set {_Size2} to 0
- exit loop
- else:
- if {@LoadGeneratedChunks} is true:
- loop {@ScaTimes} times:
- if command sender is not online:
- broadcast "{@P} {@C}Stopping {@H}scatter! {@C}Chunkloading player logged out."
- command "/scatterbroke"
- stop trigger
- add 1 to {_Chunks}
- teleport command sender to {_GoodLocation.GroundLevel::%{_Chunks}%}
- if {@Butcher} is true:
- player command "/butcher %arg-2%"
- loop {_ChunkLoadTicks} times:
- wait 1 tick
- loop {@ScaTimes} times:
- if {@LoadGeneratedChunks} is not true:
- if {@Butcher} is true:
- player command "/butcher %arg-2%"
- set {_Scatter.Player} to a random element out of {_ToScatter::*}
- set {_Scatter.Player} to {_Scatter.Player} parsed as offlineplayer
- remove {_Scatter.Player} from {_ToScatter::*}
- remove 1 from {_Size2}
- add 1 to {_Scattered}
- if {_Scatter.Player} is not online:
- if {_Scatter.Player} is "%command sender%":
- set {_CMDSender} to {_GoodLocation.GroundLevel::%{_Scattered}%}
- else:
- set {SchedueldScatter::%{_Scatter.Player}%} to ({_GoodLocation.GroundLevel::%{_Scattered}%})
- else:
- if {_Scatter.Player} is "%command sender%":
- set {_CMDSender} to {_GoodLocation.GroundLevel::%{_Scattered}%}
- else:
- teleport {_Scatter.Player} to ({_GoodLocation.GroundLevel::%{_Scattered}%})
- send "{@P}{@H} You {@C}were scattered!" to {_Scatter.Player}
- loop {_ScatterTicks} times:
- wait 1 tick
- if {_Size2} is more than {@ScaTimes}:
- broadcast "{@P}{@C} Scattered {@BC}[{@H}%{_Scattered}%{@C}/{@H}%{_Size}%{@BC}] {@C}players! {@C}Waiting {@BC}[{@H}5{@BC}] {@H}seconds {@C}to scatter {@BC}[{@H}{@ScaTimes}{@BC}] {@C}more players!"
- else:
- broadcast "{@P}{@C} Scattered {@BC}[{@H}%{_Scattered}%{@C}/{@H}%{_Size}%{@BC}] {@C}players! {@C}Waiting {@BC}[{@H}5{@BC}] {@H}seconds {@C}to scatter {@BC}[{@H}%{_Size2}%{@BC}] {@C}more players!"
- command "/scattersound"
- wait 5 seconds
- if {@Butcher} is true:
- player command "/butcher %arg-2%"
- wait 1 tick
- broadcast ""
- broadcast "{@P}{@C} A total of {@BC}[{@H}%{_Scattered}%{@BC}] {@C}players scattered! Took {@H}%difference between {_Time} and now%!"
- broadcast "{@P}{@C} Lowest Mindist{@BC}: {@H}%{_Mindist}%{@C} Radius{@BC}: {@H}%arg-2%"
- broadcast "{@P}{@C} Chunk Loading Ticks{@BC}: {@H}%{_ChunkLoadTicks}%{@C} Scatter Ticks{@BC}: {@H}%{_ScatterTicks}%"
- teleport command sender to {_CMDSender}
- wait 1 tick
- if {@Sounds} is true:
- loop all players:
- command "/playsound note.pling %loop-player%"
- if {@MobSpawning} is false:
- player command "/gamerule doMobSpawning true"
- loop 10 times:
- if {@Butcher} is true:
- player command "/butcher %arg-2%"
- wait 1 second
- else:
- loop 5 times:
- if {@Butcher} is true:
- player command "/butcher %arg-2%"
- wait 1 second
- if {@Vanish} is true:
- command "/invis off"
- delete {Scatter.DontUnloadChunks}
- #--------------------------------------------------#
- # Team + Solo Scatter #
- #--------------------------------------------------#
- else if arg-3 is "team" or "teams":
- command "/tm rebuild"
- command "/tm color"
- if command sender is console:
- stop trigger
- set {_Count} to 0
- loop {Teams::*}:
- {Team.%loop-value%::*} is set
- increase {_Count} by 1
- add {_Count} to {_TeamsToScatter::*}
- set {_TeamScatter.%{_Count}%::*} to ({Team.%loop-value%::*})
- loop all players:
- {Teams.InTeam::%loop-player%} is not set
- add loop-player to {_Solos::*}
- loop all players:
- {@SpecVariable} is true
- remove loop-player from {_Solos::*}
- set {_TeamSize} to (size of {Teams::*})
- set {_SoloSize} to (size of {_Solos::*})
- set {_TeamSize2} to (size of {Teams::*})
- set {_SoloSize2} to (size of {_Solos::*})
- set {_Size} to ((size of {Teams::*})+(size of {_Solos::*}))
- if arg-4 is set:
- if arg-4 is equal to 0:
- set {_Mindist} to (arg-2/{_Size})*3.5
- if arg-2 is less than {_Mindist}:
- set {_Mindist} to argument 2-100
- else:
- set {_Mindist} to arg-4
- else:
- set {_Mindist} to (arg-2/{_Size})*3.5
- if arg-2 is less than {_Mindist}:
- set {_Mindist} to argument 2-100
- if arg-5 is set:
- set {_X} to arg-5
- else:
- set {_X} to 0
- if arg-6 is set:
- set {_Z} to arg-6
- else:
- set {_Z} to 0
- if arg-7 is set:
- set {_ChunkLoadTicks} to arg-7
- else:
- set {_ChunkLoadTicks} to round({@UnitRateChunks}/{@UnitRatePlayers}*{_Size})
- if arg-8 is set:
- set {_ScatterTicks} to arg-8
- else:
- set {_ScatterTicks} to round({@UnitRateScatter}/{@UnitRatePlayers}*{_Size})
- if {_ChunkLoadTicks} is 0:
- set {_ChunkLoadTicks} to 1
- if {_ScatterTicks} is 0:
- set {_ScatterTicks} to 1
- set {_CMDLocB} to (location at (0, 256, 0) of the world arg-1)
- while (block at {_CMDLocB}) is air:
- set {_CMDLocB} to location 1 below {_CMDLocB}
- if y-coordinate of {_CMDLocB} is less than 3:
- set {_CMDLocB} to (location at (0, 256, 0) of the world arg-1)
- wait 1 tick
- teleport the command sender to (location 1 above {_CMDLocB})
- if {@MobSpawning} is false:
- player command "/gamerule doMobSpawning false"
- set {_ApproxTime} to ({_Size}*({_ChunkLoadTicks}+{_ScatterTicks})/20)+(({_Size}/{@ScaTimes})*5)+3
- broadcast "{@P}{@C} Attempting to scatter {@BC}[{@H}%{_TeamSize}%{@BC}]{@C} teams & {@BC}[{@H}%{_SoloSize}%{@BC}] {@C}solos around {@H}%{_X}%,%{_Z}%!"
- command "/scattersound"
- wait 2 ticks
- broadcast "{@P}{@C} Lowest Mindist{@BC}: {@H}%{_Mindist}%{@C} Radius{@BC}: {@H}%arg-2%"
- command "/scattersound"
- wait 2 ticks
- broadcast "{@P}{@C} Chunk Loading Ticks{@BC}: {@H}%{_ChunkLoadTicks}%{@C} Scatter Ticks{@BC}: {@H}%{_ScatterTicks}%"
- command "/scattersound"
- wait 2 ticks
- broadcast "{@P}{@C} This operation will take approximately {@H}%{_ApproxTime}% seconds!"
- command "/scattersound"
- loop ({_Size}) times:
- loop {@Tries} times:
- if (loop-number-2) is {@Tries}:
- loop ({_Size}) times:
- loop {@Tries} times:
- if (loop-number-2) is {@Tries}:
- broadcast "{@P}{@C}Couldn't scatter {@BC}[{@H}%({_Size})-(loop-number-1)%{@BC}/{@H}%{_Size}%{@BC}]{@C} players!"
- send "{@P} {@C}Locations couldn't be found! {@BC}[{@C}Too big of a {@H}mindist!{@BC}]"
- send "{@P} {@C}You may want to do {@H}/tpall!"
- command "/scatterbroke"
- stop trigger
- set {_Location.Good} to true
- set {_Location.Sky} to (the location at ((random integer between ({_X}-(arg 2)) and ((arg 2)-1))+0.5), 255, ((random integer between ({_Z}-(arg 2)) and ((arg 2)-1))+0.5) of the world (arg 1))
- loop ((loop-number-1)-1) times:
- (distance between {_Location.Sky} and {_GoodLocation.Sky::%loop-number-3%}) is less than ({_Mindist})
- delete {_Location.Good}
- if {_Location.Good} is true:
- set {_Location.GroundLevel} to {_Location.Sky}
- while (block at {_Location.GroundLevel}) is air:
- if (y-coordinate of ({_Location.GroundLevel})) is less than 4:
- delete {_Location.Good}
- exit loop
- set {_Location.GroundLevel} to (location 1 below ({_Location.GroundLevel}))
- if {_Location.Good} is true:
- if (block at {_Location.GroundLevel}) is lava, water or cactus:
- delete {_Location.Good}
- else:
- set {_GoodLocation.Sky::%loop-number-1%} to ({_Location.Sky})
- set {_GoodLocation.GroundLevel::%loop-number-1%} to (location 1 above {_Location.GroundLevel})
- wait 1 tick
- exit 9 sections
- set {_Location.Good} to true
- set {_Location.Sky} to (the location at ((random integer between ({_X}-(arg-2)) and (({_X}-1))+0.5)+arg-2), 255, ((random integer between ({_Z}-(arg-2)) and (({_Z}-1))+0.5)+arg-2) of the world (arg-1))
- loop ((loop-number-1)-1) times:
- (distance between {_Location.Sky} and {_GoodLocation.Sky::%loop-number-3%}) is less than ({_Mindist})
- delete {_Location.Good}
- if {_Location.Good} is true:
- set {_Location.GroundLevel} to {_Location.Sky}
- while (block at {_Location.GroundLevel}) is air:
- if (y-coordinate of ({_Location.GroundLevel})) is less than 4:
- delete {_Location.Good}
- exit loop
- set {_Location.GroundLevel} to (location 1 below ({_Location.GroundLevel}))
- if {_Location.Good} is true:
- if (block at {_Location.GroundLevel}) is lava, water or cactus:
- delete {_Location.Good}
- else:
- set {_GoodLocation.Sky::%loop-number-1%} to ({_Location.Sky})
- set {_GoodLocation.GroundLevel::%loop-number-1%} to (location 1 above {_Location.GroundLevel})
- wait 1 tick
- exit loop
- if {@Vanish} is true:
- command "/invis on"
- set {Scatter.DontUnloadChunks} to true
- broadcast ""
- set {_Time} to now
- broadcast "{@P} {@C}Locations found! Starting the {@H}scatter {@C}process!"
- while {_TeamSize} is more than 0:
- if {Teams::*} is not set:
- exit loop
- if {_TeamSize} is less than {@ScaTimes}+1:
- if {@LoadGeneratedChunks} is true:
- loop {_TeamSize} times:
- if command sender is not online:
- broadcast "{@P} {@C}Stopping {@H}scatter! {@C}Chunkloading player logged out."
- command "/scatterbroke"
- stop trigger
- add 1 to {_Chunks}
- teleport command sender to {_GoodLocation.GroundLevel::%{_Chunks}%}
- if {@Butcher} is true:
- player command "/butcher %arg-2%"
- loop {_ChunkLoadTicks} times:
- wait 1 tick
- loop {_TeamSize} times:
- if {@LoadGeneratedChunks} is not true:
- if {@Butcher} is true:
- player command "/butcher %arg-2%"
- set {_Scatter.Team} to a random element out of {_TeamsToScatter::*}
- remove {_Scatter.Team} from {_TeamsToScatter::*}
- add 1 to {_Scattered}
- add 1 to {_TotalScattered}
- loop {_TeamScatter.%{_Scatter.Team}%::*}:
- set {_Scatter.Player} to ("%loop-value%" parsed as offlineplayer)
- if {_Scatter.Player} is not online:
- if {_Scatter.Player} is "%command sender%":
- set {_CMDSender} to {_GoodLocation.GroundLevel::%{_TotalScattered}%}
- else:
- set {SchedueldScatter::%{_Scatter.Player}%} to ({_GoodLocation.GroundLevel::%{_TotalScattered}%})
- else:
- if {_Scatter.Player} is "%command sender%":
- set {_CMDSender} to {_GoodLocation.GroundLevel::%{_TotalScattered}%}
- else:
- teleport {_Scatter.Player} to ({_GoodLocation.GroundLevel::%{_TotalScattered}%})
- send "{@P}{@H} You {@C}were scattered!" to {_Scatter.Player}
- loop {_ScatterTicks} times:
- wait 1 tick
- set {_TeamSize} to 0
- exit loop
- else:
- if {@LoadGeneratedChunks} is true:
- loop {@ScaTimes} times:
- if command sender is not online:
- broadcast "{@P} {@C}Stopping {@H}scatter! {@C}Chunkloading player logged out."
- command "/scatterbroke"
- stop trigger
- add 1 to {_Chunks}
- teleport command sender to {_GoodLocation.GroundLevel::%{_Chunks}%}
- if {@Butcher} is true:
- player command "/butcher %arg-2%"
- loop {_ChunkLoadTicks} times:
- wait 1 tick
- loop {@ScaTimes} times:
- if {@LoadGeneratedChunks} is not true:
- if {@Butcher} is true:
- player command "/butcher %arg-2%"
- set {_Scatter.Team} to a random element out of {_TeamsToScatter::*}
- remove {_Scatter.Team} from {_TeamsToScatter::*}
- remove 1 from {_TeamSize}
- add 1 to {_Scattered}
- add 1 to {_TotalScattered}
- loop {_TeamScatter.%{_Scatter.Team}%::*}:
- set {_Scatter.Player} to ("%loop-value%" parsed as offlineplayer)
- if {_Scatter.Player} is not online:
- if {_Scatter.Player} is "%command sender%":
- set {_CMDSender} to {_GoodLocation.GroundLevel::%{_TotalScattered}%}
- else:
- set {SchedueldScatter::%{_Scatter.Player}%} to ({_GoodLocation.GroundLevel::%{_TotalScattered}%})
- else:
- if {_Scatter.Player} is "%command sender%":
- set {_CMDSender} to {_GoodLocation.GroundLevel::%{_TotalScattered}%}
- else:
- teleport {_Scatter.Player} to ({_GoodLocation.GroundLevel::%{_TotalScattered}%})
- send "{@P}{@H} You {@C}were scattered!" to {_Scatter.Player}
- loop {_ScatterTicks} times:
- wait 1 tick
- if {_TeamSize} is more than 9:
- broadcast "{@P}{@C} Scattered {@BC}[{@H}%{_Scattered}%{@C}/{@H}%{_TeamSize2}%{@BC}] {@C}teams! {@C}Waiting {@BC}[{@H}5{@BC}] {@H}seconds {@C}to scatter {@BC}[{@H}10{@BC}] {@C}more teams!"
- else:
- broadcast "{@P}{@C} Scattered {@BC}[{@H}%{_Scattered}%{@C}/{@H}%{_TeamSize2}%{@BC}] {@C}teams! {@C}Waiting {@BC}[{@H}5{@BC}] {@H}seconds {@C}to scatter {@BC}[{@H}%{_TeamSize}%{@BC}] {@C}more teams!"
- command "/scattersound"
- wait 5 seconds
- if {@Butcher} is true:
- player command "/butcher %arg-2%"
- if {Teams::*} is set:
- broadcast "{@P}{@C} Scattered {@BC}[{@H}%{_Scattered}%{@C}/{@H}%{_TeamSize2}%{@BC}] {@C}teams! {@C}Waiting {@BC}[{@H}3{@BC}] {@H}seconds {@C}to scatter solo players!"
- command "/scattersound"
- wait 3 seconds
- if {@Butcher} is true:
- player command "/butcher %arg-2%"
- set {_Scattered.Teams} to {_Scattered}
- set {_Scattered} to 0
- while {_SoloSize} is more than 0:
- if {_Solos::*} is not set:
- exit loop
- if {_SoloSize} is less than {@ScaTimes}+1:
- if {@LoadGeneratedChunks} is true:
- loop {_SoloSize} times:
- if command sender is not online:
- broadcast "{@P} {@C}Stopping {@H}scatter! {@C}Chunkloading player logged out."
- command "/scatterbroke"
- stop trigger
- add 1 to {_Chunks}
- teleport command sender to {_GoodLocation.GroundLevel::%{_Chunks}%}
- if {@Butcher} is true:
- player command "/butcher %arg-2%"
- loop {_ChunkLoadTicks} times:
- wait 1 tick
- loop {_SoloSize} times:
- if {@LoadGeneratedChunks} is not true:
- if {@Butcher} is true:
- player command "/butcher %arg-2%"
- set {_Scatter.Player} to a random element out of {_Solos::*}
- set {_Scatter.Player} to {_Scatter.Player} parsed as offlineplayer
- remove {_Scatter.Player} from {_Solos::*}
- add 1 to {_Scattered}
- add 1 to {_TotalScattered}
- if {_Scatter.Player} is not online:
- if {_Scatter.Player} is "%command sender%":
- set {_CMDSender} to {_GoodLocation.GroundLevel::%{_TotalScattered}%}
- else:
- set {SchedueldScatter::%{_Scatter.Player}%} to ({_GoodLocation.GroundLevel::%{_TotalScattered}%})
- else:
- if {_Scatter.Player} is "%command sender%":
- set {_CMDSender} to {_GoodLocation.GroundLevel::%{_TotalScattered}%}
- else:
- teleport {_Scatter.Player} to ({_GoodLocation.GroundLevel::%{_TotalScattered}%})
- send "{@P}{@H} You {@C}were scattered!" to {_Scatter.Player}
- loop {_ScatterTicks} times:
- wait 1 tick
- set {_SoloSize} to 0
- exit loop
- else:
- if {@LoadGeneratedChunks} is true:
- loop {@ScaTimes} times:
- if command sender is not online:
- broadcast "{@P} {@C}Stopping {@H}scatter! {@C}Chunkloading player logged out."
- command "/scatterbroke"
- stop trigger
- add 1 to {_Chunks}
- teleport command sender to {_GoodLocation.GroundLevel::%{_Chunks}%}
- if {@Butcher} is true:
- player command "/butcher %arg-2%"
- loop {_ChunkLoadTicks} times:
- wait 1 tick
- loop {@ScaTimes} times:
- if {@LoadGeneratedChunks} is not true:
- if {@Butcher} is true:
- player command "/butcher %arg-2%"
- set {_Scatter.Player} to a random element out of {_Solos::*}
- set {_Scatter.Player} to {_Scatter.Player} parsed as offlineplayer
- remove {_Scatter.Player} from {_Solos::*}
- remove 1 from {_SoloSize}
- add 1 to {_Scattered}
- add 1 to {_TotalScattered}
- if {_Scatter.Player} is not online:
- if {_Scatter.Player} is "%command sender%":
- set {_CMDSender} to {_GoodLocation.GroundLevel::%{_TotalScattered}%}
- else:
- set {SchedueldScatter::%{_Scatter.Player}%} to ({_GoodLocation.GroundLevel::%{_TotalScattered}%})
- else:
- if {_Scatter.Player} is "%command sender%":
- set {_CMDSender} to {_GoodLocation.GroundLevel::%{_TotalScattered}%}
- else:
- teleport {_Scatter.Player} to ({_GoodLocation.GroundLevel::%{_TotalScattered}%})
- send "{@P}{@H} You {@C}were scattered!" to {_Scatter.Player}
- loop {_ScatterTicks} times:
- wait 1 tick
- if {_SoloSize} is more than {@ScaTimes}:
- broadcast "{@P}{@C} Scattered {@BC}[{@H}%{_Scattered}%{@C}/{@H}%{_SoloSize2}%{@BC}] {@C}solo players! {@C}Waiting {@BC}[{@H}5{@BC}] {@H}seconds {@C}to scatter {@BC}[{@H}{@ScaTimes}{@BC}] {@C}more solo players!"
- else:
- broadcast "{@P}{@C} Scattered {@BC}[{@H}%{_Scattered}%{@C}/{@H}%{_SoloSize2}%{@BC}] {@C}solo players! {@C}Waiting {@BC}[{@H}5{@BC}] {@H}seconds {@C}to scatter {@BC}[{@H}%{_SoloSize}%{@BC}] {@C}more solo players!"
- command "/scattersound"
- wait 5 seconds
- if {@Butcher} is true:
- player command "/butcher %arg-2%"
- wait 1 tick
- set {_Scattered.Solos} to {_Scattered}
- if {Teams::*} is not set:
- set {_Scattered.Teams} to 0
- if size of {_Solos::*} is less than 1:
- set {_Scattered.Solos} to 0
- broadcast ""
- broadcast "{@P}{@C} A total of {@BC}[{@H}%{_Scattered.Teams}%{@BC}] {@H}teams & {@BC}[{@H}%{_Scattered.Solos}%{@BC}] {@H}solos {@C}scattered! Took {@H}%difference between {_Time} and now%!"
- broadcast "{@P}{@C} Lowest Mindist{@BC}: {@H}%{_Mindist}%{@C} Radius{@BC}: {@H}%arg-2%"
- broadcast "{@P}{@C} Chunk Loading Ticks{@BC}: {@H}%{_ChunkLoadTicks}%{@C} Scatter Ticks{@BC}: {@H}%{_ScatterTicks}%"
- teleport command sender to {_CMDSender}
- wait 1 tick
- if {@Sounds} is true:
- loop all players:
- command "/playsound note.pling %loop-player%"
- if {@MobSpawning} is false:
- player command "/gamerule doMobSpawning true"
- loop 10 times:
- if {@Butcher} is true:
- player command "/butcher %arg-2%"
- wait 1 second
- else:
- loop 5 times:
- if {@Butcher} is true:
- player command "/butcher %arg-2%"
- wait 1 second
- if {@Vanish} is true:
- command "/invis off"
- delete {Scatter.DontUnloadChunks}
- #--------------------------------------------------#
- # Single Player Scatter #
- #--------------------------------------------------#
- else if ("%arg-3%" parsed as offlineplayer) is online:
- loop {@Tries} times:
- if (loop-number-2) is {@Tries}:
- broadcast "{@P}{@C} Could not scatter {@H}%arg-3%!"
- send "{@P}{@C} Try lowering the {@H}mindist!"
- command "/scatterbroke"
- stop trigger
- set {_Location.Good} to true
- set {_Location.Sky} to (the location at ((random integer between ({_X}-(arg-2)) and (({_X}-1))+0.5)+arg-2), 255, ((random integer between ({_Z}-(arg-2)) and (({_Z}-1))+0.5)+arg-2) of the world (arg-1))
- if {_Location.Good} is true:
- set {_Location.GroundLevel} to {_Location.Sky}
- while (block at {_Location.GroundLevel}) is air:
- if (y-coordinate of ({_Location.GroundLevel})) is less than 4:
- delete {_Location.Good}
- stop loop
- set {_Location.GroundLevel} to (location 1 below ({_Location.GroundLevel}))
- if {_Location.Good} is true:
- if (block at {_Location.GroundLevel}) is lava, water or cactus:
- delete {_Location.Good}
- else:
- set {_GoodLocation.Sky} to ({_Location.Sky})
- set {_GoodLocation.GroundLevel} to (location 1 above {_Location.GroundLevel})
- stop loop
- set {Scattering::%arg-3%} to true
- teleport ("%arg-3%" parsed as offlineplayer) to ({_GoodLocation.GroundLevel})
- send "{@P} {@BC}- {@H}%arg-3%{@C} Scattered." to all ops
- wait 1 second
- delete {Scatter.Scattering::%arg-3%}
- #--------------------------------------------------#
- # Invisible Command #
- # Thank you Cam for making this! #
- #--------------------------------------------------#
- command /invis [<text=toggle>]:
- permission: {@Permission}
- trigger:
- if arg-1 is "on" or "enable":
- set {invis} to true
- loop all players:
- command "/van %loop-player%"
- add loop-player to {Invis::*}
- else if arg-1 is "off" or "disable":
- delete {invis}
- loop {Invis::*}:
- command "/rea %loop-value%"
- remove loop-value from {Invis::*}
- else if arg-1 is "toggle":
- if {invis} is set:
- delete {invis}
- loop {Invis::*}:
- command "/rea %loop-value%"
- remove loop-value from {Invis::*}
- else:
- set {invis} to true
- loop all players:
- command "/van %loop-player%"
- add loop-player to {Invis::*}
- #--------------------------------------------------#
- # Scatter Sound Commands #
- #--------------------------------------------------#
- command /scattersound:
- permission: {@Permission}
- trigger:
- {@Sounds} is true
- loop all players:
- command "/playsound {@ScatterSound} %loop-player% ~ ~ ~ 1 0.5 1"
- command /scatterbroke:
- permission: {@Permission}
- trigger:
- {@Sounds} is true
- loop all players:
- command "/playsound random.break %loop-player%"
- #--------------------------------------------------#
- # Miscellaneous Things #
- #--------------------------------------------------#
- on join:
- {invis} is true
- command "/van %event-player%"
- add event-player to {Invis::*}
- on skript load:
- delete {Scatter.DontUnloadChunks}
- delete {Scatter.Scattering::*}
- broadcast "{@P}{@C} Thanks for installing {@H}Nate's scatter version {@BC}[{@H}4.3{@BC}]!"
- broadcast "{@P}{@C} If you have any questions, tweet at {@H}@NatePlaysUHC!"
- broadcast "{@P}{@C} Want to see the {@H}scatter {@C}in action, follow {@H}@OblivionUHC {@C}on {@H}twitter!"
- on login:
- delete {Scatter.Scattering::%player%}
- {SchedueldScatter::%player%} is set
- teleport (player) to ({SchedueldScatter::%player%})
- delete {SchedueldScatter::%player%}
- send "{@P} {@BC}- {@H}%player% {@BC}- {@C}Late Scattered!" to all ops
- on chunk unload:
- {Scatter.DontUnloadChunks} is true
- cancel the event
- on damage of a player:
- {Scatter.Scattering::%victim%} is true
- cancel the event
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement