MinecrafNinja

Teams Skript

Apr 25th, 2016
182
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 21.84 KB | None | 0 0
  1. options:
  2. P: &8[&bTeams&8]
  3. C: &r
  4. H: &c
  5. NoPerms: &8[&bTeams&8]&4 You do not have the permission!
  6.  
  7. function colorTeams(text: text):
  8. if {Teams::*} is not set:
  9. stop trigger
  10. else:
  11. set {_choices::*} to "aqua", "black", "blue", "bold", "dark_aqua", "dark_blue", "dark_gray", "dark_green", "dark_purple", "dark_red", "gold", "gray", "green", "italic", "light_purple", "red", "underline", and "yellow"
  12. set {_choices2::*} to "aqua", "black", "blue", "dark_aqua", "dark_blue", "dark_gray", "dark_green", "dark_purple", "dark_red", "gold", "gray", "green", "italic", "light_purple", "red", "underline" and "yellow"
  13. set {_choices3::*} to "aqua", "black", "blue", "dark_aqua", "dark_blue", "dark_gray", "dark_green", "dark_purple", "dark_red", "gold", "gray", "green", "light_purple", "red", "underline" and "yellow"
  14. set {_choices4::*} to "aqua", "black", "blue", "dark_aqua", "dark_blue", "dark_gray", "dark_green", "dark_purple", "dark_red", "gold", "gray", "green", "light_purple", "red" and "yellow"
  15. set {_choices5::*} to "aqua", "black", "blue", "dark_aqua", "dark_blue", "dark_gray", "dark_green", "dark_purple", "dark_red", "gold", "gray", "green", "light_purple", "red" and "yellow"
  16. set {_choices6::*} to "aqua", "black", "blue", "dark_aqua", "dark_blue", "dark_gray", "dark_green", "dark_purple", "dark_red", "gold", "gray", "green", "light_purple", "red" and "yellow"
  17. set {_choices7::*} to "aqua", "black", "blue", "dark_aqua", "dark_blue", "dark_gray", "dark_green", "dark_purple", "dark_red", "gold", "gray", "green", "light_purple", "red" and "yellow"
  18. loop {Teams::*}:
  19. if loop-value is less than or equal to 18:
  20. set {_C} to (random element out of {_choices::*})
  21. remove {_C} from {_choices::*}
  22. command "/scoreboard teams option UHC%loop-value% color %{_C}%"
  23. replace all "_" with " " in {_C}
  24. loop {Team.%loop-value%::*}:
  25. {_text} is not "silent"
  26. send "{@P}{@C} Your team's color is <%{_C}%>%{_C}%!" to ("%loop-value-2%" parsed as offlineplayer)
  27. else if loop-value is between 18 and 36:
  28. set {_C} to (random element out of {_choices2::*})
  29. remove {_C} from {_choices2::*}
  30. command "/scoreboard teams option UHC%loop-value% color %{_C}%"
  31. command "/bold UHC%loop-value%"
  32. replace all "_" with " " in {_C}
  33. loop {Team.%loop-value%::*}:
  34. {_text} is not "silent"
  35. send "{@P}{@C} Your team's color is <bold><%{_C}%> Bold %{_C}%!" to ("%loop-value-2%" parsed as offlineplayer)
  36. else if loop-value is between 36 and 53:
  37. set {_C} to (random element out of {_choices3::*})
  38. remove {_C} from {_choices3::*}
  39. command "/scoreboard teams option UHC%loop-value% color %{_C}%"
  40. command "/italic UHC%loop-value%"
  41. replace all "_" with " " in {_C}
  42. loop {Team.%loop-value%::*}:
  43. {_text} is not "silent"
  44. send "{@P}{@C} Your team's color is <italic><%{_C}%> Italic %{_C}%!" to ("%loop-value-2%" parsed as offlineplayer)
  45. else if loop-value is between 53 and 69:
  46. set {_C} to (random element out of {_choices4::*})
  47. remove {_C} from {_choices4::*}
  48. command "/scoreboard teams option UHC%loop-value% color %{_C}%"
  49. command "/underline UHC%loop-value%"
  50. replace all "_" with " " in {_C}
  51. loop {Team.%loop-value%::*}:
  52. {_text} is not "silent"
  53. send "{@P}{@C} Your team's color is <underline><%{_C}%> Underline %{_C}%!" to ("%loop-value-2%" parsed as offlineplayer)
  54. else if loop-value is between 69 and 85:
  55. set {_C} to (random element out of {_choices5::*})
  56. remove {_C} from {_choices5::*}
  57. command "/scoreboard teams option UHC%loop-value% color %{_C}%"
  58. command "/bold UHC%loop-value%"
  59. command "/italic UHC%loop-value%"
  60. replace all "_" with " " in {_C}
  61. loop {Team.%loop-value%::*}:
  62. {_text} is not "silent"
  63. send "{@P}{@C} Your team's color is <bold><italic><%{_C}%> Bold Italic %{_C}%!" to ("%loop-value-2%" parsed as offlineplayer)
  64. else if loop-value is between 85 and 101:
  65. set {_C} to (random element out of {_choices6::*})
  66. remove {_C} from {_choices6::*}
  67. command "/scoreboard teams option UHC%loop-value% color %{_C}%"
  68. command "/underline UHC%loop-value%"
  69. command "/italic UHC%loop-value%"
  70. replace all "_" with " " in {_C}
  71. loop {Team.%loop-value%::*}:
  72. {_text} is not "silent"
  73. send "{@P}{@C} Your team's color is <underline><italic><%{_C}%> Underline Italic %{_C}%!" to ("%loop-value-2%" parsed as offlineplayer)
  74. else if loop-value is between 101 and 117:
  75. set {_C} to (random element out of {_choices7::*})
  76. remove {_C} from {_choices7::*}
  77. command "/scoreboard teams option UHC%loop-value% color %{_C}%"
  78. command "/bold UHC%loop-value%"
  79. command "/underline UHC%loop-value%"
  80. replace all "_" with " " in {_C}
  81. loop {Team.%loop-value%::*}:
  82. {_text} is not "silent"
  83. send "{@P}{@C} Your team's color is <underline><bold><%{_C}%> Bold Underline %{_C}%!" to ("%loop-value-2%" parsed as offlineplayer)
  84.  
  85. function createTeam(n: number):
  86. set {Teams::%{_n}%} to {_n}
  87. command "/scoreboard teams add UHC%{_n}%"
  88. colorTeams("silent")
  89.  
  90. function deleteTeam(n: number):
  91. delete {Teams::%{_n}%}
  92. loop {Team.%{_n}%::*}:
  93. send "{@P}{@C} Your team was {@H}deleted" to ("%loop-value%" parsed as offlineplayer)
  94. delete {Teams.InTeam::%loop-value%}
  95. delete {Team.%{_n}%::*}
  96. command "/scoreboard teams remove UHC%{_n}%"
  97.  
  98. function leaveTeam(p: player):
  99. set {_n} to ({Teams.InTeam::%{_p}%})
  100. delete {Teams.InTeam::%{_p}%}
  101. remove {_p} from {Team.%{_n}%::*}
  102. command "/scoreboard teams leave %{_p}%"
  103.  
  104. function joinTeam(p: player, n: number):
  105. set {Teams.InTeam::%{_p}%} to {_n}
  106. add {_p} to {Team.%{_n}%::*}
  107. command "/scoreboard teams join UHC%{_n}% %{_p}%"
  108.  
  109. command /team [<text>] [<text>] [<text>]:
  110. aliases: /teams
  111. trigger:
  112. if arg-1 is not set:
  113. command sender command "/team help"
  114. else if arg-1 is "help":
  115. send "&f {@H}Team Help Page&f "
  116. if {Teams.Management} is not set:
  117. send "{@P}{@C} Warning: Team Management is currently {@H}DISABLED{@C}, therefore these commands will not work."
  118. send "{@P}{@H} /team list&f - {@C}Lists teams"
  119. send "{@P}{@H} /team create&f - {@C}Create a team to invite players!"
  120. send "{@P}{@H} /team invite <player>&f - {@C}Invite <player> to your team!"
  121. send "{@P}{@H} /team accept <player>&f - {@C}Accept <player>'s invite!"
  122. send "{@P}{@H} /team leave&f - {@C}Leave your current team"
  123. send "{@P}{@H} /pmcoords&f - {@C}Send your teammates your coordinates!"
  124. send "{@P}{@H} /pm <text:coords>&f - {@C}Chat with your teammates!"
  125. if command sender has permission "teams.help":
  126. send "{@P}{@H} /team management <on/off/toggle>"
  127. send "{@P}{@H} /team reset"
  128. send "{@P}{@H} /team color"
  129. send "{@P}{@H} /team fire <on/off>"
  130. send "{@P}{@H} /team join <id/player in team> [<player=you>]"
  131. send "{@P}{@H} /team makeleave [<player=you>]"
  132. send "{@P}{@H} /team random <size> <amt>"
  133. send "{@P}{@H} /team uncolor"
  134. send "{@P}{@H} /team limit <number>"
  135. send "{@P}{@H} /team solos&f - {@C}Tells you who is not on a team"
  136. send "{@P}{@H} /ct <player names between 1 and infinite>&f - {@C}Creates teams with the listed players"
  137. else if arg-1 is "list":
  138. if {Teams::*} is not set:
  139. send "{@P}{@C} No teams set."
  140. else:
  141. loop {Teams::*}:
  142. if size of {Team.%loop-value%::*} is not 0:
  143. send "{@P}{@C} Team {@H}%loop-value%{@C}: %{Team.%loop-value%::*}%"
  144. else:
  145. add 1 to {_0}
  146. if {_0} is size of {Teams::*}:
  147. send "{@P}{@C} No teams set."
  148. else if arg-1 is "invite":
  149. if {Teams.Management} is not set:
  150. send "{@P}{@C} Team Management is currently disabled!"
  151. else:
  152. if arg-2 is not set:
  153. send "{@P}{@C} Please specify a player!"
  154. else if {Teams.InTeam::%command sender%} is not set:
  155. send "{@P}{@C} You don't have a team to invite {@H}%arg-2%{@C} to!"
  156. else if {Teams.Limit} is not set:
  157. send "{@P}{@C} Tell the host to set a team size limit!"
  158. else if size of {Team.%{Teams.InTeam::%command sender%}%::*} is greater than or equal to {Teams.Limit}:
  159. send "{@P}{@C} Your team is too big!"
  160. else:
  161. set {Teams.Invite::%arg-2%::%command sender%} to true
  162. send "{@P}{@C} You have invited {@H}%arg-2%{@C} to your team!"
  163. send "{@P}{@H} %command sender%{@C} invited you to their team! Do /team accept %command sender%!" to ("%arg-2%" parsed as offlineplayer)
  164. else if arg-1 is "accept":
  165. if {Teams.Management} is not set:
  166. send "{@P}{@C} Team Management is currently disabled!"
  167. else:
  168. if arg-2 is not set:
  169. send "{@P}{@C} Please specify a player!"
  170. else if {Teams.Invite::%command sender%::%arg-2%} is not set:
  171. send "{@P}{@C} You don't have a team invite from {@H}%arg-2%!"
  172. else if {Teams.InTeam::%command sender%} is set:
  173. send "{@P}{@C} You are already on a team!"
  174. delete {Teams.Invite::%arg-2%::%command sender%}
  175. else if {Teams.InTeam::%arg-2%} is not set:
  176. send "{@P}{@C}{@H} %arg-2%{@C} does not have a team!"
  177. delete {Teams.Invite::%arg-2%::%command sender%}
  178. else if {Teams.Limit} is not set:
  179. send "{@P}{@C} Tell the host to set a team size limit!"
  180. else if size of {Team.%{Teams.InTeam::%arg-2%}%::*} is greater than or equal to {Teams.Limit}:
  181. send "{@P}{@C}{@H} %arg-2%'s{@C} team is too big!"
  182. delete {Teams.Invite::%arg-2%::%command sender%}
  183. else:
  184. set {_TM} to {Teams.InTeam::%arg-2%}
  185. delete {Teams.Invite::%arg-2%::%command sender%}
  186. send "{@P}{@C} You have joined {@H}%arg-2%'s{@C} team!"
  187. loop {Team.%{_TM}%::*}:
  188. send "{@P}{@H} %command sender%{@C} joined your team!" to ("%loop-value%" parsed as offlineplayer)
  189. joinTeam(command sender, {_TM})
  190. else if arg-1 is "leave":
  191. if arg-2 is set:
  192. if command sender has permission "teams.mleave":
  193. command sender command "/team mleave %arg-2%"
  194. stop trigger
  195. else:
  196. if {Teams.Management} is not set:
  197. send "{@P}{@C} Team Management is currently disabled!"
  198. stop trigger
  199. else:
  200. send "{@P}{@C} Wrong syntax!"
  201. stop trigger
  202. if {Teams.Management} is not set:
  203. send "{@P}{@C} Team Management is currently disabled!"
  204. else:
  205. if {Teams.InTeam::%command sender%} is not set:
  206. send "{@P}{@C} Your not in a team!"
  207. else:
  208. send "{@P}{@C} You have left team {@H}UHC%{Teams.InTeam::%command sender%}%"
  209. set {_Team} to ({Teams.InTeam::%command sender%})
  210. leaveTeam(command sender)
  211. loop {Team.%{Teams.InTeam::%command sender%}%::*}:
  212. loop-value is not command sender
  213. send "{@P}{@C}{@H} %command sender%{@C} left your team." to ("%loop-value%" parsed as offlineplayer)
  214. if size of {Team.%{_Team}%::*} is 1:
  215. deleteTeam({_Team})
  216. else if arg-1 is "create":
  217. if {Teams.Management} is not set:
  218. send "{@P}{@C} Team Management is currently disabled!"
  219. else:
  220. if {Teams.InTeam::%command sender%} is set:
  221. command sender does not have permission "teams.create"
  222. send "{@P}{@C} Your in a team already!"
  223. stop trigger
  224. set {_TM} to 1
  225. while {Teams::%{_TM}%} is set:
  226. add 1 to {_TM}
  227. createTeam({_TM})
  228. joinTeam(command sender, {_TM})
  229. send "{@P}{@C} You created team {@H}UHC%{_TM}%"
  230. else if arg-1 is "reset":
  231. if command sender does not have the permission "teams.reset":
  232. send "{@NoPerms}"
  233. else:
  234. broadcast "{@P}{@C} Teams reset by {@H}%command sender%"
  235. loop (size of {Teams::*}) times:
  236. delete {Team.%loop-number%::*}
  237. command "/scoreboard teams remove UHC%loop-number%"
  238. delete {Teams::*}
  239. delete {Teams.InTeam::*}
  240. delete {Teams.Limit}
  241. delete {Teams.Invite::*}
  242. delete {Teams.Management}
  243. else if arg-1 is "solos" or "solo":
  244. if command sender does not have the permission "teams.solos":
  245. send "{@NoPerms}"
  246. else:
  247. loop all players:
  248. {spec::%loop-player%} is not set
  249. if {Teams.InTeam::%loop-player%} is not set:
  250. set {_solos::%loop-player%} to loop-player
  251. if size of {_solos::*} is more than 1:
  252. send "{@P}{@C} Solos: {@H}%{_solos::*}%"
  253. else:
  254. send "{@P}{@C} There are {@H}no{@C} solos!"
  255. else if arg-1 is "fire":
  256. if command sender does not have the permission "teams.fire":
  257. send "{@NoPerms}"
  258. else:
  259. if arg-2 is not set:
  260. send "{@P}{@C} Specify to turn friendly fire on or off."
  261. else:
  262. if arg-2 is "on":
  263. loop {Teams::*}:
  264. command "/scoreboard teams option UHC%loop-value% friendlyfire true"
  265. broadcast "{@P}{@C}{@H} %command sender%{@C} enabled friendly fire!"
  266. else if arg-2 is "off":
  267. loop {Teams::*}:
  268. command "/scoreboard teams option UHC%loop-value% friendlyfire false"
  269. broadcast "{@P}{@C}{@H} %command sender%{@C} disabled friendly fire!"
  270. else if arg-1 is "random":
  271. if command sender does not have the permission "teams.random":
  272. send "{@NoPerms}"
  273. else if arg-2 is not set:
  274. send "{@P}{@C} Specify a team size!"
  275. else if arg-3 is not set:
  276. send "{@P}{@C} Specify a team amount!"
  277. else:
  278. set {_Size} to ("%arg-2%" parsed as integer)
  279. set {_Amt} to ("%arg-3%" parsed as integer)
  280. if {_Size} is not set:
  281. send "{@P}{@C} Enter a valid team size!"
  282. else if {_Amt} is not set:
  283. send "{@P}{@C} Enter a valid team amount!"
  284. else if {_Size} is less than 1:
  285. send "{@P}{@C} Enter a valid team size!"
  286. else if {_Amt} is less than 1:
  287. send "{@P}{@C} Enter a valid team amount!"
  288. else:
  289. loop all players:
  290. {Teams.InTeam::%loop-player%} is not set
  291. {spec::%loop-player%} is not set
  292. add loop-player to {_RT::*}
  293. if ({_Size}*{_Amt}) is not (size of {_RT::*}):
  294. send "{@P}{@C} The amount of players and teams does not match! %{_Size}*{_Amt}% isn't %size of {_RT::*}%!"
  295. else:
  296. set {_TM} to 1
  297. while {Teams::%{_TM}%} is set:
  298. add 1 to {_TM}
  299. set {_TM} to ({_TM} - 1)
  300. broadcast "{@P}{@C} Randomizing {@H}%arg-3%{@C} teams of {@H}%arg-2%{@C}..."
  301. command "/psa note.snare"
  302. wait 10 ticks
  303. loop ({_Amt}) times:
  304. set {_ttm} to ({_TM}+(loop-number))
  305. createTeam({_ttm})
  306. loop {_Size} times:
  307. set {_P} to a random element out of {_RT::*}
  308. remove {_P} from {_RT::*}
  309. joinTeam({_P}, {_ttm})
  310. broadcast "{@P}{@C} Teams Randomized! Use the teamspeak server {@H}uhc.gg"
  311. loop {Teams::*}:
  312. loop-value is greater than {_TM}
  313. loop {Team.%loop-value%::*}:
  314. send "{@P}{@C} Your team:{@H} %{Team.%loop-value-1%::*}%" to ("%loop-value-2%" parsed as offlineplayer)
  315. else if arg-1 is "uncolor":
  316. if command sender does not have the permission "teams.uncolor":
  317. send "{@NoPerms}"
  318. else:
  319. if {Teams::*} is not set:
  320. send "{@P}{@C} No teams are set!"
  321. else:
  322. loop {Teams::*}:
  323. command "/scoreboard teams option UHC%loop-value% color reset"
  324. broadcast "{@P}{@C}{@H} %command sender%{@C} uncolored all teams!"
  325. else if arg-1 is "management" or "man" or "manage":
  326. if command sender does not have the permission "teams.manage":
  327. send "{@NoPerms}"
  328. else:
  329. if arg-2 is not set:
  330. send "{@P}{@C} Specify to toggle team management, turn it on, or off."
  331. else:
  332. if arg-2 is "on":
  333. set {Teams.Management} to true
  334. broadcast "{@P}{@C}{@H} %command sender%{@C} enabled team management!"
  335. else if arg-2 is "off":
  336. delete {Teams.Management}
  337. delete {Teams.Invite::*}
  338. broadcast "{@P}{@C}{@H} %command sender%{@C} disabled team management!"
  339. else if arg-2 is "toggle":
  340. if {Teams.Management} is not set:
  341. command sender command "/team man on"
  342. else:
  343. command sender command "/team man off"
  344. else if arg-1 is "limit" or "lim":
  345. if command sender does not have the permission "teams.limit":
  346. send "{@NoPerms}"
  347. else:
  348. if arg-2 is not set:
  349. send "{@P}{@C} Specify an amount of players per team!"
  350. else:
  351. set {_L} to ("%arg-2%" parsed as integer)
  352. if {_L} is not set:
  353. send "{@P}{@C} Enter a valid amount of players per team!"
  354. else if {_L} is less than 1:
  355. send "{@P}{@C} Enter a valid amount of players per team!"
  356. else:
  357. broadcast "{@P}{@C}{@H} %command sender%{@C} set the team size limit to %{_L}%"
  358. set {Teams.Limit} to {_L}
  359. else if arg-1 is "makeleave" or "forceleave" or "mleave" or "fleave":
  360. if command sender does not have the permission "teams.mleave":
  361. send "{@NoPerms}"
  362. else:
  363. if arg-2 is set:
  364. set {_P} to ("%arg-2%" parsed as offlineplayer)
  365. else:
  366. set {_P} to command sender
  367. if {Teams.InTeam::%{_P}%} is not set:
  368. send "{@P}{@C} Specify a player on a team!"
  369. else:
  370. if {Teams.InTeam::%{_P}%} is not set:
  371. send "{@P}{@C}{@H} %{_P}%{@C} is not in a team!"
  372. else:
  373. send "{@P}{@C} You removed %{_P}% from team {@H}UHC%{Teams.InTeam::%{_P}%}%"
  374. send "{@P}{@C}{@H} %command sender%{@C} removed you from team {@H}UHC%{Teams.InTeam::%{_P}%}%" to {_P}
  375. set {_Team} to ({Teams.InTeam::%{_P}%})
  376. leaveTeam({_P})
  377. loop {Team.%{_Team}%::*}:
  378. loop-value is not {_P}
  379. send "{@P}{@C}{@H} %{_P}%{@C} was removed your team." to ("%loop-value%" parsed as offlineplayer)
  380. if size of {Team.%{_Team}%::*} is 0:
  381. deleteTeam({_Team})
  382. delete {Teams.InTeam::%{_P}%}
  383. delete {_Team}
  384. else if arg-1 is "join":
  385. if command sender does not have the permission "teams.join":
  386. send "{@NoPerms}"
  387. else:
  388. if arg-2 is not set:
  389. send "{@P}{@C} Specify a team/player that is on that team"
  390. else:
  391. set {_te} to ("%arg-2%" parsed as offlineplayer)
  392. set {_Test1} to ("%arg-2%" parsed as integer)
  393. if {_Test1} is set:
  394. set {_TN} to ("%arg-2%" parsed as integer)
  395. else if {Teams.InTeam::%{_te}%} is set:
  396. set {_TN} to {Teams.InTeam::%{_te}%}
  397. else:
  398. send "{@P}{@C} Specify a valid team/player that is on that team"
  399. stop trigger
  400. if arg-3 is set:
  401. set {_P} to ("%arg-3%" parsed as offlineplayer)
  402. else:
  403. set {_P} to command sender
  404. if {Teams.InTeam::%{_P}%} is set:
  405. send "{@P}{@C}{@H} %{_P}%{@C} is already a team!"
  406. stop trigger
  407. joinTeam({_P}, {_TN})
  408. if {_P} is not command sender:
  409. send "{@P}{@C}{@H} %command sender% added you to team {@H}UHC%{_TN}%" to {_P}
  410. send "{@P}{@C} Added {@H}%{_P}%{@C} to team {@H}UHC%{_TN}%"
  411. loop {Team.%{Teams.InTeam::%{_P}%}%::*}:
  412. loop-value is not {_P}
  413. send "{@P}{@C}{@H} %{_P}%{@C} was added your team by {@H}%command sender%{@C}." to ("%loop-value%" parsed as offlineplayer)
  414. else if arg-1 is "color":
  415. if command sender does not have the permission "teams.color":
  416. send "{@NoPerms}"
  417. else:
  418. colorTeams("hi")
  419. if {Teams::*} is not set:
  420. send "{@P}{@C} No teams are set!"
  421. else:
  422. broadcast "{@P}{@C}{@H} %command sender%{@C} colored all teams!"
  423. else:
  424. command sender command "/team help"
  425.  
  426. command /ct <text>:
  427. permission: teams.ct
  428. usage: /ct <players>
  429. trigger:
  430. set {_ToCreate::*} to ((arg-1) split at " ")
  431.  
  432. loop {_ToCreate::*}:
  433. if {Teams.InTeam::%loop-value%} is set:
  434. add loop-value to {_OT::*}
  435.  
  436. if size of {_OT::*} is greater than or equal to 1:
  437. send "{@P}{@C} The following players already on a team: (cant create one)"
  438. send "{@P}{@C}{@H} %join {_OT::*} with "", ""%"
  439.  
  440. else:
  441.  
  442. set {_TM} to 1
  443. while {Teams::%{_TM}%} is set:
  444. add 1 to {_TM}
  445. createTeam({_TM})
  446.  
  447. loop {_ToCreate::*}:
  448. broadcast "%loop-value%, %loop-index%, %{_TM}%"
  449. set {_P} to ("%loop-value%" parsed as offlineplayer)
  450. joinTeam({_P}, {_TM})
  451. if {_P} is offline:
  452. command "/whitelist add %{_P}%"
  453. add "&c%{_P}%" to {_S::*}
  454. else:
  455. add "&a%{_P}%" to {_S::*}
  456.  
  457. loop {_ToCreate::*}:
  458. set {_P} to ("%loop-value%" parsed as offlineplayer)
  459. if {_P} is online:
  460. command "/ps random.pop %{_P}%"
  461. send "{@P}{@C}{@H} %command sender%{@C} put you on a team with:" to {_P}
  462. send "{@P}{@C} %{_S::*}%" to {_P}
  463. send "{@P}{@C} Names in &cred{@C} were offline, but are whitelisted (if not already)" to {_P}
  464. send "{@P}{@C} Mistake? Use ""&4/helpop WRONG TEAM!{@C}""" to {_P}
  465.  
  466. loop all players:
  467. loop-player has permission "teams.notify"
  468. {_ToCreate::*} does not contain "%loop-player%"
  469. send "{@P}{@C}{@H} %command sender%{@C}: created team with: %{_S::*}%" to loop-player
  470.  
  471. command /pmcoords:
  472. trigger:
  473. if {Teams.InTeam::%command sender%} is not set:
  474. send "{@P}{@C} You are not in a team!"
  475. stop trigger
  476. loop all players:
  477. ({Teams.InTeam::%loop-player%}) is ({Teams.InTeam::%command sender%})
  478. send "{@P}{@C}{@H} %command sender%'s{@C} coordinates: {@C}x: {@H}%round(command sender's x-coordinate)%{@C}, {@C}y: {@H}%round(command sender's y-coordinate)%{@C}, {@C}z: {@H}%round(command sender's z-coordinate)%" to loop-player
  479.  
  480. command /pmores:
  481. trigger:
  482. if {Teams.InTeam::%command sender%} is not set:
  483. send "{@P}{@C} You are not in a team!"
  484. stop trigger
  485. loop all players:
  486. ({Teams.InTeam::%loop-player%}) is ({Teams.InTeam::%command sender%})
  487. send "{@P}{@C}{@H} %command sender%'s{@C} has &3%amount of iron ore in command sender's inventory + amount of iron ingots in command sender's inventory% iron{@C}, <gold>%amount of gold ore in command sender's inventory + amount of gold ingots in command sender's inventory% gold{@C}, and &b%amount of diamond ore in command sender's inventory + amount of diamonds in command sender's inventory% diamonds{@C}." to loop-player
  488.  
  489.  
  490. command /pm <text>:
  491. trigger:
  492. if {Teams.InTeam::%command sender%} is not set:
  493. send "{@P}{@C} You are not in a team!"
  494. else if arg-1 is "coords" or "coordinates":
  495. command sender command "/pmcoords"
  496. else if arg-1 is "ores":
  497. command sender command "/pmores"
  498. else:
  499. loop all players:
  500. ({Teams.InTeam::%loop-player%}) is ({Teams.InTeam::%command sender%})
  501. send "{@P}{@C}{@H} %command sender%{@C}: %arg-1%" to loop-player
Add Comment
Please, Sign In to add comment