Advertisement
Guest User

Untitled

a guest
Sep 17th, 2016
593
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 76.10 KB | None | 0 0
  1. #--------------------------------------------------#
  2. # Credits & things! #
  3. #--------------------------------------------------#
  4.  
  5. # Nate's scatter skript, version [5.2] by NatePlays (/r/NatePlaysUHC & @NatePlaysUHC)
  6. # Skript 2.2+ & 1.8 ONLY Version (May work in 1.9-1.10, NOT TESTED IN 1.9-1.10)
  7. # Used this scatter on a different server for ~150 games for the past 4-6 months (of course other people hosted with it xd) perfect 19-20 (even in huge fills)
  8. # Need help installing it? Contact me through twitter! (@NatePlaysUHC)
  9. # Want to see it in action before using it? Then follow @OblivionUHC on Twitter to play a game! (Gonna host VERY soon, again!)
  10. # Thank you, Cam (Camaro6460), for making & letting me use the /invis part in the skript!
  11. # Compatible with D4's, Dvox's, Dancing's, & Midnight's (Guideless) team managers!
  12. # Feel free to send to anyone, just give the right credit!
  13. # Also, feel free to edit for your own use!
  14. # Used the same variables as Cam's & Midnight's (Guideless) scatter for easy customization!
  15. # Use at your own risk, I am not responsible for ANY server damage!
  16. # If you find ANY bugs, please tell me, either through Twitter or Reddit! (NatePlaysUHC)
  17. # Some parts of the skript are orginally NOT MINE
  18. # Other then that, hope you like it!
  19.  
  20. #--------------------------------------------------#
  21. # Version Log (More for myself) #
  22. #--------------------------------------------------#
  23. # Version 1 - Horribly written, only scattered one player with the essentials TP command (Around December 2014)
  24. # 1.1 - Bug fixes (Do not ask me how there were bugs)
  25. # 1.2 - Added multiple player scatter (Like a solo scatter) running /tp (player) every 1 second
  26. # 1.3 to 1.7 - Just a lot of bug fixes & made the delay less & whatnot
  27. # Version 2 - Found D4's scatter & used his "find locations" part of the skript & some (I mean most) of his parts (Around January 2015)
  28. # 2.1 to 2.8 - Bug fixes (I literary rewrote it to my liking :P)
  29. # Version 3 - Turned "my" scatter to something like Fleft's before I found his on the reddit :/ (Turned it into one command! Instead of /scatterall, /scatterteams) (Around February to April 2015)
  30. # 3.1 - Fixed a TON of bugs, I mean a lot
  31. # 3.2 - Rewrote "my" scatter (It was basically the same as D4's before) to make it similar
  32. # 3.3 - Found efficient way of scattering now, it helped TPS a TON (Nice & slow like 2 minute scatter xd)
  33. # 3.4 - BUG FIXES
  34. # 3.5 - Added a "flexible" chunk loader delay & scatter delay
  35. # 3.6 - Fixed bugs & added a ton of options O.o
  36. # 3.7 to 3.9.9 - Tons & tons of bug fixes & cleaned up the code!
  37. # Version 4 - Rewrote the WHOLE scatter AGAIN, made it so efficient & high tech, it has a TON of new options & helps TPS 5-20x MORE! (May to November 2015)
  38. # 4.1 - Bug fixes :/ Added a spec variable option & a vanish one too (June 2015)
  39. # 4.2 - Fixed up the code & cleaned it up a little & added a few new options ;) (June 2015)
  40. # 4.3 - Bug fixes & made it even more efficient & made it help TPS more! (July 2015)
  41. # 4.4 - Added the "send to ops" part just to make everyone was scattered ;) (August 2015)
  42. # 4.5 - Bug fixes, added the TPS feature, added a LOT of this text & MORE options, added a /cancelscatter command, released it to my Twitter! (September & October 2015)
  43. # 4.6 to 4.8 - Getting it ready to release to the reddit, cleaning up the code & making everything look so nice, fixing the bugs! (October & November 2015)
  44. # 4.9 - Fixed as many bugs as I caught, tested it in a game, ~150 man fill, perfect 19 TPS during the scatter on a 4 gigabyte server on a 32 GB dedicated server from SYS (November 2015)
  45. # Version 5 - Redid the messages, made some of them into titles & action bars. (June 6, 2016 to Present)
  46. # 5.1 - Fixed all of the known bugs (July 1, 2016)
  47. # 5.2 - Fixed up the scatter to release to the reddit, changed "SEMTOp" to "SEMTAp" (July 11, 2016)
  48.  
  49. # Decided to finally release my scatter skripts today. (9/17/16)
  50.  
  51.  
  52. options:
  53.  
  54. #--------------------------------------------------#
  55. # Config/Options #
  56. #--------------------------------------------------#
  57.  
  58. P: &c&lScatter &8»
  59. # Prefix! Ex: (Prefix)&c&lScatter &8» (Main Chat Color)Everyone is now invisible!
  60.  
  61. C: &7
  62. # Main chat color! Ex: (Prefix)&c&lScatter &8» (Main Chat Color)The scatter is now (Highlight Chat Color)complete!
  63.  
  64. H: &c
  65. # Highlight chat color! Ex: (Prefix)&c&lScatter &8» (Highlight Chat Color)You (Main Chat Color)were scattered!
  66.  
  67. BC: &8
  68. # Bracket, colon, and etc. color, it is this "[]" and ":" in chat!
  69.  
  70. Permission: skript.scatter
  71. # The permission you give ops/hosts/staff/etc. to use all of the commands!
  72.  
  73. SEMTAp: true # Stands for "Send extra messages (action bar) to all players" **NOTE THIS DOES NOT INCLUDE THE TPS READING THAT IS ANOTHER OPTION!**
  74. # Would you like to send extra messages (action bar) to all players? (Example: Scatter » NatePlays was scattered! [1/1] & Scatter » Loading chunks » [1/1]) (Use "true" or "false")
  75.  
  76. TPSR: true # Stands for "Send TPS readings to ops"
  77. # Would you like to send tps readings to ops? *Suggested you set this to "true"* (Use "true" or "false")
  78.  
  79. Sounds: true
  80. # Do you want some great sounds?
  81.  
  82. ScatterSound: random.pop
  83. # The main sound in the scatter!
  84.  
  85. Tries: 1001
  86. # I do not suggest changing this!
  87.  
  88. LoadGeneratedChunks: true
  89. # Ummm, load the generated chunks? This helps A LOT, HIGHLY suggested to use! Helps TPS on 99.99% of servers! (Use "true" or "false")
  90.  
  91. Vanish: true
  92. # Vanish players while scattering? This helps TPS on 90% of servers! (HIGHLY SUGGESTED TO USE THIS OPTION) (Use "true" or "false") **Requires SimpleVanish plugin**
  93.  
  94. Butcher: true
  95. # Butch mobs while scattering? (HIGHLY SUGGESTED TO USE THIS OPTION) (Use "true" or "false") **Requires Essentials**
  96.  
  97. MobSpawning: true
  98. # Should mobs spawn while scattering? I suggest you set this to "true", but if you have horrible provider, like McProHosting (or just on a bad Minecrafted node :/) set it to "false" (Use "true" or "false")
  99.  
  100. UnitRatePlayers: 200
  101. # The unit rate number in player amount!
  102. # 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,
  103. # so I would set this option to 100, the next to 10, and the one after that one to 1!
  104.  
  105. UnitRateChunks: 10
  106. # The amount of ticks between each chunk to be loaded with the unit rate!**Use Ticks**
  107. # 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,
  108. # so the chunkload player waits 20 ticks (1 second) before the chunkload player is teleported to the next chunk!
  109.  
  110. UnitRateScatter: 1
  111. # The amount of ticks between each player to be scattered with the unit rate! **Use Ticks**
  112. # 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,
  113. # so we wait 2 ticks, before the next player is scattered! (This does not effect the five second wait!)
  114.  
  115. ScaTimes: 10
  116. # The amount of players gets scattered, then you wait 5 seconds for the next amount of players to be scattered!
  117.  
  118. SpecVariable: {spec::%loop-player%}
  119. # Your spectating variable, if you are using a skript, if your using a plugin then this is worthless, ignore it!
  120.  
  121. Version: 5.2
  122. # Don't change this
  123.  
  124. #--------------------------------------------------#
  125. # Main Command #
  126. #--------------------------------------------------#
  127.  
  128. command /sca [<world>] [<integer>] [<text>] [<integer>] [<integer>] [<integer>] [<integer>] [<integer>]:
  129. aliases: /teamsscatter, /scatterall, /teamscatter
  130. permission: {@Permission}
  131. trigger:
  132.  
  133. #--------------------------------------------------#
  134. # Arguments #
  135. #--------------------------------------------------#
  136.  
  137. if arg-1 is not set:
  138. 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}]"
  139. command "/playsound random.break %command sender% ~ ~ ~ 1 1 1"
  140. stop trigger
  141. else if arg-2 is not set:
  142. 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}]"
  143. command "/playsound random.break %command sender% ~ ~ ~ 1 1 1"
  144. stop trigger
  145. else if arg-3 is not set:
  146. 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}]"
  147. command "/playsound random.break %command sender% ~ ~ ~ 1 1 1"
  148. stop trigger
  149.  
  150. #--------------------------------------------------#
  151. # FFA/Solo Scatter #
  152. #--------------------------------------------------#
  153.  
  154. if arg-3 is "all" or "*":
  155. if command sender is console:
  156. stop trigger
  157. set {Scatter.Scattering} to true
  158. set {_ToScatter::*} to (all players)
  159. loop all players:
  160. {@SpecVariable} is true
  161. remove loop-player from {_ToScatter::*}
  162. set {_Size} to (size of {_ToScatter::*})
  163. if arg-4 is set:
  164. if arg-4 is equal to 0:
  165. set {_Mindist} to (((arg-2 * 2) - 250)/{_Size})*3.5
  166. if arg-2 is less than {_Mindist}:
  167. set {_Mindist} to argument 2-100
  168. else if arg-2 is less than 1:
  169. set {_Mindist} to argument 2-100
  170. else:
  171. set {_Mindist} to arg-4
  172. else:
  173. set {_Mindist} to (((arg-2 * 2) - 250)/{_Size})*3.5
  174. if arg-2 is less than {_Mindist}:
  175. set {_Mindist} to argument 2-100
  176. else if arg-2 is less than 1:
  177. set {_Mindist} to argument 2-100
  178. if arg-5 is set:
  179. set {_X} to arg-5
  180. else:
  181. set {_X} to 0
  182. if arg-6 is set:
  183. set {_Z} to arg-6
  184. else:
  185. set {_Z} to 0
  186. if arg-7 is set:
  187. set {_ChunkLoadTicks} to arg-7
  188. else:
  189. set {_ChunkLoadTicks} to round({@UnitRateChunks}/{@UnitRatePlayers}*{_Size})
  190. if arg-8 is set:
  191. set {_ScatterTicks} to arg-8
  192. else:
  193. set {_ScatterTicks} to round({@UnitRateScatter}/{@UnitRatePlayers}*{_Size})
  194. if {_ChunkLoadTicks} is 0:
  195. set {_ChunkLoadTicks} to 1
  196. if {_ScatterTicks} is 0:
  197. set {_ScatterTicks} to 1
  198. while (block at {_CMDLocB}) is air:
  199. set {_CMDLocB} to location 1 below {_CMDLocB}
  200. if y-coordinate of {_CMDLocB} is less than 3:
  201. set {_CMDLocB} to (location at (0, 256, 0) of the world arg-1)
  202. wait 1 tick
  203. teleport the command sender to (location 1 above {_CMDLocB})
  204. if {@MobSpawning} is false:
  205. player command "/gamerule doMobSpawning false"
  206. set {_ApproxTime} to ({_Size}*({_ChunkLoadTicks}+{_ScatterTicks})/20)+(({_Size}/{@ScaTimes})*5)
  207. broadcast "{@P}{@C} Attempting to scatter {@BC}[{@H}%{_Size}%{@C}{@BC}] {@C}players around {@BC}[{@H}%{_X}%,%{_Z}%{@BC}]!"
  208. command "/scattersound"
  209. wait 2 ticks
  210. broadcast "{@P}{@C} Lowest Mindist{@BC}: {@H}%{_Mindist}%{@C} Radius{@BC}: {@H}%arg-2%"
  211. command "/scattersound"
  212. wait 2 ticks
  213. broadcast "{@P}{@C} Chunk Loading Ticks{@BC}: {@H}%{_ChunkLoadTicks}%{@C} Scatter Ticks{@BC}: {@H}%{_ScatterTicks}%"
  214. command "/scattersound"
  215. wait 2 ticks
  216. broadcast "{@P}{@C} This operation will take approximately {@H}%{_ApproxTime}% seconds!"
  217. command "/scattersound"
  218. loop ({_Size}) times:
  219. # if {Scatter.Cancel} is true:
  220. # exit loop
  221. loop {@Tries} times:
  222. if (loop-number-2) is {@Tries}:
  223. set {_Mindist} to 200
  224. loop ({_Size}) times:
  225. loop {@Tries} times:
  226. if (loop-number-2) is {@Tries}:
  227. broadcast "{@P}{@C}Couldn't scatter {@BC}[{@H}%({_Size})-(loop-number-1)%{@BC}/{@H}%{_Size}%{@BC}]{@C} players!"
  228. send "{@P} {@C}Locations couldn't be found! {@BC}[{@C}Too big of a {@H}mindist!{@BC}]"
  229. send "{@P} {@C}You may want to do {@H}/tpall!"
  230. command "/scatterbroke"
  231. stop trigger
  232. set {_Location.Good} to true
  233. set {_Location.Sky} to (the location at (random integer between ({_X}-arg-2) and ({_X}+arg-2)), 255, (random integer between ({_Z}-arg-2) and ({_Z}+arg-2)) of the world (arg-1))
  234. loop ((loop-number-1)-1) times:
  235. (distance between {_Location.Sky} and {_GoodLocation.Sky::%loop-number-3%}) is less than ({_Mindist})
  236. delete {_Location.Good}
  237. if {_Location.Good} is true:
  238. set {_Location.GroundLevel} to {_Location.Sky}
  239. while (block at {_Location.GroundLevel}) is air:
  240. if (y-coordinate of ({_Location.GroundLevel})) is less than 4:
  241. delete {_Location.Good}
  242. exit loop
  243. set {_Location.GroundLevel} to (location 1 below ({_Location.GroundLevel}))
  244. if {_Location.Good} is true:
  245. if (block at {_Location.GroundLevel}) is lava, water or cactus:
  246. delete {_Location.Good}
  247. else:
  248. set {_GoodLocation.Sky::%loop-number-1%} to ({_Location.Sky})
  249. set {_GoodLocation.GroundLevel::%loop-number-1%} to (location 1 above {_Location.GroundLevel})
  250. wait 1 tick
  251. exit 9 sections
  252. set {_Location.Good} to true
  253. set {_Location.Sky} to (the location at (random integer between ({_X}-arg-2) and ({_X}+arg-2)), 255, (random integer between ({_Z}-arg-2) and ({_Z}+arg-2)) of the world (arg-1))
  254. loop ((loop-number-1)-1) times:
  255. (distance between {_Location.Sky} and {_GoodLocation.Sky::%loop-number-3%}) is less than ({_Mindist})
  256. delete {_Location.Good}
  257. if {_Location.Good} is true:
  258. set {_Location.GroundLevel} to {_Location.Sky}
  259. while (block at {_Location.GroundLevel}) is air:
  260. if (y-coordinate of ({_Location.GroundLevel})) is less than 4:
  261. delete {_Location.Good}
  262. exit loop
  263. set {_Location.GroundLevel} to (location 1 below ({_Location.GroundLevel}))
  264. if {_Location.Good} is true:
  265. if (block at {_Location.GroundLevel}) is lava, water or cactus:
  266. delete {_Location.Good}
  267. else:
  268. set {_GoodLocation.Sky::%loop-number-1%} to ({_Location.Sky})
  269. set {_GoodLocation.GroundLevel::%loop-number-1%} to (location 1 above {_Location.GroundLevel})
  270. wait 1 tick
  271. exit loop
  272. loop {_ToScatter::*}:
  273. if {Scatter.Cancel} is true:
  274. exit loop
  275. set {Scatter.Scattering::%loop-value%} to true
  276. if {@Vanish} is true:
  277. if {Scatter.Cancel} is not set:
  278. command "/invis on"
  279. if {Scatter.Cancel} is not set:
  280. set {Scatter.DontUnloadChunks} to true
  281. broadcast ""
  282. set {_Time} to now
  283. set {_Size2} to {_Size}
  284. broadcast "{@P} {@C}Locations found! Starting the {@H}scatter {@C}process!"
  285. while {_Size2} is more than 0:
  286. if {Scatter.Cancel} is true:
  287. exit loop
  288. if {_Size2} is less than {@ScaTimes}+1:
  289. if {@LoadGeneratedChunks} is true:
  290. loop {_Size2} times:
  291. if command sender is not online:
  292. broadcast "{@P} {@C}Stopping {@H}scatter! {@C}Chunkloading player logged out."
  293. command "/scatterbroke"
  294. stop trigger
  295. add 1 to {_Chunks}
  296. teleport command sender to {_GoodLocation.GroundLevel::%{_Chunks}%}
  297. if {@SEMTAp} is true:
  298. send action bar from "{@C}Loading chunks {@BC}» {@BC}[{@H}%{_Chunks}%{@BC}/{@H}%{_Size}%{@BC}]" to all players
  299. if {@Butcher} is true:
  300. player command "/killall monsters"
  301. loop {_ChunkLoadTicks} times:
  302. wait 1 tick
  303. loop {_Size2} times:
  304. if {@LoadGeneratedChunks} is not true:
  305. if {@Butcher} is true:
  306. player command "/killall monsters"
  307. set {_Scatter.Player} to a random element out of {_ToScatter::*}
  308. set {_Scatter.Player} to {_Scatter.Player} parsed as offlineplayer
  309. remove {_Scatter.Player} from {_ToScatter::*}
  310. add 1 to {_Scattered}
  311. if {_Scatter.Player} is not online:
  312. if {_Scatter.Player} is "%command sender%":
  313. set {_CMDSender} to {_GoodLocation.GroundLevel::%{_Scattered}%}
  314. if {@SEMTAp} is true:
  315. send action bar from "{@H}%{_Scatter.Player}% {@C}wasn't scattered, since he/she is the {@H}command sender! {@BC}[{@H}%{_Scattered}%{@BC}/{@H}%{_Size}%{@BC}]" to all players
  316. else:
  317. set {SchedueldScatter::%{_Scatter.Player}%} to ({_GoodLocation.GroundLevel::%{_Scattered}%})
  318. if {@SEMTAp} is true:
  319. send action bar from "&4&lOFFLINE {@BC}- {@H}%{_Scatter.Player}% {@C}scheduled to be {@H}scattered! {@BC}[{@H}%{_Scattered}%{@BC}/{@H}%{_Size}%{@BC}]" to all players
  320. else:
  321. if {_Scatter.Player} is "%command sender%":
  322. set {_CMDSender} to {_GoodLocation.GroundLevel::%{_Scattered}%}
  323. else:
  324. teleport {_Scatter.Player} to ({_GoodLocation.GroundLevel::%{_Scattered}%})
  325. send title from "{@H}You {@C}were scattered!" and "{@BC}[{@H}%{_Scattered}%{@BC}/{@H}%{_Size}%{@BC}]" to {_Scatter.Player} for 20, 20, 20
  326. if {@SEMTAp} is true:
  327. send action bar from "{@H}%{_Scatter.Player}% {@C}was scattered! {@BC}[{@H}%{_Scattered}%{@BC}/{@H}%{_Size}%{@BC}]" to all players
  328. loop {_ScatterTicks} times:
  329. wait 1 tick
  330. set {_Size2} to 0
  331. exit loop
  332. else:
  333. if {@LoadGeneratedChunks} is true:
  334. loop {@ScaTimes} times:
  335. if command sender is not online:
  336. broadcast "{@P} {@C}Stopping {@H}scatter! {@C}Chunkloading player logged out."
  337. command "/scatterbroke"
  338. stop trigger
  339. add 1 to {_Chunks}
  340. teleport command sender to {_GoodLocation.GroundLevel::%{_Chunks}%}
  341. if {@SEMTAp} is true:
  342. send action bar from "{@C}Loading chunks {@BC}» {@BC}[{@H}%{_Chunks}%{@BC}/{@H}%{_Size}%{@BC}]" to all players
  343. if {@Butcher} is true:
  344. player command "/killall monsters"
  345. loop {_ChunkLoadTicks} times:
  346. wait 1 tick
  347. loop {@ScaTimes} times:
  348. if {@LoadGeneratedChunks} is not true:
  349. if {@Butcher} is true:
  350. player command "/killall monsters"
  351. set {_Scatter.Player} to a random element out of {_ToScatter::*}
  352. set {_Scatter.Player} to {_Scatter.Player} parsed as offlineplayer
  353. remove {_Scatter.Player} from {_ToScatter::*}
  354. remove 1 from {_Size2}
  355. add 1 to {_Scattered}
  356. if {_Scatter.Player} is not online:
  357. if {_Scatter.Player} is "%command sender%":
  358. set {_CMDSender} to {_GoodLocation.GroundLevel::%{_Scattered}%}
  359. if {@SEMTAp} is true:
  360. send action bar from "{@H}%{_Scatter.Player}% {@C}wasn't scattered, since he/she is the {@H}command sender! {@BC}[{@H}%{_Scattered}%{@BC}/{@H}%{_Size}%{@BC}]" to all players
  361. else:
  362. set {SchedueldScatter::%{_Scatter.Player}%} to ({_GoodLocation.GroundLevel::%{_Scattered}%})
  363. if {@SEMTAp} is true:
  364. send action bar from "&4&lOFFLINE {@BC}- {@H}%{_Scatter.Player}% {@C}scheduled to be {@H}scattered! {@BC}[{@H}%{_Scattered}%{@BC}/{@H}%{_Size}%{@BC}]" to all players
  365. else:
  366. if {_Scatter.Player} is "%command sender%":
  367. set {_CMDSender} to {_GoodLocation.GroundLevel::%{_Scattered}%}
  368. else:
  369. teleport {_Scatter.Player} to ({_GoodLocation.GroundLevel::%{_Scattered}%})
  370. send title from "{@H}You {@C}were scattered!" and "{@BC}[{@H}%{_Scattered}%{@BC}/{@H}%{_Size}%{@BC}]" to {_Scatter.Player} for 20, 20, 20
  371. if {@SEMTAp} is true:
  372. send action bar from "{@H}%{_Scatter.Player}% {@C}was scattered! {@BC}[{@H}%{_Scattered}%{@BC}/{@H}%{_Size}%{@BC}]" to all players
  373. loop {_ScatterTicks} times:
  374. wait 1 tick
  375. if {_Size2} is more than {@ScaTimes}:
  376. 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!"
  377. else:
  378. 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!"
  379. command "/scattersound"
  380. set {_TPSStartTime} to now
  381. loop 5 times:
  382. wait 20 ticks
  383. if {@Butcher} is true:
  384. player command "/killall monsters"
  385. set {_TPSEndTime} to now
  386. set {_TPSTimeDifference} to difference between {_TPSStartTime} and now
  387. set {_parsedText} to ("%{_TPSTimeDifference}%" parsed as text)
  388. replace all " seconds" in {_parsedText} with ""
  389. set {_TPSTime} to ("%{_parsedText}%" parsed as number)
  390. set {_tps} to (100/{_TPSTime})
  391. loop all entities in the player's world:
  392. add 1 to {_entites}
  393. if {_tps} is greater than 17.5:
  394. if {@TPSR} is true:
  395. send title from "{@C}TPS {@BC}» &a%{_tps}%!" and "{@C}Your {@H}TPS/Memory {@C}seems &aGOOD{@BC}, {@C}but still watch it!" to all ops for 20, 60, 20
  396. else if {_tps} is greater than 15:
  397. if {@TPSR} is true:
  398. send title from "{@C}TPS {@BC}» &e%{_tps}%!" and "{@C}Your {@H}TPS/Memory {@C}seems &eOK{@BC}, {@H}disabling {@C}mob spawning!" to all ops for 20, 60, 20
  399. player command "/gamerule doMobSpawning false"
  400. else if {_tps} is greater than 10:
  401. if {@TPSR} is true:
  402. send title from "{@C}TPS {@BC}» &c%{_tps}%!" and "{@C}Your {@H}TPS/Memory {@C}seems &cBAD{@BC}, {@H}killing ALL {@C}mobs!" to all ops for 20, 60, 20
  403. player command "/killall all"
  404. else if {_tps} is greater than 1:
  405. if {@TPSR} is true:
  406. send title from "{@C}TPS {@BC}» &c%{_tps}%!" and "{@C}Your {@H}TPS/Memory {@C}seems to be &4SUFFERING!{@BC}, {@C}contact a {@H}Head-Host/Admin NOW!" to all ops for 20, 60, 20
  407. player command "/killall all"
  408. else:
  409. if {@TPSR} is true:
  410. send title from "{@C}TPS {@BC}» &cERROR!" and "{@C}Couldn't get the {@H}TPS/memory reading!" to all ops for 20, 60, 20
  411. wait 1 tick
  412. if {Scatter.Cancel} is not set:
  413. broadcast ""
  414. broadcast "{@P}{@C} A total of {@BC}[{@H}%{_Scattered}%{@BC}] {@C}players scattered! Took {@H}%difference between {_Time} and now%!"
  415. broadcast "{@P}{@C} Lowest Mindist{@BC}: {@H}%{_Mindist}%{@C} Radius{@BC}: {@H}%arg-2%"
  416. broadcast "{@P}{@C} Chunk Loading Ticks{@BC}: {@H}%{_ChunkLoadTicks}%{@C} Scatter Ticks{@BC}: {@H}%{_ScatterTicks}%"
  417. broadcast "{@P}{@C} If you are stuck in a block, use {@H}/fix! {@C}Disabling the command in {@BC}[{@H}30{@BC}] {@H}seconds!"
  418. teleport command sender to {_CMDSender}
  419. set {_TPSStartTime} to now
  420. loop 5 times:
  421. wait 20 ticks
  422. if {@Butcher} is true:
  423. player command "/killall monsters"
  424. set {_TPSEndTime} to now
  425. set {_TPSTimeDifference} to difference between {_TPSStartTime} and now
  426. set {_parsedText} to ("%{_TPSTimeDifference}%" parsed as text)
  427. replace all " seconds" in {_parsedText} with ""
  428. set {_TPSTime} to ("%{_parsedText}%" parsed as number)
  429. set {_tps} to (100/{_TPSTime})
  430. loop all entities in the player's world:
  431. add 1 to {_entites}
  432. if {_tps} is greater than 17.5:
  433. if {@TPSR} is true:
  434. send title from "{@C}TPS {@BC}» &a%{_tps}%!" and "{@C}Your {@H}TPS/Memory {@C}seems &aGOOD{@BC}, {@C}but still watch it!" to all ops for 20, 60, 20
  435. else if {_tps} is greater than 15:
  436. if {@TPSR} is true:
  437. send title from "{@C}TPS {@BC}» &e%{_tps}%!" and "{@C}Your {@H}TPS/Memory {@C}seems &eOK{@BC}, {@H}disabling {@C}mob spawning!" to all ops for 20, 60, 20
  438. player command "/gamerule doMobSpawning false"
  439. else if {_tps} is greater than 10:
  440. if {@TPSR} is true:
  441. send title from "{@C}TPS {@BC}» &c%{_tps}%!" and "{@C}Your {@H}TPS/Memory {@C}seems &cBAD{@BC}, {@H}killing ALL {@C}mobs!" to all ops for 20, 60, 20
  442. player command "/killall all"
  443. else if {_tps} is greater than 1:
  444. if {@TPSR} is true:
  445. send title from "{@C}TPS {@BC}» &c%{_tps}%!" and "{@C}Your {@H}TPS/Memory {@C}seems to be &4SUFFERING!{@BC}, {@C}contact a {@H}Head-Host/Admin NOW!" to all ops for 20, 60, 20
  446. player command "/killall all"
  447. else:
  448. if {@TPSR} is true:
  449. send title from "{@C}TPS {@BC}» &cERROR!" and "{@C}Couldn't get the {@H}TPS/memory reading!" to all ops for 20, 60, 20
  450. send "{@P}{@C} Killing all {@H}hostile mobs {@C}for {@BC}[{@H}1{@BC}] {@H}minute!" to all ops
  451. wait 1 tick
  452. set {Scatter.Fix} to true
  453. if {@Sounds} is true:
  454. loop all players:
  455. command "/playsound note.pling %loop-player%"
  456. loop 10 times:
  457. player command "/killall monsters"
  458. wait 1 second
  459. send "{@P}{@C} &cEnabling {@C}mob spawning, still {@H}butchering!" to all ops
  460. if {@Vanish} is true:
  461. command "/invis off"
  462. broadcast "{@P}{@H} Reappearing {@C}everyone! {@H}/Fix {@C}will be &cdisabled {@C}in {@BC}[{@H}15{@BC}] {@H}seconds!"
  463. player command "/gamerule doMobSpawning true"
  464. delete {Scatter.Scattering::*}
  465. delete {Scatter.DontUnloadChunks}
  466. loop 15 times:
  467. player command "/killall monsters"
  468. wait 1 second
  469. delete {Scatter.Fix}
  470. broadcast "{@P}{@H} /Fix {@C}is now &cdisabled{@BC}, {@C}don't try to use it!"
  471. set {_TPSStartTime} to now
  472. loop 5 times:
  473. wait 20 ticks
  474. if {@Butcher} is true:
  475. player command "/killall monsters"
  476. set {_TPSEndTime} to now
  477. set {_TPSTimeDifference} to difference between {_TPSStartTime} and now
  478. set {_parsedText} to ("%{_TPSTimeDifference}%" parsed as text)
  479. replace all " seconds" in {_parsedText} with ""
  480. set {_TPSTime} to ("%{_parsedText}%" parsed as number)
  481. set {_tps} to (100/{_TPSTime})
  482. loop all entities in the player's world:
  483. add 1 to {_entites}
  484. if {_tps} is greater than 17.5:
  485. if {@TPSR} is true:
  486. send title from "{@C}TPS {@BC}» &a%{_tps}%!" and "{@C}Your {@H}TPS/Memory {@C}seems &aGOOD{@BC}, {@C}but still watch it!" to all ops for 20, 60, 20
  487. else if {_tps} is greater than 15:
  488. if {@TPSR} is true:
  489. send title from "{@C}TPS {@BC}» &e%{_tps}%!" and "{@C}Your {@H}TPS/Memory {@C}seems &eOK{@BC}, {@H}disabling {@C}mob spawning!" to all ops for 20, 60, 20
  490. player command "/gamerule doMobSpawning false"
  491. else if {_tps} is greater than 10:
  492. if {@TPSR} is true:
  493. send title from "{@C}TPS {@BC}» &c%{_tps}%!" and "{@C}Your {@H}TPS/Memory {@C}seems &cBAD{@BC}, {@H}killing ALL {@C}mobs!" to all ops for 20, 60, 20
  494. player command "/killall all"
  495. else if {_tps} is greater than 1:
  496. if {@TPSR} is true:
  497. send title from "{@C}TPS {@BC}» &c%{_tps}%!" and "{@C}Your {@H}TPS/Memory {@C}seems to be &4SUFFERING!{@BC}, {@C}contact a {@H}Head-Host/Admin NOW!" to all ops for 20, 60, 20
  498. player command "/killall all"
  499. else:
  500. if {@TPSR} is true:
  501. send title from "{@C}TPS {@BC}» &cERROR!" and "{@C}Couldn't get the {@H}TPS/memory reading!" to all ops for 20, 60, 20
  502. delete {Scatter.DontUnloadChunks}
  503. delete {Scatter.Scattering::*}
  504. delete {Scatter.Fix}
  505. delete {Scatter.Cancel}
  506. delete {Invis::*}
  507. delete {Scatter.Scattering}
  508. command "/invis off"
  509.  
  510. #--------------------------------------------------#
  511. # Team + Solo Scatter #
  512. #--------------------------------------------------#
  513.  
  514. else if arg-3 is "team" or "teams":
  515. if command sender is console:
  516. stop trigger
  517. set {_Count} to 0
  518. set {Scatter.Scattering} to true
  519. loop {Teams::*}:
  520. {Team.%loop-value%::*} is set
  521. increase {_Count} by 1
  522. add {_Count} to {_TeamsToScatter::*}
  523. set {_TeamScatter.%{_Count}%::*} to ({Team.%loop-value%::*})
  524. loop all players:
  525. {Teams.InTeam::%loop-player%} is not set
  526. add loop-player to {_Solos::*}
  527. loop all players:
  528. {@SpecVariable} is true
  529. remove loop-player from {_Solos::*}
  530. set {_TeamSize} to (size of {Teams::*})
  531. set {_SoloSize} to (size of {_Solos::*})
  532. set {_TeamSize2} to (size of {Teams::*})
  533. set {_SoloSize2} to (size of {_Solos::*})
  534. set {_Size} to ((size of {Teams::*})+(size of {_Solos::*}))
  535. if arg-4 is set:
  536. if arg-4 is equal to 0:
  537. set {_Mindist} to (((arg-2 * 2) - 250)/{_Size})*3.5
  538. if arg-2 is less than {_Mindist}:
  539. set {_Mindist} to argument 2-100
  540. else if arg-2 is less than 1:
  541. set {_Mindist} to argument 2-100
  542. else:
  543. set {_Mindist} to arg-4
  544. else:
  545. set {_Mindist} to (((arg-2 * 2) - 250)/{_Size})*3.5
  546. if arg-2 is less than {_Mindist}:
  547. set {_Mindist} to argument 2-100
  548. else if arg-2 is less than 1:
  549. set {_Mindist} to argument 2-100
  550. if arg-5 is set:
  551. set {_X} to arg-5
  552. else:
  553. set {_X} to 0
  554. if arg-6 is set:
  555. set {_Z} to arg-6
  556. else:
  557. set {_Z} to 0
  558. if arg-7 is set:
  559. set {_ChunkLoadTicks} to arg-7
  560. else:
  561. set {_ChunkLoadTicks} to round({@UnitRateChunks}/{@UnitRatePlayers}*{_Size})
  562. if arg-8 is set:
  563. set {_ScatterTicks} to arg-8
  564. else:
  565. set {_ScatterTicks} to round({@UnitRateScatter}/{@UnitRatePlayers}*{_Size})
  566. if {_ChunkLoadTicks} is 0:
  567. set {_ChunkLoadTicks} to 1
  568. if {_ScatterTicks} is 0:
  569. set {_ScatterTicks} to 1
  570. set {_CMDLocB} to (location at (0, 256, 0) of the world arg-1)
  571. while (block at {_CMDLocB}) is air:
  572. set {_CMDLocB} to location 1 below {_CMDLocB}
  573. if y-coordinate of {_CMDLocB} is less than 3:
  574. set {_CMDLocB} to (location at (0, 256, 0) of the world arg-1)
  575. wait 1 tick
  576. teleport the command sender to (location 1 above {_CMDLocB})
  577. if {@MobSpawning} is false:
  578. player command "/gamerule doMobSpawning false"
  579. set {_ApproxTime} to ({_Size}*({_ChunkLoadTicks}+{_ScatterTicks})/20)+(({_Size}/{@ScaTimes})*5)+3
  580. broadcast "{@P}{@C} Attempting to scatter {@BC}[{@H}%{_TeamSize}%{@BC}]{@C} teams & {@BC}[{@H}%{_SoloSize}%{@BC}] {@C}solos around {@H}%{_X}%,%{_Z}%!"
  581. command "/scattersound"
  582. wait 2 ticks
  583. broadcast "{@P}{@C} Lowest Mindist{@BC}: {@H}%{_Mindist}%{@C} Radius{@BC}: {@H}%arg-2%"
  584. command "/scattersound"
  585. wait 2 ticks
  586. broadcast "{@P}{@C} Chunk Loading Ticks{@BC}: {@H}%{_ChunkLoadTicks}%{@C} Scatter Ticks{@BC}: {@H}%{_ScatterTicks}%"
  587. command "/scattersound"
  588. wait 2 ticks
  589. broadcast "{@P}{@C} This operation will take approximately {@H}%{_ApproxTime}% seconds!"
  590. command "/scattersound"
  591. loop ({_Size}) times:
  592. if {Scatter.Cancel} is true:
  593. exit loop
  594. loop {@Tries} times:
  595. if (loop-number-2) is {@Tries}:
  596. set {_Mindist} to 200
  597. loop ({_Size}) times:
  598. loop {@Tries} times:
  599. if (loop-number-2) is {@Tries}:
  600. broadcast "{@P}{@C}Couldn't scatter {@BC}[{@H}%({_Size})-(loop-number-1)%{@BC}/{@H}%{_Size}%{@BC}]{@C} players!"
  601. send "{@P} {@C}Locations couldn't be found! {@BC}[{@C}Too big of a {@H}mindist!{@BC}]"
  602. send "{@P} {@C}You may want to do {@H}/tpall!"
  603. command "/scatterbroke"
  604. stop trigger
  605. set {_Location.Good} to true
  606. set {_Location.Sky} to (the location at (random integer between ({_X}-arg-2) and ({_X}+arg-2)), 255, (random integer between ({_Z}-arg-2) and ({_Z}+arg-2)) of the world (arg-1))
  607. loop ((loop-number-1)-1) times:
  608. (distance between {_Location.Sky} and {_GoodLocation.Sky::%loop-number-3%}) is less than ({_Mindist})
  609. delete {_Location.Good}
  610. if {_Location.Good} is true:
  611. set {_Location.GroundLevel} to {_Location.Sky}
  612. while (block at {_Location.GroundLevel}) is air:
  613. if (y-coordinate of ({_Location.GroundLevel})) is less than 4:
  614. delete {_Location.Good}
  615. exit loop
  616. set {_Location.GroundLevel} to (location 1 below ({_Location.GroundLevel}))
  617. if {_Location.Good} is true:
  618. if (block at {_Location.GroundLevel}) is lava, water or cactus:
  619. delete {_Location.Good}
  620. else:
  621. set {_GoodLocation.Sky::%loop-number-1%} to ({_Location.Sky})
  622. set {_GoodLocation.GroundLevel::%loop-number-1%} to (location 1 above {_Location.GroundLevel})
  623. wait 1 tick
  624. exit 9 sections
  625. set {_Location.Good} to true
  626. set {_Location.Sky} to (the location at (random integer between ({_X}-arg-2) and ({_X}+arg-2)), 255, (random integer between ({_Z}-arg-2) and ({_Z}+arg-2)) of the world (arg-1))
  627. loop ((loop-number-1)-1) times:
  628. (distance between {_Location.Sky} and {_GoodLocation.Sky::%loop-number-3%}) is less than ({_Mindist})
  629. delete {_Location.Good}
  630. if {_Location.Good} is true:
  631. set {_Location.GroundLevel} to {_Location.Sky}
  632. while (block at {_Location.GroundLevel}) is air:
  633. if (y-coordinate of ({_Location.GroundLevel})) is less than 4:
  634. delete {_Location.Good}
  635. exit loop
  636. set {_Location.GroundLevel} to (location 1 below ({_Location.GroundLevel}))
  637. if {_Location.Good} is true:
  638. if (block at {_Location.GroundLevel}) is lava, water or cactus:
  639. delete {_Location.Good}
  640. else:
  641. set {_GoodLocation.Sky::%loop-number-1%} to ({_Location.Sky})
  642. set {_GoodLocation.GroundLevel::%loop-number-1%} to (location 1 above {_Location.GroundLevel})
  643. wait 1 tick
  644. exit loop
  645. if {@Vanish} is true:
  646. if {Scatter.Cancel} is not set:
  647. command "/invis on"
  648. if {Scatter.Cancel} is not set:
  649. set {Scatter.DontUnloadChunks} to true
  650. broadcast ""
  651. set {_Time} to now
  652. broadcast "{@P} {@C}Locations found! Starting the {@H}scatter {@C}process!"
  653. loop {_ToScatter::*}:
  654. set {Scatter.Scattering::%loop-value%} to true
  655. while {_TeamSize} is more than 0:
  656. if {Scatter.Cancel} is true:
  657. exit loop
  658. if {Teams::*} is not set:
  659. exit loop
  660. if {_TeamSize} is less than {@ScaTimes}+1:
  661. if {@LoadGeneratedChunks} is true:
  662. loop {_TeamSize} times:
  663. if command sender is not online:
  664. broadcast "{@P} {@C}Stopping {@H}scatter! {@C}Chunkloading player logged out."
  665. command "/scatterbroke"
  666. stop trigger
  667. add 1 to {_Chunks}
  668. teleport command sender to {_GoodLocation.GroundLevel::%{_Chunks}%}
  669. if {@SEMTAp} is true:
  670. send action bar from "{@C}Loading chunks {@BC}» {@BC}[{@H}%{_Chunks}%{@BC}/{@H}%{_Size}%{@BC}]" to all players
  671. if {@Butcher} is true:
  672. player command "/killall monsters"
  673. loop {_ChunkLoadTicks} times:
  674. wait 1 tick
  675. loop {_TeamSize} times:
  676. if {@LoadGeneratedChunks} is not true:
  677. if {@Butcher} is true:
  678. player command "/killall monsters"
  679. set {_Scatter.Team} to a random element out of {_TeamsToScatter::*}
  680. remove {_Scatter.Team} from {_TeamsToScatter::*}
  681. add 1 to {_Scattered}
  682. add 1 to {_TotalScattered}
  683. loop {_TeamScatter.%{_Scatter.Team}%::*}:
  684. set {_Scatter.Player} to ("%loop-value-2%" parsed as offlineplayer)
  685. if {_Scatter.Player} is not online:
  686. if {_Scatter.Player} is "%command sender%":
  687. set {_CMDSender} to {_GoodLocation.GroundLevel::%{_TotalScattered}%}
  688. if {@SEMTAp} is true:
  689. send action bar from "{@H}%{_Scatter.Player}% {@C}wasn't scattered, since he/she is the {@H}command sender!{@C} Scattered {@BC}[{@H}%{_Scattered}%{@BC}/{@H}%{_TeamSize2}%{@BC}] {@C}teams!" to all players
  690. else:
  691. set {SchedueldScatter::%{_Scatter.Player}%} to ({_GoodLocation.GroundLevel::%{_TotalScattered}%})
  692. if {@SEMTAp} is true:
  693. send action bar from "{@P}&4&lOFFLINE {@BC}- {@H}%{_Scatter.Player}% {@C}scheduled to be {@H}scattered!{@C} Scattered {@BC}[{@H}%{_Scattered}%{@BC}/{@H}%{_TeamSize2}%{@BC}] {@C}teams!" to all players
  694. else:
  695. if {_Scatter.Player} is "%command sender%":
  696. set {_CMDSender} to {_GoodLocation.GroundLevel::%{_TotalScattered}%}
  697. if {@SEMTAp} is true:
  698. send action bar from "{@H}%{_Scatter.Player}% {@C}wasn't scattered, since he/she is the {@H}command sender!{@C} Scattered {@BC}[{@H}%{_Scattered}%{@BC}/{@H}%{_TeamSize2}%{@BC}] {@C}teams!" to all players
  699. else:
  700. teleport {_Scatter.Player} to ({_GoodLocation.GroundLevel::%{_TotalScattered}%})
  701. send title from "{@H}You {@C}were scattered!" and "{@BC}[{@H}%{_Scattered}%{@BC}/{@H}%{_TeamSize2}%{@BC}]" to {_Scatter.Player} for 20, 20, 20
  702. if {@SEMTAp} is true:
  703. send action bar from "{@H}%{_Scatter.Player}% {@C}was scattered!{@C} Scattered {@BC}[{@H}%{_Scattered}%{@BC}/{@H}%{_TeamSize2}%{@BC}] {@C}teams!" to all players
  704. loop {_ScatterTicks} times:
  705. wait 1 tick
  706. set {_TeamSize} to 0
  707. exit loop
  708. else:
  709. if {@LoadGeneratedChunks} is true:
  710. loop {@ScaTimes} times:
  711. if command sender is not online:
  712. broadcast "{@P} {@C}Stopping {@H}scatter! {@C}Chunkloading player logged out."
  713. command "/scatterbroke"
  714. stop trigger
  715. add 1 to {_Chunks}
  716. teleport command sender to {_GoodLocation.GroundLevel::%{_Chunks}%}
  717. if {@SEMTAp} is true:
  718. send action bar from "{@C}Loading chunks {@BC}» {@BC}[{@H}%{_Chunks}%{@BC}/{@H}%{_Size}%{@BC}]" to all players
  719. if {@Butcher} is true:
  720. player command "/killall monsters"
  721. loop {_ChunkLoadTicks} times:
  722. wait 1 tick
  723. loop {@ScaTimes} times:
  724. if {@LoadGeneratedChunks} is not true:
  725. if {@Butcher} is true:
  726. player command "/killall monsters"
  727. set {_Scatter.Team} to a random element out of {_TeamsToScatter::*}
  728. remove {_Scatter.Team} from {_TeamsToScatter::*}
  729. remove 1 from {_TeamSize}
  730. add 1 to {_Scattered}
  731. add 1 to {_TotalScattered}
  732. loop {_TeamScatter.%{_Scatter.Team}%::*}:
  733. set {_Scatter.Player} to ("%loop-value-2%" parsed as offlineplayer)
  734. if {_Scatter.Player} is not online:
  735. if {_Scatter.Player} is "%command sender%":
  736. set {_CMDSender} to {_GoodLocation.GroundLevel::%{_TotalScattered}%}
  737. if {@SEMTAp} is true:
  738. send action bar from "{@H}%{_Scatter.Player}% {@C}wasn't scattered, since he/she is the {@H}command sender!{@C} Scattered {@BC}[{@H}%{_Scattered}%{@BC}/{@H}%{_TeamSize2}%{@BC}] {@C}teams!" to all players
  739. else:
  740. set {SchedueldScatter::%{_Scatter.Player}%} to ({_GoodLocation.GroundLevel::%{_TotalScattered}%})
  741. if {@SEMTAp} is true:
  742. send action bar from "{@P}&4&lOFFLINE {@BC}- {@H}%{_Scatter.Player}% {@C}scheduled to be {@H}scattered!{@C} Scattered {@BC}[{@H}%{_Scattered}%{@BC}/{@H}%{_TeamSize2}%{@BC}] {@C}teams!" to all players
  743. else:
  744. if {_Scatter.Player} is "%command sender%":
  745. set {_CMDSender} to {_GoodLocation.GroundLevel::%{_TotalScattered}%}
  746. if {@SEMTAp} is true:
  747. send action bar from "{@H}%{_Scatter.Player}% {@C}wasn't scattered, since he/she is the {@H}command sender!{@C} Scattered {@BC}[{@H}%{_Scattered}%{@BC}/{@H}%{_TeamSize2}%{@BC}] {@C}teams!" to all players
  748. else:
  749. teleport {_Scatter.Player} to ({_GoodLocation.GroundLevel::%{_TotalScattered}%})
  750. send title from "{@H}You {@C}were scattered!" and "{@BC}[{@H}%{_Scattered}%{@BC}/{@H}%{_TeamSize2}%{@BC}]" to {_Scatter.Player} for 20, 20, 20
  751. if {@SEMTAp} is true:
  752. send action bar from "{@P}{@H} %{_Scatter.Player}% {@C}was scattered!{@C} Scattered {@BC}[{@H}%{_Scattered}%{@BC}/{@H}%{_TeamSize2}%{@BC}] {@C}teams!" to all players
  753. loop {_ScatterTicks} times:
  754. wait 1 tick
  755. if {_TeamSize} is more than 9:
  756. broadcast "{@P}{@C} Scattered {@BC}[{@H}%{_Scattered}%{@C}/{@H}%{_TeamSize2}%{@BC}] {@C}teams! {@C}Waiting {@BC}[{@H}7{@BC}] {@H}seconds {@C}to scatter {@BC}[{@H}10{@BC}] {@C}more teams!"
  757. else:
  758. broadcast "{@P}{@C} Scattered {@BC}[{@H}%{_Scattered}%{@C}/{@H}%{_TeamSize2}%{@BC}] {@C}teams! {@C}Waiting {@BC}[{@H}7{@BC}] {@H}seconds {@C}to scatter {@BC}[{@H}%{_TeamSize}%{@BC}] {@C}more teams!"
  759. command "/scattersound"
  760. set {_TPSStartTime} to now
  761. loop 5 times:
  762. wait 20 ticks
  763. if {@Butcher} is true:
  764. player command "/killall monsters"
  765. set {_TPSEndTime} to now
  766. set {_TPSTimeDifference} to difference between {_TPSStartTime} and now
  767. set {_parsedText} to ("%{_TPSTimeDifference}%" parsed as text)
  768. replace all " seconds" in {_parsedText} with ""
  769. set {_TPSTime} to ("%{_parsedText}%" parsed as number)
  770. set {_tps} to (100/{_TPSTime})
  771. loop all entities in the player's world:
  772. add 1 to {_entites}
  773. if {_tps} is greater than 17.5:
  774. if {@TPSR} is true:
  775. send title from "{@C}TPS {@BC}» &a%{_tps}%!" and "{@C}Your {@H}TPS/Memory {@C}seems &aGOOD{@BC}, {@C}but still watch it!" to all ops for 20, 60, 20
  776. else if {_tps} is greater than 15:
  777. if {@TPSR} is true:
  778. send title from "{@C}TPS {@BC}» &e%{_tps}%!" and "{@C}Your {@H}TPS/Memory {@C}seems &eOK{@BC}, {@H}disabling {@C}mob spawning!" to all ops for 20, 60, 20
  779. player command "/gamerule doMobSpawning false"
  780. else if {_tps} is greater than 10:
  781. if {@TPSR} is true:
  782. send title from "{@C}TPS {@BC}» &c%{_tps}%!" and "{@C}Your {@H}TPS/Memory {@C}seems &cBAD{@BC}, {@H}killing ALL {@C}mobs!" to all ops for 20, 60, 20
  783. player command "/killall all"
  784. else if {_tps} is greater than 1:
  785. if {@TPSR} is true:
  786. send title from "{@C}TPS {@BC}» &c%{_tps}%!" and "{@C}Your {@H}TPS/Memory {@C}seems to be &4SUFFERING!{@BC}, {@C}contact a {@H}Head-Host/Admin NOW!" to all ops for 20, 60, 20
  787. player command "/killall all"
  788. else:
  789. if {@TPSR} is true:
  790. send title from "{@C}TPS {@BC}» &cERROR!" and "{@C}Couldn't get the {@H}TPS/memory reading!" to all ops for 20, 60, 20
  791. loop 2 times:
  792. wait 1 second
  793. if {@Butcher} is true:
  794. player command "/killall monsters"
  795. if {Teams::*} is set:
  796. if {Scatter.Cancel} is not set:
  797. broadcast "{@P}{@C} Scattered {@BC}[{@H}%{_Scattered}%{@C}/{@H}%{_TeamSize2}%{@BC}] {@C}teams! {@C}Waiting {@BC}[{@H}5{@BC}] {@H}seconds {@C}to scatter solo players!"
  798. command "/scattersound"
  799. loop 5 times:
  800. wait 1 second
  801. if {@Butcher} is true:
  802. player command "/killall monsters"
  803. set {_Scattered.Teams} to {_Scattered}
  804. set {_Scattered} to 0
  805. while {_SoloSize} is more than 0:
  806. if {Scatter.Cancel} is true:
  807. exit loop
  808. if {_Solos::*} is not set:
  809. exit loop
  810. if {_SoloSize} is less than {@ScaTimes}+1:
  811. if {@LoadGeneratedChunks} is true:
  812. loop {_SoloSize} times:
  813. if command sender is not online:
  814. broadcast "{@P} {@C}Stopping {@H}scatter! {@C}Chunkloading player logged out."
  815. command "/scatterbroke"
  816. stop trigger
  817. add 1 to {_Chunks}
  818. teleport command sender to {_GoodLocation.GroundLevel::%{_Chunks}%}
  819. if {@SEMTAp} is true:
  820. send action bar from "{@C}Loading chunks {@BC}» {@BC}[{@H}%{_Chunks}%{@BC}/{@H}%{_Size}%{@BC}]" to all players
  821. if {@Butcher} is true:
  822. player command "/killall monsters"
  823. loop {_ChunkLoadTicks} times:
  824. wait 1 tick
  825. loop {_SoloSize} times:
  826. if {@LoadGeneratedChunks} is not true:
  827. if {@Butcher} is true:
  828. player command "/killall monsters"
  829. set {_Scatter.Player} to a random element out of {_Solos::*}
  830. set {_Scatter.Player} to {_Scatter.Player} parsed as offlineplayer
  831. remove {_Scatter.Player} from {_Solos::*}
  832. add 1 to {_Scattered}
  833. add 1 to {_TotalScattered}
  834. if {_Scatter.Player} is not online:
  835. if {_Scatter.Player} is "%command sender%":
  836. set {_CMDSender} to {_GoodLocation.GroundLevel::%{_TotalScattered}%}
  837. if {@SEMTAp} is true:
  838. send action bar from "{@H}%{_Scatter.Player}% {@C}wasn't scattered, since he/she is the {@H}command sender!{@C} Scattered {@BC}[{@H}%{_Scattered}%{@BC}/{@H}%{_SoloSize2}%{@BC}] {@C}solo players!" to all players
  839. else:
  840. set {SchedueldScatter::%{_Scatter.Player}%} to ({_GoodLocation.GroundLevel::%{_TotalScattered}%})
  841. if {@SEMTAp} is true:
  842. send action bar from "&4&lOFFLINE {@BC}- {@H}%{_Scatter.Player}% {@C}scheduled to be {@H}scattered!{@C} Scattered {@BC}[{@H}%{_Scattered}%{@BC}/{@H}%{_SoloSize2}%{@BC}] {@C}solo players!" to all players
  843. else:
  844. if {_Scatter.Player} is "%command sender%":
  845. set {_CMDSender} to {_GoodLocation.GroundLevel::%{_TotalScattered}%}
  846. if {@SEMTAp} is true:
  847. send action bar from "{@H}%{_Scatter.Player}% {@C}wasn't scattered, since he/she is the {@H}command sender!{@C} Scattered {@BC}[{@H}%{_Scattered}%{@BC}/{@H}%{_SoloSize2}%{@BC}] {@C}solo players!" to all players
  848. else:
  849. teleport {_Scatter.Player} to ({_GoodLocation.GroundLevel::%{_TotalScattered}%})
  850. send title from "{@H}You {@C}were scattered!" and "{@BC}[{@H}%{_Scattered}%{@BC}/{@H}%{_SoloSize2}%{@BC}]" to {_Scatter.Player} for 20, 20, 20
  851. if {@SEMTAp} is true:
  852. send action bar from "{@H}%{_Scatter.Player}% {@C}was scattered!{@C} Scattered {@BC}[{@H}%{_Scattered}%{@BC}/{@H}%{_SoloSize2}%{@BC}] {@C}solo players!" to all players
  853. loop {_ScatterTicks} times:
  854. wait 1 tick
  855. set {_SoloSize} to 0
  856. exit loop
  857. else:
  858. if {@LoadGeneratedChunks} is true:
  859. loop {@ScaTimes} times:
  860. if command sender is not online:
  861. broadcast "{@P} {@C}Stopping {@H}scatter! {@C}Chunkloading player logged out."
  862. command "/scatterbroke"
  863. stop trigger
  864. add 1 to {_Chunks}
  865. teleport command sender to {_GoodLocation.GroundLevel::%{_Chunks}%}
  866. if {@SEMTAp} is true:
  867. send action bar from "{@C}Loading chunks {@BC}» {@BC}[{@H}%{_Chunks}%{@BC}/{@H}%{_Size}%{@BC}]" to all players
  868. if {@Butcher} is true:
  869. player command "/killall monsters"
  870. loop {_ChunkLoadTicks} times:
  871. wait 1 tick
  872. loop {@ScaTimes} times:
  873. if {@LoadGeneratedChunks} is not true:
  874. if {@Butcher} is true:
  875. player command "/killall monsters"
  876. set {_Scatter.Player} to a random element out of {_Solos::*}
  877. set {_Scatter.Player} to {_Scatter.Player} parsed as offlineplayer
  878. remove {_Scatter.Player} from {_Solos::*}
  879. remove 1 from {_SoloSize}
  880. add 1 to {_Scattered}
  881. add 1 to {_TotalScattered}
  882. if {_Scatter.Player} is not online:
  883. if {_Scatter.Player} is "%command sender%":
  884. set {_CMDSender} to {_GoodLocation.GroundLevel::%{_TotalScattered}%}
  885. if {@SEMTAp} is true:
  886. send action bar from "{@H}%{_Scatter.Player}% {@C}wasn't scattered, since he/she is the {@H}command sender!{@C} Scattered {@BC}[{@H}%{_Scattered}%{@BC}/{@H}%{_SoloSize2}%{@BC}] {@C}solo players!" to all players
  887. else:
  888. set {SchedueldScatter::%{_Scatter.Player}%} to ({_GoodLocation.GroundLevel::%{_TotalScattered}%})
  889. if {@SEMTAp} is true:
  890. send action bar from "&4&lOFFLINE {@BC}- {@H}%{_Scatter.Player}% {@C}scheduled to be {@H}scattered!{@C} Scattered {@BC}[{@H}%{_Scattered}%{@BC}/{@H}%{_SoloSize2}%{@BC}] {@C}solo players!" to all players
  891. else:
  892. if {_Scatter.Player} is "%command sender%":
  893. set {_CMDSender} to {_GoodLocation.GroundLevel::%{_TotalScattered}%}
  894. if {@SEMTAp} is true:
  895. send action bar from "{@H}%{_Scatter.Player}% {@C}wasn't scattered, since he/she is the {@H}command sender!{@C} Scattered {@BC}[{@H}%{_Scattered}%{@BC}/{@H}%{_SoloSize2}%{@BC}] {@C}solo players!" to all players
  896. else:
  897. teleport {_Scatter.Player} to ({_GoodLocation.GroundLevel::%{_TotalScattered}%})
  898. send title from "{@H}You {@C}were scattered!" and "{@BC}[{@H}%{_Scattered}%{@BC}/{@H}%{_SoloSize2}%{@BC}]" to {_Scatter.Player} for 20, 20, 20
  899. if {@SEMTAp} is true:
  900. send action bar from "{@H}%{_Scatter.Player}% {@C}was scattered!{@C} Scattered {@BC}[{@H}%{_Scattered}%{@BC}/{@H}%{_SoloSize2}%{@BC}] {@C}solo players!" to all players
  901. loop {_ScatterTicks} times:
  902. wait 1 tick
  903. if {_SoloSize} is more than {@ScaTimes}:
  904. 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!"
  905. else:
  906. 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!"
  907. command "/scattersound"
  908. set {_TPSStartTime} to now
  909. loop 5 times:
  910. wait 20 ticks
  911. if {@Butcher} is true:
  912. player command "/killall monsters"
  913. set {_TPSEndTime} to now
  914. set {_TPSTimeDifference} to difference between {_TPSStartTime} and now
  915. set {_parsedText} to ("%{_TPSTimeDifference}%" parsed as text)
  916. replace all " seconds" in {_parsedText} with ""
  917. set {_TPSTime} to ("%{_parsedText}%" parsed as number)
  918. set {_tps} to (100/{_TPSTime})
  919. loop all entities in the player's world:
  920. add 1 to {_entites}
  921. if {_tps} is greater than 17.5:
  922. if {@TPSR} is true:
  923. send title from "{@C}TPS {@BC}» &a%{_tps}%!" and "{@C}Your {@H}TPS/Memory {@C}seems &aGOOD{@BC}, {@C}but still watch it!" to all ops for 20, 60, 20
  924. else if {_tps} is greater than 15:
  925. if {@TPSR} is true:
  926. send title from "{@C}TPS {@BC}» &e%{_tps}%!" and "{@C}Your {@H}TPS/Memory {@C}seems &eOK{@BC}, {@H}disabling {@C}mob spawning!" to all ops for 20, 60, 20
  927. player command "/gamerule doMobSpawning false"
  928. else if {_tps} is greater than 10:
  929. if {@TPSR} is true:
  930. send title from "{@C}TPS {@BC}» &c%{_tps}%!" and "{@C}Your {@H}TPS/Memory {@C}seems &cBAD{@BC}, {@H}killing ALL {@C}mobs!" to all ops for 20, 60, 20
  931. player command "/killall all"
  932. else if {_tps} is greater than 1:
  933. if {@TPSR} is true:
  934. send title from "{@C}TPS {@BC}» &c%{_tps}%!" and "{@C}Your {@H}TPS/Memory {@C}seems to be &4SUFFERING!{@BC}, {@C}contact a {@H}Head-Host/Admin NOW!" to all ops for 20, 60, 20
  935. player command "/killall all"
  936. else:
  937. if {@TPSR} is true:
  938. send title from "{@C}TPS {@BC}» &cERROR!" and "{@C}Couldn't get the {@H}TPS/memory reading!" to all ops for 20, 60, 20
  939. wait 1 tick
  940. if {Scatter.Cancel} is not set:
  941. set {_Scattered.Solos} to {_Scattered}
  942. if {Teams::*} is not set:
  943. set {_Scattered.Teams} to 0
  944. broadcast ""
  945. 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%!"
  946. broadcast "{@P}{@C} Lowest Mindist{@BC}: {@H}%{_Mindist}%{@C} Radius{@BC}: {@H}%arg-2%"
  947. broadcast "{@P}{@C} Chunk Loading Ticks{@BC}: {@H}%{_ChunkLoadTicks}%{@C} Scatter Ticks{@BC}: {@H}%{_ScatterTicks}%"
  948. broadcast "{@P}{@C} If you are stuck in a block, use {@H}/fix! {@C}Disabling the command in {@BC}[{@H}30{@BC}] {@H}seconds!"
  949. teleport command sender to {_CMDSender}
  950. set {_TPSStartTime} to now
  951. loop 5 times:
  952. wait 20 ticks
  953. if {@Butcher} is true:
  954. player command "/killall monsters"
  955. set {_TPSEndTime} to now
  956. set {_TPSTimeDifference} to difference between {_TPSStartTime} and now
  957. set {_parsedText} to ("%{_TPSTimeDifference}%" parsed as text)
  958. replace all " seconds" in {_parsedText} with ""
  959. set {_TPSTime} to ("%{_parsedText}%" parsed as number)
  960. set {_tps} to (100/{_TPSTime})
  961. loop all entities in the player's world:
  962. add 1 to {_entites}
  963. if {_tps} is greater than 17.5:
  964. if {@TPSR} is true:
  965. send title from "{@C}TPS {@BC}» &a%{_tps}%!" and "{@C}Your {@H}TPS/Memory {@C}seems &aGOOD{@BC}, {@C}but still watch it!" to all ops for 20, 60, 20
  966. else if {_tps} is greater than 15:
  967. if {@TPSR} is true:
  968. send title from "{@C}TPS {@BC}» &e%{_tps}%!" and "{@C}Your {@H}TPS/Memory {@C}seems &eOK{@BC}, {@H}disabling {@C}mob spawning!" to all ops for 20, 60, 20
  969. player command "/gamerule doMobSpawning false"
  970. else if {_tps} is greater than 10:
  971. if {@TPSR} is true:
  972. send title from "{@C}TPS {@BC}» &c%{_tps}%!" and "{@C}Your {@H}TPS/Memory {@C}seems &cBAD{@BC}, {@H}killing ALL {@C}mobs!" to all ops for 20, 60, 20
  973. player command "/killall all"
  974. else if {_tps} is greater than 1:
  975. if {@TPSR} is true:
  976. send title from "{@C}TPS {@BC}» &c%{_tps}%!" and "{@C}Your {@H}TPS/Memory {@C}seems to be &4SUFFERING!{@BC}, {@C}contact a {@H}Head-Host/Admin NOW!" to all ops for 20, 60, 20
  977. player command "/killall all"
  978. else:
  979. if {@TPSR} is true:
  980. send title from "{@C}TPS {@BC}» &cERROR!" and "{@C}Couldn't get the {@H}TPS/memory reading!" to all ops for 20, 60, 20
  981. send "{@P}{@C} Killing all {@H}hostile mobs {@C}for {@BC}[{@H}1{@BC}] {@H}minute!" to all ops
  982. wait 1 tick
  983. set {Scatter.Fix} to true
  984. if {@Sounds} is true:
  985. loop all players:
  986. command "/playsound note.pling %loop-player%"
  987. loop 10 times:
  988. player command "/killall monsters"
  989. wait 1 second
  990. send "{@P}{@C} &cEnabling {@C}mob spawning, still {@H}butchering!"
  991. if {@Vanish} is true:
  992. command "/invis off"
  993. broadcast "{@P}{@H} Reappearing {@C}everyone! {@H}/Fix {@C}will be &cdisabled {@C}in {@BC}[{@H}15{@BC}] {@H}seconds!"
  994. player command "/gamerule doMobSpawning true"
  995. delete {Scatter.Scattering::*}
  996. delete {Scatter.DontUnloadChunks}
  997. loop 15 times:
  998. player command "/killall monsters"
  999. wait 1 second
  1000. delete {Scatter.Fix}
  1001. broadcast "{@P}{@H} /Fix {@C}is now &cdisabled{@BC}, {@C}don't try to use it!"
  1002. set {_TPSStartTime} to now
  1003. loop 5 times:
  1004. wait 20 ticks
  1005. if {@Butcher} is true:
  1006. player command "/killall monsters"
  1007. set {_TPSEndTime} to now
  1008. set {_TPSTimeDifference} to difference between {_TPSStartTime} and now
  1009. set {_parsedText} to ("%{_TPSTimeDifference}%" parsed as text)
  1010. replace all " seconds" in {_parsedText} with ""
  1011. set {_TPSTime} to ("%{_parsedText}%" parsed as number)
  1012. set {_tps} to (100/{_TPSTime})
  1013. if {_tps} is greater than 17.5:
  1014. if {@TPSR} is true:
  1015. send title from "{@C}TPS {@BC}» &a%{_tps}%!" and "{@C}Your {@H}TPS/Memory {@C}seems &aGOOD{@BC}, {@C}but still watch it!" to all ops for 20, 60, 20
  1016. else if {_tps} is greater than 15:
  1017. if {@TPSR} is true:
  1018. send title from "{@C}TPS {@BC}» &e%{_tps}%!" and "{@C}Your {@H}TPS/Memory {@C}seems &eOK{@BC}, {@H}disabling {@C}mob spawning!" to all ops for 20, 60, 20
  1019. player command "/gamerule doMobSpawning false"
  1020. else if {_tps} is greater than 10:
  1021. if {@TPSR} is true:
  1022. send title from "{@C}TPS {@BC}» &c%{_tps}%!" and "{@C}Your {@H}TPS/Memory {@C}seems &cBAD{@BC}, {@H}killing ALL {@C}mobs!" to all ops for 20, 60, 20
  1023. player command "/killall all"
  1024. else if {_tps} is greater than 1:
  1025. if {@TPSR} is true:
  1026. send title from "{@C}TPS {@BC}» &c%{_tps}%!" and "{@C}Your {@H}TPS/Memory {@C}seems to be &4SUFFERING!{@BC}, {@C}contact a {@H}Head-Host/Admin NOW!" to all ops for 20, 60, 20
  1027. player command "/killall all"
  1028. else:
  1029. if {@TPSR} is true:
  1030. send title from "{@C}TPS {@BC}» &cERROR!" and "{@C}Couldn't get the {@H}TPS/memory reading!" to all ops for 20, 60, 20
  1031. delete {Scatter.DontUnloadChunks}
  1032. delete {Scatter.Scattering::*}
  1033. delete {Scatter.Fix}
  1034. delete {Scatter.Cancel}
  1035. delete {Invis::*}
  1036. delete {Scatter.Scattering}
  1037. command "/invis off"
  1038.  
  1039. #--------------------------------------------------#
  1040. # Single Player Scatter #
  1041. #--------------------------------------------------#
  1042.  
  1043. else if ("%arg-3%" parsed as offlineplayer) is online:
  1044. loop {@Tries} times:
  1045. if (loop-number-2) is {@Tries}:
  1046. broadcast "{@P}{@C} Could not scatter {@H}%arg-3%!"
  1047. send "{@P}{@C} Try lowering the {@H}mindist!"
  1048. command "/scatterbroke"
  1049. stop trigger
  1050. set {_Location.Good} to true
  1051. set {_Location.Sky} to (the location at (random integer between ({_X}-arg-2) and ({_X}+arg-2)), 255, (random integer between ({_Z}-arg-2) and ({_Z}+arg-2)) of the world (arg-1))
  1052. if {_Location.Good} is true:
  1053. set {_Location.GroundLevel} to {_Location.Sky}
  1054. while (block at {_Location.GroundLevel}) is air:
  1055. if (y-coordinate of ({_Location.GroundLevel})) is less than 4:
  1056. delete {_Location.Good}
  1057. stop loop
  1058. set {_Location.GroundLevel} to (location 1 below ({_Location.GroundLevel}))
  1059. if {_Location.Good} is true:
  1060. if (block at {_Location.GroundLevel}) is lava, water or cactus:
  1061. delete {_Location.Good}
  1062. else:
  1063. set {_GoodLocation.Sky} to ({_Location.Sky})
  1064. set {_GoodLocation.GroundLevel} to (location 1 above {_Location.GroundLevel})
  1065. stop loop
  1066. set {Scattering::%arg-3%} to true
  1067. teleport ("%arg-3%" parsed as offlineplayer) to ({_GoodLocation.GroundLevel})
  1068. send title from "{@H}You {@C}were scattered!" and "{@BC}[{@H}1{@BC}/{@H}1{@BC}]" to ("%arg-3%" parsed as offlineplayer) for 20, 20, 20
  1069. send "{@P} {@BC}- {@H}%arg-3%{@C} Scattered." to all ops
  1070. wait 1 second
  1071. delete {Scatter.Scattering::%arg-3%}
  1072.  
  1073. #--------------------------------------------------#
  1074. # Invisible Command #
  1075. # Thank you Cam for making this! #
  1076. #--------------------------------------------------#
  1077.  
  1078. command /invis [<text=toggle>]:
  1079. permission: {@Permission}
  1080. trigger:
  1081. if arg-1 is "on" or "enable":
  1082. set {invis} to true
  1083. loop all players:
  1084. command "/van %loop-player%"
  1085. add loop-player to {Invis::*}
  1086. else if arg-1 is "off" or "disable":
  1087. delete {invis}
  1088. loop {Invis::*}:
  1089. command "/rea %loop-value%"
  1090. remove loop-value from {Invis::*}
  1091. else if arg-1 is "toggle":
  1092. if {invis} is set:
  1093. delete {invis}
  1094. loop {Invis::*}:
  1095. command "/rea %loop-value%"
  1096. remove loop-value from {Invis::*}
  1097. else:
  1098. set {invis} to true
  1099. loop all players:
  1100. command "/van %loop-player%"
  1101. add loop-player to {Invis::*}
  1102.  
  1103. #--------------------------------------------------#
  1104. # Scatter Sound Commands #
  1105. #--------------------------------------------------#
  1106.  
  1107. command /scattersound:
  1108. permission: {@Permission}
  1109. trigger:
  1110. {@Sounds} is true
  1111. loop all players:
  1112. command "/playsound {@ScatterSound} %loop-player% ~ ~ ~ 1 0.5 1"
  1113.  
  1114. command /scatterbroke:
  1115. permission: {@Permission}
  1116. trigger:
  1117. {@Sounds} is true
  1118. loop all players:
  1119. command "/playsound random.break %loop-player%"
  1120.  
  1121. #--------------------------------------------------#
  1122. # Cancel Scatter Command #
  1123. #--------------------------------------------------#
  1124.  
  1125. #command /cancelscatter:
  1126. # permission: {@Permission}
  1127. # aliases: /cancelsca, /csca, /scattercancel
  1128. # trigger:
  1129. # if {Scatter.Scattering} is set:
  1130. # set {Scatter.Cancel} to true
  1131. # delete {Scatter.DontUnloadChunks}
  1132. # delete {Scatter.Scattering::*}
  1133. # delete {Scatter.Fix}
  1134. # delete {Invis::*}
  1135. # broadcast "{@P}{@C} The scatter has been cancelled by {@H}%command sender%!"
  1136. # command "/scatterbroke"
  1137. # command "/invis off"
  1138. # send "{@P}{@C} The scatter will stop within a few {@H}seconds!"
  1139. # send "{@P}{@C} You may want to {@H}/tpall!"
  1140. # else:
  1141. # send "{@P}{@C} There is no {@H}scatter {@C}running!"
  1142. #--------------------------------------------------#
  1143. # Miscellaneous Things #
  1144. #--------------------------------------------------#
  1145.  
  1146. on join:
  1147. {invis} is true
  1148. command "/van %event-player%"
  1149. add event-player to {Invis::*}
  1150.  
  1151. on disconnect:
  1152. {Invis::%event-player%} is set
  1153. command "/rea %event-player%"
  1154.  
  1155. on skript load:
  1156. delete {Scatter.DontUnloadChunks}
  1157. delete {Scatter.Scattering::*}
  1158. delete {Scatter.Fix}
  1159. delete {Scatter.Cancel}
  1160. delete {Scatter.Scattering}
  1161. delete {Invis::*}
  1162. broadcast "{@P}{@C} Thanks for installing {@H}Nate's scatter version {@BC}[{@H}{@Version}{@BC}]!"
  1163. broadcast "{@P}{@C} If you have any questions, tweet at {@H}@NatePlaysUHC!"
  1164. broadcast "{@P}{@C} Want to see the {@H}scatter {@C}in action, follow {@H}@OblivionUHC {@C}on {@H}twitter!"
  1165.  
  1166. on login:
  1167. delete {Scatter.Scattering::%player%}
  1168. if {SchedueldScatter::%player%} is set:
  1169. teleport (player) to ({SchedueldScatter::%player%})
  1170. delete {SchedueldScatter::%player%}
  1171. send "{@P} {@BC}- {@H}%player% {@BC}- {@C}Late Scattered!" to all ops
  1172. if {invis} is true:
  1173. command "/van %event-player%"
  1174. add event-player to {Invis::*}
  1175.  
  1176. on chunk unload:
  1177. {Scatter.DontUnloadChunks} is true
  1178. cancel the event
  1179.  
  1180. on damage of a player:
  1181. {Scatter.Scattering::%victim%} is true
  1182. cancel the event
  1183.  
  1184. command /fix:
  1185. trigger:
  1186. if {Scatter.Fix} is set:
  1187. set {_CMDLocB} to location of the command sender
  1188. teleport the command sender to (location 1 above {_CMDLocB})
  1189. send "{@P}{@C} You are now out of the {@H}block!"
  1190. else:
  1191. send "{@P}{@C} This command is {@H}disabled!"
  1192.  
  1193. # Well you made it to the bottom
  1194. # Hope you enjoyed the code.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement