Guest User

Untitled

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