Advertisement
fleft17

Untitled

Dec 20th, 2014
296
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.67 KB | None | 0 0
  1. options:
  2.  
  3. # General
  4. P: [Moved-00]
  5. C: &f
  6. H: &9
  7.  
  8. # Setwalls
  9. WallBlocks: bedrock
  10.  
  11. # Scatter
  12. SP: [&7M00Scatter&f]
  13. ScatterWaitTicks: 1
  14. ChunkWaitTicks: 10
  15. MaxTries: 1001
  16.  
  17. command /m00 <text> [<integer>] [<world>]:
  18. permission: skript.M00
  19. trigger:
  20. if arg-1 is "set":
  21. if arg-2 is set:
  22. if arg-3 is set:
  23. delete {M00::*}
  24. set {_X} to a random integer between (0-((arg-2)*10)) and ((arg-2)*10)
  25. set {_Z} to a random integer between (0-((arg-2)*10)) and ((arg-2)*10)
  26. while difference between {_X} and 0 is less than (arg-2):
  27. set {_X} to a random integer between (0-((arg-2)*10)) and ((arg-2)*10)
  28. while difference between {_Z} and 0 is less than (arg-2):
  29. set {_Z} to a random integer between (0-((arg-2)*10)) and ((arg-2)*10)
  30.  
  31. set {_Coords} to location at ({_X}, 255, {_Z}) of the world (arg-3)
  32. while block at {_Coords} is air:
  33. set {_Coords} to location 1 below {_Coords}
  34. set {M00::Radius} to arg-2
  35. set {M00::World} to arg-3
  36. set {M00::Coords} to {_Coords}
  37. set {M00::X} to {_X}
  38. set {M00::Z} to {_Z}
  39. broadcast "{@P}{@C} Moved 0,0 coords generated!"
  40. broadcast "{@P}{@C} &aAuto-setting worldborder! (with console)"
  41. execute console command "/wb %arg-3% set %arg-2% %arg-2% %{_X}% %{_Z}%"
  42. broadcast "{@P}{@C} Now use /wb <world> fill <speed: optional>!"
  43. else:
  44. message "/m00 set <radius> <world>"
  45. else:
  46. message "/m00 set <radius> <world>"
  47. else if arg-1 is "clear" or "reset":
  48. delete {M00::*}
  49. broadcast "{@P}{@C} Moved 0,0 coords deleted!"
  50. else if arg-1 is "view":
  51. if {M00::Coords} is set:
  52. message "{@P}{@C} %{M00::Coords}% &9&l|&f Radius %{M00::Radius}% &9&l|&f World %{M00::World}%"
  53. else:
  54. message "{@P}{@C} No M00 coords not set! /m00 set <radius> <world>"
  55. else if arg-1 is "bc" or "broadcast" or "announce":
  56. if {M00::Coords} is set:
  57. broadcast "&4&lMeetup coords are: &f&l%{M00::Coords}%"
  58. else:
  59. message "{@P}{@C} No M00 coords not set! /m00 set <radius> <world>"
  60. command /m00walls:
  61. permission: skript.m00walls
  62. trigger:
  63. if {M00::*} is not set:
  64. broadcast "&4&lERROR:&c Moved 0,0 coords not set!"
  65. broadcast "&a/m00 set <radius> <world>"
  66. command "/playsound random.break %command sender%"
  67. stop trigger
  68. if command sender is player:
  69. set {_Timer} to now
  70. set {_BC} to now
  71. set {_X} to {M00::X}
  72. set {_Z} to {M00::Z}
  73. set {_World} to {M00::World}
  74. set {_Radius} to {M00::Radius}
  75. set {_Center} to {M00::Coords}
  76. broadcast "{@P}{@H} %command sender%:{@C} Setting walls with radius"
  77. broadcast "{@P}{@H} %{M00::Radius}%{@C} in world {@H}""%{_World}%""!"
  78. message "&4&lDO NOT MOVE!"
  79. wait 10 ticks
  80. teleport command sender to spawn point of {_World}
  81. teleport command sender to location at {_Center}
  82. wait 10 ticks
  83. loop 2 times:
  84. command sender command "//pos%loop-number%"
  85. wait 1 tick
  86. command sender command "//expand vert"
  87. command sender command "//expand %{_Radius}% N"
  88. command sender command "//expand %{_Radius}% S"
  89. command sender command "//expand %{_Radius}% E"
  90. command sender command "//expand %{_Radius}% W"
  91. broadcast "{@P}{@C} Setting walls! Expect lag!"
  92. command sender command "//walls bedrock"
  93.  
  94. else:
  95. broadcast "{@P}{@C} Console cannot use this command."
  96. stop trigger
  97. command /m00scatterall <integer>:
  98. description: Scatter command
  99. usage: /m00scatterall <mindist>
  100. permission: skript.m00scatter
  101. trigger:
  102. if {M00::*} is not set:
  103. broadcast "&4&lERROR:&c Moved 0,0 coords not set!"
  104. broadcast "&a/m00 set <radius> <world>"
  105. command "/playsound random.break %command sender%"
  106. stop trigger
  107. set {_X} to {M00::X}
  108. set {_Z} to {M00::Z}
  109. set {_Radius} to {M00::Radius}
  110. set {_World} to {M00::World}
  111. if (size of (all players)) is equal to 0:
  112. message "{@SP} Nobody online. Insert Sadface!"
  113. stop
  114. broadcast "{@SP} Attempt with radius &6%{M00::Radius}% &rand mindist. &6%arg-1%&r..."
  115. command "/aps note.harp"
  116. set {_Players::*} to all players
  117. set {_Size} to (size of {_Players::*})
  118. loop {_Size} times:
  119. loop {@MaxTries} times:
  120. if loop-number-2 is equal to {@MaxTries}:
  121. message "{@SP} Could not get position &7[&f%loop-number-1%&9/&f%{_Size}%&7]"
  122. command "/aps random.break"
  123. stop trigger
  124. set {_ThisLocation.Okay} to true
  125. set {_ThisLocation.Sky} to (the location at ((random integer between (({_X})-{_Radius}) and (({_X}-1))+0.5)+{_Radius}), 255, ((random integer between (({_Z})-{_Radius}) and (({_Z}-1))+0.5)+{_Radius}) of the world {_World})
  126. loop ((loop-number-1)-1) times:
  127. {_ThisLocation.Okay} is true
  128. distance between {_ThisLocation.Sky} and {_FinalLocation.Sky::%loop-number-3%} is less than (arg-1)
  129. delete {_ThisLocation.Okay}
  130. if {_ThisLocation.Okay} is true:
  131. set {_ThisLocation.Ground} to {_ThisLocation.Sky}
  132. while (block at {_ThisLocation.Ground}) is air:
  133. if y-coordinate of {_ThisLocation.Ground} is less than 4:
  134. delete {_ThisLocation.Okay}
  135. stop loop
  136. set {_ThisLocation.Ground} to location 1 below {_ThisLocation.Ground}
  137. if {_ThisLocation.Okay} is true:
  138. if (block at {_ThisLocation.Ground}) is lava, water or cactus:
  139. delete {_ThisLocation.Okay}
  140. if {_ThisLocation.Okay} is true:
  141. set {_FinalLocation.Sky::%loop-number-1%} to {_ThisLocation.Sky}
  142. set {_FinalLocation.Ground::%loop-number-1%} to (location 1 above {_ThisLocation.Ground})
  143. stop loop
  144. set {Scatter.DisableChunkUnloading} to true
  145. set {_ApproxTime} to {_Size}*{@ChunkWaitTicks}/20
  146. broadcast "{@SP} Operation will take approx. &4%{_ApproxTime}% seconds&r!"
  147. command "/aps fireworks.launch"
  148. loop {_Size} times:
  149. if command sender is not online:
  150. broadcast "{@SP} Operation failed, chunkloading player logged out."
  151. command "/aps random.break"
  152. stop trigger
  153. teleport (command sender) to {_FinalLocation.Ground::%loop-number%}
  154. message "{@SP} Loading Chunkset &7[&f%loop-number%&9/&f%{_Size}%&7]" to command sender
  155. wait {@ChunkWaitTicks} ticks
  156. broadcast "{@SP} &4All locations loaded."
  157. command "/aps random.explode"
  158. wait 40 ticks
  159. set {_Count} to 0
  160. loop {_Players::*}:
  161. increase {_Count} by 1
  162. if (loop-value) is not online:
  163. broadcast "{@SP} &cNot online: &7[&f%{_Count}%&9/&f%{_Size}%&7]&4 : &6%loop-value% &r- scheduling."
  164. set {ScatterScheduler::%loop-value%} to {_FinalLocation.Ground::%{_Count}%}
  165. else:
  166. teleport (loop-value) to {_FinalLocation.Ground::%{_Count}%}
  167. broadcast "{@SP} &7[&f%{_Count}%&9/&f%{_Size}%&7]&4 : &6%loop-value%"
  168. command "/aps note.bass"
  169. wait {@ScatterWaitTicks} tick
  170. broadcast "{@SP} &aAll players scattered."
  171. command "/aps mob.cow.say"
  172. delete {Scatter.DisableChunkUnloading}
  173. command /m00scatterteams <integer>:
  174. usage: /scatterteams <mindist>
  175. permission: skript.m00scatterteams
  176. trigger:
  177. if {M00::*} is not set:
  178. broadcast "&4&lERROR:&c Moved 0,0 coords not set!"
  179. broadcast "&a/m00 set <radius> <world>"
  180. command "/playsound random.break %command sender%"
  181. stop trigger
  182. set {_X} to {M00::X}
  183. set {_Z} to {M00::Z}
  184. set {_World} to {M00::World}
  185. set {_Count} to 0
  186. loop {Teams::*}:
  187. {Team.%loop-value%::*} is set
  188. increase {_Count} by 1
  189. add {_Count} to {_Scatter.Teams::*}
  190. set {_Scatter.Team.%{_Count}%::*} to {Team.%loop-value%::*}
  191.  
  192. loop all players:
  193. {Teams.InTeam::%loop-player%} is not set
  194. add (name of loop-player) to {_Solos::*}
  195.  
  196. broadcast "{@SP} Attempt with radius &6%{Moo::Radius}% &rand mindist. &6%arg-1%&r..."
  197. command "/aps note.harp"
  198. set {_Size} to ((size of {_Scatter.Teams::*})+(size of {_Solos::*}))
  199.  
  200. # this is copied from the above scatter
  201. loop {_Size} times:
  202. loop {@MaxTries} times:
  203. if loop-number-2 is equal to {@MaxTries}:
  204. message "{@SP} Could not get position &7[&f%loop-number-1%&9/&f%{_Size}%&7]"
  205. command "/aps random.break"
  206. stop trigger
  207. set {_ThisLocation.Okay} to true
  208. set {_ThisLocation.Sky} to (the location at ((random integer between (0-{_X}) and ({_X}-1))+0.5), 255, ((random integer between (0-{_Z}) and ({_Z}-1))+0.5) of the world {_World})
  209. loop ((loop-number-1)-1) times:
  210. {_ThisLocation.Okay} is true
  211. distance between {_ThisLocation.Sky} and {_FinalLocation.Sky::%loop-number-3%} is less than (arg-1)
  212. delete {_ThisLocation.Okay}
  213. if {_ThisLocation.Okay} is true:
  214. set {_ThisLocation.Ground} to {_ThisLocation.Sky}
  215. while (block at {_ThisLocation.Ground}) is air:
  216. if y-coordinate of {_ThisLocation.Ground} is less than 4:
  217. delete {_ThisLocation.Okay}
  218. stop loop
  219. set {_ThisLocation.Ground} to location 1 below {_ThisLocation.Ground}
  220. if {_ThisLocation.Okay} is true:
  221. if (block at {_ThisLocation.Ground}) is lava, water or cactus:
  222. delete {_ThisLocation.Okay}
  223. if {_ThisLocation.Okay} is true:
  224. set {_FinalLocation.Sky::%loop-number-1%} to {_ThisLocation.Sky}
  225. set {_FinalLocation.Ground::%loop-number-1%} to (location 1 above {_ThisLocation.Ground})
  226. stop loop
  227. set {Scatter.DisableChunkUnloading} to true
  228. set {_ApproxTime} to {_Size}*{@ChunkWaitTicks}/20
  229. broadcast "{@SP} Positions found, pre-loading chunksets&r!"
  230. broadcast "{@SP} Operation will take approx. &4%{_ApproxTime}% seconds&r!"
  231. command "/aps fireworks.launch"
  232. loop {_Size} times:
  233. if command sender is not online:
  234. broadcast "{@SP} Operation failed, chunkloading player logged out."
  235. command "/aps random.break"
  236. stop trigger
  237. teleport (command sender) to {_FinalLocation.Ground::%loop-number%}
  238. message "{@SP} Loading Chunkset &7[&f%loop-number%&9/&f%{_Size}%&7]" to command sender
  239. wait {@ChunkWaitTicks} ticks
  240. broadcast "{@SP} &4All locations loaded."
  241. command "/aps random.explode"
  242. wait 40 ticks
  243. set {_TeamSize} to (size of {_Scatter.Teams::*})
  244. set {_SoloSize} to (size of {_Solos::*})
  245. set {_PositionCount} to 0
  246. set {_TeamCount} to 0
  247. set {_SoloCount} to 0
  248. loop {_Scatter.Teams::*}:
  249. increase {_PositionCount} by 1
  250. increase {_TeamCount} by 1
  251. broadcast "{@SP} &rScattering &4Team %{_TeamCount}%&r:"
  252. loop {_Scatter.Team.%loop-value%::*}:
  253. set {_Player} to ("%loop-value-2%" parsed as offlineplayer)
  254. if {_Player} is not online:
  255. broadcast "{@SP} &b- &6&l%{_Player}%&r: §4Not online &b- §rscheduling."
  256. set {ScatterScheduler::%{_Player}%} to {_FinalLocation.Ground::%{_PositionCount}%}
  257. else:
  258. teleport {_Player} to {_FinalLocation.Ground::%{_PositionCount}%}
  259. broadcast "{@SP} &b- &6&l%{_Player}%&r: §aScattered!"
  260. command "/aps note.bass"
  261. wait {@ScatterWaitTicks} ticks
  262. broadcast "{@SP} &rScattering &5Solos&r!"
  263. loop {_Solos::*}:
  264. increase {_PositionCount} by 1
  265. increase {_SoloCount} by 1
  266. set {_Player} to ("%loop-value%" parsed as offlineplayer)
  267. if {_Player} is not online:
  268. broadcast "{@SP} &b- &6&l%{_Player}%&r: §4Not online &b- §rscheduling."
  269. set {ScatterScheduler::%{_Player}%} to {_FinalLocation.Ground::%{_PositionCount}%}
  270. else:
  271. teleport {_Player} to {_FinalLocation.Ground::%{_PositionCount}%}
  272. broadcast "{@SP} &b- &6&l%{_Player}%&r: §aScattered!"
  273. command "/aps note.bass"
  274. wait {@ScatterWaitTicks} ticks
  275.  
  276. broadcast "{@SP} &aAll players scattered."
  277. command "/aps mob.cow.say"
  278. delete {Scatter.DisableChunkUnloading}
  279. on chunk unload:
  280. {Scatter.DisableChunkUnloading} is true
  281. cancel the event
  282. on skript start:
  283. delete {Scatter.DisableChunkUnloading}
  284. on join:
  285. {ScatterScheduler::%player%} is set
  286. teleport player to {ScatterScheduler::%player%}
  287. delete {ScatterScheduler::%player%}
  288. broadcast "{@SP} &aScheduled late-scatter of %player%."
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement