Guest User

Untitled

a guest
Aug 15th, 2016
283
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 67.08 KB | None | 0 0
  1. # Dancing's Team Manager V1.0.0
  2. # Report Bugs to /u/DancingNinjas
  3.  
  4.  
  5. options:
  6. T: &8[&7Teams&8]
  7. C: &8 # <------ Important Text Color
  8. C2: &7 # <----- Text Color
  9. PERM: manage.teams
  10. TC: &8[&7TeamChat&8]&7
  11. TC1: &8 #<------ Team Chat Important Text Color
  12. TC2: &7 #<------ Team Chat Text Color
  13.  
  14. command /team [<text>] [<text>] [<integer>]:
  15. trigger:
  16. if arg-1 is not set:
  17. send "{@C}----------------------------------------------"
  18. send "{@T}{@C2} &lTeam Commands"
  19. send "{@T}{@C2} /team invite <player>"
  20. send "{@T}{@C2} /team accept <player>"
  21. send "{@T}{@C2} /team leave"
  22. send "{@T}{@C2} /team list"
  23. send "{@T}{@C2} /pm <message>"
  24. send "{@T}{@C2} /pmcoords"
  25. send "{@T}{@C2} /pmores"
  26. send "{@C}----------------------------------------------"
  27. if player has permission "{@PERM}":
  28. send "{@T}{@C2} &lAdmin Commands"
  29. send "{@T}{@C2} /team broadcast"
  30. send "{@T}{@C2} /team setsize <integer>"
  31. send "{@T}{@C2} /team create"
  32. send "{@T}{@C2} /tc <player> <player> [<player>] [<player>] [<player>]"
  33. send "{@T}{@C2} /team set <player> <team>"
  34. send "{@T}{@C2} /team lock/unlock"
  35. send "{@T}{@C2} /team kick <player>"
  36. send "{@T}{@C2} /team reset"
  37. send "{@T}{@C2} /team removeempty"
  38. send "{@T}{@C2} /team hidelist"
  39. send "{@T}{@C2} /team unhidelist"
  40. send "{@T}{@C2} /team deathkick <on/off>"
  41. send "{@T}{@C2} /team autodelete <on/off>"
  42. send "{@T}{@C2} /team autocolor <on/off>"
  43. send "{@T}{@C2} /team friendlyfire <on/off>"
  44. send "{@T}{@C2} /dontrandomize <player/list>"
  45. send "{@T}{@C2} /team randomize <team size>"
  46. send "{@T}{@C2} /team redvsblue [<number of teams>]"
  47. send "{@T}{@C2} /team kickunder <team size>"
  48. send "{@T}{@C2} /team delete <team>"
  49. send "{@T}{@C2} /team mute <player/all>"
  50. send "{@T}{@C2} /team unmute <player/all>"
  51. send "{@T}{@C2} /team viewpm <team/all>"
  52. send "{@T}{@C2} /team unviewpm <team/all>"
  53. send "{@T}{@C2} /colorteam <team> <color> [bold] [underline] [strikethrough] [italic]"
  54. send "{@T}{@C2} /team resetcolor <team>"
  55. send "{@T}{@C2} /checkteam <player>"
  56. send "{@C}----------------------------------------------"
  57. else:
  58. if arg-1 is "invite":
  59. arg-2 is set
  60. if {teamslocked} is not set:
  61. if {pendingteam::%player%::%arg-2%} is not set:
  62. if "%arg-2%" is not "%player%":
  63. # Check if the player being requested is in a team
  64. if {Teams.InTeam::%arg-2%} is not set:
  65. send "{@C}----------------------------------------------------"
  66. send "{@T}{@C2} You have invited {@C}%arg-2% {@C2}to join your team!"
  67. send "{@C}----------------------------------------------------"
  68. set {pendingteam::%player%::%arg-2%} to arg-2
  69. send "{@C}----------------------------------------------------" to ("%arg-2%" parsed as offline player)
  70. send "{@T}{@C} %player% {@C2}has invited you to his/her team!" to ("%arg-2%" parsed as offline player)
  71. send "{@T}{@C2} Type {@C}/team accept %player% {@C2}to accept!" to ("%arg-2%" parsed as offline player)
  72. send "{@C}----------------------------------------------------" to ("%arg-2%" parsed as offline player)
  73. else:
  74. send "{@C}----------------------------------------------------"
  75. send "{@T}{@C2} This player is already on a team!"
  76. send "{@C}----------------------------------------------------"
  77. else:
  78. send "{@C}----------------------------------------------------"
  79. send "{@T}{@C2} You cannot invite yourself!"
  80. send "{@C}----------------------------------------------------"
  81. else:
  82. send "{@C}----------------------------------------------------"
  83. send "{@T}{@C2} You already sent {@C}%arg-2% {@C2}a request!"
  84. send "{@C}----------------------------------------------------"
  85. else:
  86. send "{@C}----------------------------------------------------"
  87. send "{@T}{@C2} Teams are locked!"
  88. send "{@C}----------------------------------------------------"
  89.  
  90.  
  91. else if arg-1 is "accept":
  92. if {teamslocked} is not set:
  93. # If arg-2 sent a request
  94. if {pendingteam::%arg-2%::%player%} is set:
  95. # If player is in a team - delete variables and remove from scoreboard team
  96. if {Teams.InTeam::%player%} is not set:
  97. # if arg-2 is on a team
  98. if {Teams.InTeam::%arg-2%} is set:
  99. if (size of {Team.%{TeamNumber::%arg-2%}%::*}) is less than {teamsize}:
  100. set {Team.%{TeamNumber::%arg-2%}%::%player%} to player
  101. set {TeamNumber::%player%} to {TeamNumber::%arg-2%}
  102. set {Teams.InTeam::%player%} to true
  103. command "/scoreboard teams join UHC%{TeamNumber::%arg-2%}% %player%"
  104. delete {pendingteam::%arg-2%::%player%}
  105. loop {Team.%{TeamNumber::%arg-2%}%::*}:
  106. send "{@C}----------------------------------------------------" to ("%loop-value%" parsed as offline player)
  107. send "{@T} {@C}%player% {@C2}has joined your team!" to ("%loop-value%" parsed as offline player)
  108. send "{@C}----------------------------------------------------" to ("%loop-value%" parsed as offline player)
  109. send "{@C}----------------------------------------------------" to player
  110. send "{@T}{@C2} You have joined team {@C}%{TeamNumber::%player%}%{@C2}!" to player
  111. send "{@C}----------------------------------------------------" to player
  112. else:
  113. send "{@C}----------------------------------------------------" to player
  114. send "{@T}{@C2} That team is full!" to player
  115. send "{@C}----------------------------------------------------" to player
  116. else:
  117. set {teamhighest} to (({teamhighest}) + 1)
  118. set {Team.%{teamhighest}%::%player%} to player
  119. set {Team.%{teamhighest}%::%arg-2%} to arg-2
  120. set {TeamNumber::%arg-2%} to {teamhighest}
  121. set {TeamNumber::%player%} to {teamhighest}
  122. set {Teams::%{teamhighest}%} to {teamhighest}
  123. command "/scoreboard teams add UHC%{teamhighest}%"
  124. if {teamfriendlyfire} is set:
  125. command "/scoreboard teams option UHC%{teamhighest}% friendlyfire false"
  126. set {Teams.InTeam::%player%} to true
  127. set {Teams.InTeam::%arg-2%} to true
  128. delete {pendingteam::%arg-2%::%player%}
  129. command "/scoreboard teams join UHC%{teamhighest}% %player%"
  130. command "/scoreboard teams join UHC%{teamhighest}% %arg-2%"
  131. send "{@C}----------------------------------------------------" to ("%arg-2%" parsed as offline player)
  132. send "{@T} {@C}%player% {@C2}has joined your team!" to ("%arg-2%" parsed as offline player)
  133. send "{@C}----------------------------------------------------" to ("%arg-2%" parsed as offline player)
  134. send "{@C}----------------------------------------------------"
  135. send "{@T}{@C2} You have joined team {@C}%{TeamNumber::%player%}%{@C2}!"
  136. send "{@C}----------------------------------------------------"
  137. if {ninjateams.dontautocolor} is not set:
  138. command "/colorteam %{TeamNumber::%player%}%"
  139. else:
  140. send "{@C}----------------------------------------------------"
  141. send "{@T}{@C2} You are already on a team!"
  142. send "{@T}{@C2} Type {@C}/team leave {@C2}to leave!"
  143. send "{@C}----------------------------------------------------"
  144. else:
  145. send "{@C}----------------------------------------------------"
  146. send "{@T}{@C2} That player did not invite you to his/her team!"
  147. send "{@C}----------------------------------------------------"
  148. else:
  149. send "{@C}----------------------------------------------------"
  150. send "{@T}{@C2} Teams are locked!"
  151. send "{@C}----------------------------------------------------"
  152.  
  153.  
  154.  
  155. else if arg-1 is "leave":
  156. if {Teams.InTeam::%player%} is not set:
  157. command sender is a player
  158. send "{@C}----------------------------------------------------"
  159. send "{@T}{@C2} You're not on a team, silly!"
  160. send "{@C}----------------------------------------------------"
  161. stop
  162. if {teamslocked} is not set:
  163. command "/scoreboard teams leave %player%"
  164. if (size of {Team.%{TeamNumber::%player%}%::*} - 1) is less than 2:
  165. {ninjateamsautodelete} is not set
  166. command "/team resetcolor %{TeamNumber::%player%}%"
  167. loop {Team.%{TeamNumber::%player%}%::*}:
  168. command "/scoreboard teams leave %loop-value%"
  169. delete {Teams::%{TeamNumber::%loop-value%}%}
  170. delete {Teams.InTeam::%loop-value%}
  171. delete {Team.%{TeamNumber::%player%}%::%loop-value%}
  172. delete {TeamNumber::%loop-value%}
  173. command "/scoreboard teams leave %player%"
  174. delete {Teams.InTeam::%player%}
  175. delete {Team.%{TeamNumber::%player%}%::%player%}
  176. delete {TeamNumber::%player%}
  177. send "{@C}----------------------------------------------------"
  178. send "{@T}{@C2} You have left your team!"
  179. send "{@C}----------------------------------------------------"
  180. else:
  181. send "{@C}----------------------------------------------------"
  182. send "{@T}{@C2} Teams are locked!"
  183. send "{@C}----------------------------------------------------"
  184. else if arg-1 is "list":
  185. if {ninjateamshidelist} is set:
  186. send "{@C}----------------------------------------------------"
  187. send "{@T}{@C2} Teams are currently hidden!"
  188. send "{@C}----------------------------------------------------"
  189. if player does not have permission "{@PERM}":
  190. stop
  191. if (size of {Teams::*}) is not 0:
  192. send "{@C}----------------------------------------------------"
  193. send "{@T}{@C2} &lTeams"
  194. loop {Teams::*}:
  195. send "{@T}{@C} %loop-value% {@C2}: %{Team.%loop-value%::*}%"
  196. send "{@C}----------------------------------------------------"
  197. else:
  198. send "{@C}----------------------------------------------------"
  199. send "{@T}{@C2} No teams are set!"
  200. send "{@C}----------------------------------------------------"
  201. else if arg-1 is "reset":
  202. if command sender is a player:
  203. if player does not have permission "{@PERM}":
  204. send "{@C}----------------------------------------------"
  205. send "{@T}{@C2} You do not have permission to do that!"
  206. send "{@C}----------------------------------------------"
  207. stop
  208. delete {pendingteam::*}
  209. loop {teamhighest} times:
  210. command "/scoreboard teams remove UHC%loop-number%"
  211. delete {Team.%loop-value%::*}
  212. delete {Teams.InTeam::*}
  213. delete {TeamNumber::*}
  214. delete {Teams::*}
  215. delete {allTheColors}
  216. delete {teamColor::*}
  217. delete {randomizing::*}
  218. delete {dontrandomize::*}
  219. delete {teamhighest}
  220. delete {ninjateamsdeathkick}
  221. delete {UsingUsedColors::*}
  222. delete {TeamMuted::*}
  223. delete {CanViewPM::*}
  224. delete {CanViewAllPM::*}
  225.  
  226. set {allTheColors} to true
  227. set {allColors::*} to "aqua", "black", "blue", "dark_aqua", "dark_blue", "dark_gray", "dark_green", "dark_purple", "dark_red", "gold", "gray", "green", "light_purple", "red" and "yellow"
  228. set {allColorsBold::*} to "aqua", "black", "blue", "dark_aqua", "dark_blue", "dark_gray", "dark_green", "dark_purple", "dark_red", "gold", "gray", "green", "light_purple", "red", "white" and "yellow"
  229. set {allColorsUnderline::*} to "aqua", "black", "blue", "dark_aqua", "dark_blue", "dark_gray", "dark_green", "dark_purple", "dark_red", "gold", "gray", "green", "light_purple", "red", "white" and "yellow"
  230. set {allColorsStrikethrough::*} to "aqua", "black", "blue", "dark_aqua", "dark_blue", "dark_gray", "dark_green", "dark_purple", "dark_red", "gold", "gray", "green", "light_purple", "red", "white" and "yellow"
  231. set {allColorsItalic::*} to "aqua", "black", "blue", "dark_aqua", "dark_blue", "dark_gray", "dark_green", "dark_purple", "dark_red", "gold", "gray", "green", "light_purple", "red", "white" and "yellow"
  232. set {allColorsBoldUnderline::*} to "aqua", "black", "blue", "dark_aqua", "dark_blue", "dark_gray", "dark_green", "dark_purple", "dark_red", "gold", "gray", "green", "light_purple", "red", "white" and "yellow"
  233. set {allColorsBoldStrikethrough::*} to "aqua", "black", "blue", "dark_aqua", "dark_blue", "dark_gray", "dark_green", "dark_purple", "dark_red", "gold", "gray", "green", "light_purple", "red", "white" and "yellow"
  234. set {allColorsBoldItalic::*} to "aqua", "black", "blue", "dark_aqua", "dark_blue", "dark_gray", "dark_green", "dark_purple", "dark_red", "gold", "gray", "green", "light_purple", "red", "white" and "yellow"
  235. set {allColorsUnderlineStrikethrough::*} to "aqua", "black", "blue", "dark_aqua", "dark_blue", "dark_gray", "dark_green", "dark_purple", "dark_red", "gold", "gray", "green", "light_purple", "red", "white" and "yellow"
  236. set {allColorsUnderlineItalic::*} to "aqua", "black", "blue", "dark_aqua", "dark_blue", "dark_gray", "dark_green", "dark_purple", "dark_red", "gold", "gray", "green", "light_purple", "red", "white" and "yellow"
  237. set {allColorsStrikethroughItalic::*} to "aqua", "black", "blue", "dark_aqua", "dark_blue", "dark_gray", "dark_green", "dark_purple", "dark_red", "gold", "gray", "green", "light_purple", "red", "white" and "yellow"
  238. set {allColorsBoldUnderlineStrikethrough::*} to "aqua", "black", "blue", "dark_aqua", "dark_blue", "dark_gray", "dark_green", "dark_purple", "dark_red", "gold", "gray", "green", "light_purple", "red", "white" and "yellow"
  239. set {allColorsBoldUnderlineItalic::*} to "aqua", "black", "blue", "dark_aqua", "dark_blue", "dark_gray", "dark_green", "dark_purple", "dark_red", "gold", "gray", "green", "light_purple", "red", "white" and "yellow"
  240. set {allColorsBoldStrikethroughItalic::*} to "aqua", "black", "blue", "dark_aqua", "dark_blue", "dark_gray", "dark_green", "dark_purple", "dark_red", "gold", "gray", "green", "light_purple", "red", "white" and "yellow"
  241. set {allColorsBoldUnderlineStrikethroughItalic::*} to "aqua", "black", "blue", "dark_aqua", "dark_blue", "dark_gray", "dark_green", "dark_purple", "dark_red", "gold", "gray", "green", "light_purple", "red", "white" and "yellow"
  242. set {allColorsRandom::*} to "aqua", "black", "blue", "dark_aqua", "dark_blue", "dark_gray", "dark_green", "dark_purple", "dark_red", "gold", "gray", "green", "light_purple", "red", "white" and "yellow"
  243.  
  244.  
  245. send "{@C}----------------------------------------------------"
  246. send "{@T}{@C2} Teams Reset!"
  247. send "{@C}----------------------------------------------------"
  248. else if arg-1 is "set":
  249. if command sender is a player:
  250. if player does not have permission "{@PERM}":
  251. send "{@C}----------------------------------------------"
  252. send "{@T}{@C2} You do not have permission to do that!"
  253. send "{@C}----------------------------------------------"
  254. stop
  255. # If arg-3 is a valid team
  256. if {Teams::%arg-3%} is set:
  257.  
  258. if (size of {Team.%{TeamNumber::%arg-2%}%::*} - 1) is less than 2:
  259. {ninjateamsautodelete} is not set
  260. command "/team resetcolor %{TeamNumber::%arg-2%}%"
  261. loop {Team.%{TeamNumber::%arg-2%}%::*}:
  262. command "/scoreboard teams leave %loop-value%"
  263. delete {Teams::%{TeamNumber::%loop-value%}%}
  264. delete {Teams.InTeam::%loop-value%}
  265. delete {Team.%{TeamNumber::%arg-2%}%::%loop-value%}
  266. delete {TeamNumber::%loop-value%}
  267.  
  268.  
  269. command "/scoreboard teams leave %arg-2%"
  270. delete {Team.%{TeamNumber::%arg-2%}%::%arg-2%}
  271. set {Teams.InTeam::%arg-2%} to true
  272. set {Team.%arg-3%::%arg-2%} to arg-2
  273. set {TeamNumber::%arg-2%} to arg-3
  274. loop all players:
  275. delete {pendingteam::%loop-player%::arg-2}
  276. command "/scoreboard teams join UHC%arg-3% %arg-2%"
  277. send "{@C}----------------------------------------------" to ("%arg-2%" parsed as offline player)
  278. send "{@T}{@C2} You have joined team {@C}%arg-3%{@C2}!" to ("%arg-2%" parsed as offline player)
  279. send "{@C}----------------------------------------------" to ("%arg-2%" parsed as offline player)
  280. send "{@C}----------------------------------------------" to player
  281. send "{@T}{@C2} You set {@C}%arg-2% {@C2}to team {@C}%arg-3%{@C2}!" to player
  282. send "{@C}----------------------------------------------" to player
  283. else:
  284. send "{@T}{@C2} Invalid Team: {@C}%arg-3%"
  285. send "{@T}{@C2} Use {@C}/team create {@C2}to make a new team!"
  286. else if arg-1 is "create":
  287. if command sender is a player:
  288. if player does not have permission "{@PERM}":
  289. send "{@C}----------------------------------------------------"
  290. send "{@T}{@C2} Insufficient Permissions. This is an a staff command."
  291. send "{@T}{@C2} Use to {@C}/team invite {@C2}to create a team automatically!"
  292. send "{@C}----------------------------------------------------"
  293. stop
  294. set {teamhighest} to (({teamhighest}) + 1)
  295. set {Teams::%{teamhighest}%} to {teamhighest}
  296. command "/scoreboard teams add UHC%{teamhighest}%"
  297. if {teamfriendlyfire} is set:
  298. command "/scoreboard teams option UHC%{teamhighest}% friendlyfire false"
  299. if {ninjateams.dontautocolor} is not set:
  300. command "/colorteam %{teamhighest}%"
  301. send "{@T}{@C2} Team {@C}%{teamhighest}% {@C2}Created!"
  302. else if arg-1 is "lock":
  303. if command sender is a player:
  304. if player does not have permission "{@PERM}":
  305. send "{@C}----------------------------------------------"
  306. send "{@T}{@C2} You do not have permission to do that!"
  307. send "{@C}----------------------------------------------"
  308. stop
  309. set {teamslocked} to true
  310. send "{@C}----------------------------------------------"
  311. send "{@T}{@C2} Teams Locked!"
  312. send "{@C}----------------------------------------------"
  313. else if arg-1 is "unlock":
  314. if command sender is a player:
  315. if player does not have permission "{@PERM}":
  316. send "{@C}----------------------------------------------"
  317. send "{@T}{@C2} You do not have permission to do that!"
  318. send "{@C}----------------------------------------------"
  319. stop
  320. delete {teamslocked}
  321. send "{@C}----------------------------------------------"
  322. send "{@T}{@C2} Teams Unlocked!"
  323. send "{@C}----------------------------------------------"
  324. else if arg-1 is "autocolor":
  325. if command sender is a player:
  326. if player does not have permission "{@PERM}":
  327. send "{@C}----------------------------------------------"
  328. send "{@T}{@C2} You do not have permission to do that!"
  329. send "{@C}----------------------------------------------"
  330. stop
  331. if arg-2 is "on":
  332. delete {ninjateams.dontautocolor}
  333. send "{@C}----------------------------------------------"
  334. send "{@T}{@C2} Auto-Coloring Enabled!"
  335. send "{@C}----------------------------------------------"
  336. else if arg-2 is "off":
  337. set {ninjateams.dontautocolor} to true
  338. send "{@C}----------------------------------------------"
  339. send "{@T}{@C2} Auto-Coloring Disabled!"
  340. send "{@C}----------------------------------------------"
  341. else if arg-1 is "kick":
  342. if command sender is a player:
  343. if player does not have permission "{@PERM}":
  344. send "{@C}----------------------------------------------"
  345. send "{@T}{@C2} You do not have permission to do that!"
  346. send "{@C}----------------------------------------------"
  347. stop
  348. command "/scoreboard teams leave %arg-2%"
  349. if (size of {Team.%{TeamNumber::%arg-2%}%::*} - 1) is less than 2:
  350. {ninjateamsautodelete} is not set
  351. command "/team resetcolor %{TeamNumber::%arg-2%}%"
  352. loop {Team.%{TeamNumber::%arg-2%}%::*}:
  353. command "/scoreboard teams leave %loop-value%"
  354. delete {Teams::%{TeamNumber::%loop-value%}%}
  355. delete {Teams.InTeam::%loop-value%}
  356. delete {Team.%{TeamNumber::%arg-2%}%::%loop-value%}
  357. delete {TeamNumber::%loop-value%}
  358. command "/scoreboard teams leave %arg-2%"
  359. delete {Teams.InTeam::%arg-2%}
  360. delete {Team.%{TeamNumber::%arg-2%}%::%arg-2%}
  361. delete {TeamNumber::%arg-2%}
  362. send "{@C}----------------------------------------------------"
  363. send "{@T}{@C} %arg-2% {@C2}has been kicked from his/her team!"
  364. send "{@C}----------------------------------------------------"
  365. send "{@C}----------------------------------------------------" to ("%arg-2%" parsed as offline player)
  366. send "{@T}{@C2} You were removed from your team." to ("%arg-2%" parsed as offline player)
  367. send "{@C}----------------------------------------------------" to ("%arg-2%" parsed as offline player)
  368.  
  369. else if arg-1 is "setsize":
  370. if command sender is a player:
  371. if player does not have permission "{@PERM}":
  372. send "{@C}----------------------------------------------"
  373. send "{@T}{@C2} You do not have permission to do that!"
  374. send "{@C}----------------------------------------------"
  375. stop
  376. if ("%arg-2%" parsed as integer) is less than 2:
  377. send "{@C}----------------------------------------------"
  378. send "{@T}{@C2} Teams must be at least 2 in size!"
  379. send "{@C}----------------------------------------------"
  380. stop
  381. set {teamsize} to ("%arg-2%" parsed as integer)
  382. send "{@C}----------------------------------------------"
  383. send "{@T}{@C2} Team size set to {@C}%{teamsize}%{@C2}!"
  384. send "{@C}----------------------------------------------"
  385.  
  386. else if arg-1 is "randomize":
  387.  
  388.  
  389. if command sender is a player:
  390. if player does not have permission "{@PERM}":
  391. send "{@C}----------------------------------------------"
  392. send "{@T}{@C2} You do not have permission to do that!"
  393. send "{@C}----------------------------------------------"
  394. stop
  395. delete {randomizing::*}
  396. send "{@C}-----------------------------------------------------"
  397. send "{@T}{@C2} Randomizing Teams of {@C}%arg-2%{@C2}..."
  398. send "{@C}-----------------------------------------------------"
  399. loop all players:
  400. if {dontrandomize::%loop-player%} is not set:
  401. if {Teams.InTeam::%loop-player%} is not set:
  402. set {randomizing::%loop-player%} to loop-player
  403. set {_teamsize} to ("%arg-2%" parsed as integer)
  404. set {teamhighest} to (({teamhighest}) + 1)
  405. # Individually add each player to a random team
  406. loop (size of {randomizing::*}) times:
  407. if {Teams::%{teamhighest}%} is not set:
  408. set {Teams::%{teamhighest}%} to {teamhighest}
  409. command "/scoreboard teams add UHC%{teamhighest}%"
  410. if {teamfriendlyfire} is set:
  411. command "/scoreboard teams option UHC%{teamhighest}% friendlyfire false"
  412. if {ninjateams.dontautocolor} is not set:
  413. command "/colorteam %{teamhighest}%"
  414. set {_randomplayer} to (random element of {randomizing::*})
  415. set {Teams.InTeam::%{_randomplayer}%} to true
  416. if (size of {Team.%{teamhighest}%::*}) is less than {_teamsize}:
  417. set {TeamNumber::%{_randomplayer}%} to {teamhighest}
  418. set {Team.%{teamhighest}%::%{_randomplayer}%} to {_randomplayer}
  419. message "{@C}-----------------------------------------------------" to {_randomplayer}
  420. message "{@T}{@C2} You are now on team {@C}%{teamhighest}%&7." to {_randomplayer}
  421. message "{@C}-----------------------------------------------------" to {_randomplayer}
  422. execute console command "/scoreboard teams join UHC%{teamhighest}% %{_randomplayer}%"
  423. delete {randomizing::%{_randomplayer}%}
  424. if (size of {Team.%{teamhighest}%::*}) is {_teamsize}:
  425. add 1 to {teamhighest}
  426. else if arg-1 is "broadcast":
  427. if command sender is a player:
  428. if player does not have permission "{@PERM}":
  429. send "{@C}----------------------------------------------"
  430. send "{@T}{@C2} You do not have permission to do that!"
  431. send "{@C}----------------------------------------------"
  432. stop
  433. broadcast "{@C}-----------------------------------------------------"
  434. broadcast "{@T}{@C2} &lTeam Setup"
  435. broadcast "{@T}{@C2} /team invite <player>"
  436. broadcast "{@T}{@C2} /team accept <player>"
  437. broadcast "{@C}-----------------------------------------------------"
  438.  
  439. else if arg-1 is "removeempty":
  440. if command sender is a player:
  441. if player does not have permission "{@PERM}":
  442. send "{@C}----------------------------------------------"
  443. send "{@T}{@C2} You do not have permission to do that!"
  444. send "{@C}----------------------------------------------"
  445. stop
  446. loop {Teams::*}:
  447. if (size of {Team.%loop-value%::*}) is 0:
  448. command "/team resetcolor %loop-value%"
  449. delete {Team.%loop-value%::*}
  450. delete {Teams::%loop-value%}
  451. send "{@C}----------------------------------------------"
  452. send "{@T}{@C2} Empty Teams Removed!"
  453. send "{@C}----------------------------------------------"
  454. else if arg-1 is "deathkick":
  455. if command sender is a player:
  456. if player does not have permission "{@PERM}":
  457. send "{@C}----------------------------------------------"
  458. send "{@T}{@C2} You do not have permission to do that!"
  459. send "{@C}----------------------------------------------"
  460. stop
  461. if arg-2 is "on" or "enable":
  462. send "{@C}----------------------------------------------"
  463. send "{@T}{@C2} Team Death-Kick Enabled!"
  464. send "{@C}----------------------------------------------"
  465. set {ninjateamsdeathkick} to true #Should I make it so this variable is deleted when teams are reset?
  466. else if arg-2 is "off" or "disable":
  467. send "{@C}----------------------------------------------"
  468. send "{@T}{@C2} Team Death-Kick Disabled!"
  469. send "{@C}----------------------------------------------"
  470. delete {ninjateamsdeathkick}
  471.  
  472. else if arg-1 is "resetcolor":
  473. arg-2 is set
  474. if command sender is a player:
  475. if player does not have permission "{@PERM}":
  476. send "{@C}----------------------------------------------"
  477. send "{@T}{@C2} You do not have permission to do that!"
  478. send "{@C}----------------------------------------------"
  479. stop
  480. if {teamColor::%arg-2%::Color} is set:
  481. send "{@C}----------------------------------------------"
  482. send "{@T}{@C2} Color for team {@C}%arg-2% {@C2}has been reset!"
  483. send "{@C}----------------------------------------------"
  484. if {UsingUsedColors::%arg-2%} is not set:
  485. #Backward form of color checking to add the color back to the correct list variable
  486.  
  487. if {teamColor::%arg-2%::bold} and {teamColor::%arg-2%::underline} and {teamColor::%arg-2%::strikethrough} and {teamColor::%arg-2%::italic} is set:
  488. add "%{teamColor::%arg-2%::Color}%" to {allColorsBoldUnderlineStrikethroughItalic::*}
  489.  
  490. else if {teamColor::%arg-2%::bold} and {teamColor::%arg-2%::underline} and {teamColor::%arg-2%::strikethrough} is set:
  491. add "%{teamColor::%arg-2%::Color}%" to {allColorsBoldUnderlineStrikethrough::*}
  492.  
  493. else if {teamColor::%arg-2%::bold} and {teamColor::%arg-2%::underline} and {teamColor::%arg-2%::italic} is set:
  494. add "%{teamColor::%arg-2%::Color}%" to {allColorsBoldUnderlineItalic::*}
  495.  
  496. else if {teamColor::%arg-2%::bold} and {teamColor::%arg-2%::underline} is set:
  497. add "%{teamColor::%arg-2%::Color}%" to {allColorsBoldUnderline::*}
  498.  
  499. else if {teamColor::%arg-2%::bold} and {teamColor::%arg-2%::strikethrough} is set:
  500. add "%{teamColor::%arg-2%::Color}%" to {allColorsBoldStrikethrough::*}
  501.  
  502. else if {teamColor::%arg-2%::bold} and {teamColor::%arg-2%::italic} is set:
  503. add "%{teamColor::%arg-2%::Color}%" to {allColorsBoldItalic::*}
  504.  
  505. else if {teamColor::%arg-2%::bold} is set:
  506. add "%{teamColor::%arg-2%::Color}%" to {allColorsBold::*}
  507.  
  508. else if {teamColor::%arg-2%::underline} is set:
  509. add "%{teamColor::%arg-2%::Color}%" to {allColorsUnderline::*}
  510.  
  511. else if {teamColor::%arg-2%::strikethrough} is set:
  512. add "%{teamColor::%arg-2%::Color}%" to {allColorsStrikethrough::*}
  513.  
  514. else if {teamColor::%arg-2%::italic} is set:
  515. add "%{teamColor::%arg-2%::Color}%" to {allColorsItalic::*}
  516. else:
  517. add "%{teamColor::%arg-2%::Color}%" to {allColors::*}
  518.  
  519. command "/scoreboard teams option UHC%arg-2% color white"
  520. delete {teamColor::%arg-2%::*}
  521. delete {UsingUsedColors::%arg-2%}
  522.  
  523. else if arg-1 is "colorall":
  524. if command sender is a player:
  525. if player does not have permission "{@PERM}":
  526. send "{@C}----------------------------------------------"
  527. send "{@T}{@C2} You do not have permission to do that!"
  528. send "{@C}----------------------------------------------"
  529. stop
  530. loop {Teams::*}:
  531. command "/colorteam %loop-value%"
  532. send "{@C}----------------------------------------------"
  533. send "{@T}{@C2} All teams have been colored!"
  534. send "{@C}----------------------------------------------"
  535. else if arg-1 is "kickunder":
  536. if command sender is a player:
  537. if player does not have permission "{@PERM}":
  538. send "{@C}----------------------------------------------"
  539. send "{@T}{@C2} You do not have permission to do that!"
  540. send "{@C}----------------------------------------------"
  541. stop
  542. loop all players:
  543. if {Teams.InTeam::%loop-player%} is set:
  544. if (size of {Team.%{TeamNumber::%loop-player%}%::*}) is less than ("%arg-2%" parsed as integer):
  545. set {_saveloop} to {TeamNumber::%loop-player%}
  546. loop {Team.%{TeamNumber::%loop-player%}%::*}:
  547. command "/scoreboard teams leave %loop-value-2%"
  548. if "%loop-value-2%" parsed as offline player does not have permission "{@PERM}":
  549. kick ("%loop-value-2%" parsed as offline player) due to "{@T}{@C2} You were kicked for not having enough players on your team!"
  550. delete {whitelisted::%loop-value-2%}
  551. delete {Teams.InTeam::%loop-value-2%}
  552. delete {TeamNumber::%loop-value-2%}
  553. delete {Team.%{_saveloop}%::*}
  554. delete {Teams::%{_saveloop}%}
  555.  
  556. else if loop-player does not have permission "{@PERM}":
  557. kick loop-player due to "{@T}{@C2} You were kicked for not having enough players on your team!"
  558. delete {whitelisted::%loop-value%}
  559. send "{@C}----------------------------------------------"
  560. send "{@T}{@C2} Teams of less than {@C}%arg-2% {@C2}have been kicked!"
  561. send "{@C}----------------------------------------------"
  562.  
  563. else if arg-1 is "hidelist":
  564. if command sender is a player:
  565. if player does not have permission "{@PERM}":
  566. send "{@C}----------------------------------------------"
  567. send "{@T}{@C2} You do not have permission to do that!"
  568. send "{@C}----------------------------------------------"
  569. stop
  570. set {ninjateamshidelist} to true
  571. send "{@C}----------------------------------------------"
  572. send "{@T}{@C2} Players can no longer do {@C}/team list{@C2}!"
  573. send "{@T}{@C2} Type {@C}/team unhidelist{@C2} to undo this!"
  574. send "{@C}----------------------------------------------"
  575.  
  576. else if arg-1 is "unhidelist":
  577. if command sender is a player:
  578. if player does not have permission "{@PERM}":
  579. send "{@C}----------------------------------------------"
  580. send "{@T}{@C2} You do not have permission to do that!"
  581. send "{@C}----------------------------------------------"
  582. stop
  583. delete {ninjateamshidelist}
  584. send "{@C}----------------------------------------------"
  585. send "{@T}{@C2} Players can now do {@C}/team list{@C2}!"
  586. send "{@T}{@C2} Type {@C}/team hidelist{@C2} to hide the list!"
  587. send "{@C}----------------------------------------------"
  588.  
  589. else if arg-1 is "rvb" or "redvsblue":
  590. if command sender is a player:
  591. if player does not have permission "{@PERM}":
  592. send "{@C}----------------------------------------------"
  593. send "{@T}{@C2} You do not have permission to do that!"
  594. send "{@C}----------------------------------------------"
  595. stop
  596.  
  597. delete {randomizing::*}
  598. loop all players:
  599. if {dontrandomize::%loop-player%} is not set:
  600. if {Teams.InTeam::%loop-player%} is not set:
  601. set {randomizing::%loop-player%} to loop-player
  602. set {teamhighest} to (({teamhighest}) + 1)
  603. set {_currentnumber} to {teamhighest}
  604. if arg-2 is set:
  605. set {_teamsize} to ceil((size of {randomizing::*}) / ("%arg-2%" parsed as integer))
  606. else:
  607. set {_teamsize} to ceil((size of {randomizing::*}) / 2)
  608. send "{@C}-----------------------------------------------------"
  609. send "{@T}{@C2} Randomizing RvB Teams of {@C}%{_teamsize}%{@C2}..."
  610. send "{@C}-----------------------------------------------------"
  611. set {_LOOPNUMBER} to 1
  612. # Individually add each player to a random team
  613. loop (size of {randomizing::*}) times:
  614. if {Teams::%{teamhighest}%} is not set:
  615. set {Teams::%{teamhighest}%} to {teamhighest}
  616. command "/scoreboard teams add UHC%{teamhighest}%"
  617. if {teamfriendlyfire} is set:
  618. command "/scoreboard teams option UHC%{teamhighest}% friendlyfire false"
  619. if {ninjateams.dontautocolor} is not set:
  620. if {_LOOPNUMBER} is 1:
  621. command "/colorteam %{teamhighest}% red"
  622. else if {_LOOPNUMBER} is 2:
  623. command "/colorteam %{teamhighest}% blue"
  624. else if {_LOOPNUMBER} is 3:
  625. command "/colorteam %{teamhighest}% yellow"
  626. else if {_LOOPNUMBER} is 4:
  627. command "/colorteam %{teamhighest}% green"
  628. else:
  629. command "/colorteam %{teamhighest}%"
  630. set {_LOOPNUMBER} to {_LOOPNUMBER} + 1
  631. set {_randomplayer} to (random element of {randomizing::*})
  632. set {Teams.InTeam::%{_randomplayer}%} to true
  633. if (size of {Team.%{teamhighest}%::*}) is less than {_teamsize}:
  634. set {TeamNumber::%{_randomplayer}%} to {teamhighest}
  635. set {Team.%{teamhighest}%::%{_randomplayer}%} to {_randomplayer}
  636. message "{@C}-----------------------------------------------------" to {_randomplayer}
  637. message "{@T}{@C2} You are now on team {@C}%{teamhighest}%&7." to {_randomplayer}
  638. message "{@C}-----------------------------------------------------" to {_randomplayer}
  639. execute console command "/scoreboard teams join UHC%{teamhighest}% %{_randomplayer}%"
  640. delete {randomizing::%{_randomplayer}%}
  641. if (size of {Team.%{teamhighest}%::*}) is {_teamsize}:
  642. add 1 to {teamhighest}
  643. else if arg-1 is "delete":
  644. if command sender is a player:
  645. if player does not have permission "{@PERM}":
  646. send "{@C}----------------------------------------------"
  647. send "{@T}{@C2} You do not have permission to do that!"
  648. send "{@C}----------------------------------------------"
  649. stop
  650. command "/team resetcolor %arg-2%"
  651. loop {Team.%arg-2%::*}:
  652. command "/scoreboard teams leave %loop-value%"
  653. delete {TeamNumber::loop-value}
  654. delete {Teams.InTeam::%loop-value%}
  655. delete {Team.%{TeamNumber::%loop-value%}%::%loop-value%}
  656. delete {Teams::%arg-2%}
  657. delete {Teams.%arg-2%::*}
  658. send "{@C}----------------------------------------------"
  659. send "{@T}{@C2} Team {@C}%arg-2% {@C2}has been deleted!"
  660. send "{@C}----------------------------------------------"
  661.  
  662. else if arg-1 is "listcolors":
  663. send "{@C}----------------------------------------------"
  664.  
  665. send "{@T}{@C2} Team {@C}%arg-2% {@C2}has been deleted!"
  666. send "{@C}----------------------------------------------"
  667. send "{@C}----------------------------------------------------"
  668. send "{@T}{@C2} &lColors:"
  669. send "{@T}{@C} aqua, black, blue, dark_aqua, dark_blue, dark_gray, dark_green, dark_purple, dark_red, gold, gray, green, light_purple, red, white and yellow"
  670. send "{@C}----------------------------------------------------"
  671. else if arg-1 is "unmuteall":
  672. if command sender is a player:
  673. if player does not have permission "{@PERM}":
  674. send "{@C}----------------------------------------------"
  675. send "{@T}{@C2} You do not have permission to do that!"
  676. send "{@C}----------------------------------------------"
  677. stop
  678. delete {PMDISABLED}
  679. send "{@C}----------------------------------------------"
  680. send "{@T}{@C2} Teams can now PM!"
  681. send "{@T}{@C2} Use {@C}/team muteall {@C2}to undo this!"
  682. send "{@C}----------------------------------------------"
  683. else if arg-1 is "mute":
  684. if command sender is a player:
  685. if player does not have permission "{@PERM}":
  686. send "{@C}----------------------------------------------"
  687. send "{@T}{@C2} You do not have permission to do that!"
  688. send "{@C}----------------------------------------------"
  689. stop
  690. if arg-2 is set:
  691. if arg-2 is "all" or "*":
  692. set {PMDISABLED} to true
  693. send "{@C}----------------------------------------------"
  694. send "{@T}{@C2} Teams can no longer use team chat!"
  695. send "{@T}{@C2} Use {@C}/team unmuteall {@C2}to undo this!"
  696. send "{@C}----------------------------------------------"
  697. else:
  698. set {TeamMuted::%arg-2%} to arg-2
  699. send "{@C}----------------------------------------------"
  700. send "{@T}{@C} %arg-2% {@C2}can no longer use team chat!"
  701. send "{@T}{@C2} Use {@C}/team unmute %arg-2% {@C2}to undo this!"
  702. send "{@C}----------------------------------------------"
  703. else if arg-1 is "unmute":
  704. if command sender is a player:
  705. if player does not have permission "{@PERM}":
  706. send "{@C}----------------------------------------------"
  707. send "{@T}{@C2} You do not have permission to do that!"
  708. send "{@C}----------------------------------------------"
  709. stop
  710. if arg-2 is set:
  711. if arg-2 is "all" or "*":
  712. delete {PMDISABLED}
  713. send "{@C}----------------------------------------------"
  714. send "{@T}{@C2} Teams can now use team chat!"
  715. send "{@T}{@C2} Use {@C}/team muteall {@C2}to undo this!"
  716. send "{@C}----------------------------------------------"
  717. else:
  718. delete {TeamMuted::%arg-2%}
  719. send "{@C}----------------------------------------------"
  720. send "{@T}{@C} %arg-2% {@C2}can now use team chat!"
  721. send "{@T}{@C2} Use {@C}/team mute %arg-2% {@C2}to undo this!"
  722. send "{@C}----------------------------------------------"
  723. else if arg-1 is "viewpm":
  724. if command sender is a player:
  725. if player does not have permission "{@PERM}":
  726. send "{@C}----------------------------------------------"
  727. send "{@T}{@C2} You do not have permission to do that!"
  728. send "{@C}----------------------------------------------"
  729. stop
  730. if arg-2 is set:
  731. if arg-2 is "all" or "*":
  732. set {CanViewAllPM::%player%} to player
  733. send "{@C}----------------------------------------------"
  734. send "{@T}{@C2} You can now view all team chat!"
  735. send "{@C}----------------------------------------------"
  736. else if {Teams::%arg-2%} is set:
  737. set {CanViewPM::%arg-2%::%player%} to player
  738. send "{@C}----------------------------------------------"
  739. send "{@T}{@C2} You can now view team {@C}%arg-2%{@C2}'s chat!"
  740. send "{@C}----------------------------------------------"
  741. else:
  742. send "{@C}----------------------------------------------"
  743. send "{@T}{@C2} That team doesn't exist!"
  744. send "{@C}----------------------------------------------"
  745.  
  746. else if arg-1 is "unviewpm":
  747. if command sender is a player:
  748. if player does not have permission "{@PERM}":
  749. send "{@C}----------------------------------------------"
  750. send "{@T}{@C2} You do not have permission to do that!"
  751. send "{@C}----------------------------------------------"
  752. stop
  753. if arg-2 is set:
  754. if arg-2 is "all" or "*":
  755. delete {CanViewAllPM::%player%}
  756. send "{@C}----------------------------------------------"
  757. send "{@T}{@C2} You can no longer view all team chat!"
  758. send "{@C}----------------------------------------------"
  759. loop {Teams::*}:
  760. delete {CanViewPM::%loop-value%::%player%}
  761. else if {Teams::%arg-2%} is set:
  762. delete {CanViewPM::%arg-2%::%player%}
  763. send "{@C}----------------------------------------------"
  764. send "{@T}{@C2} You can no longer view team {@C}%arg-2%{@C2}'s chat!"
  765. send "{@C}----------------------------------------------"
  766. else:
  767. send "{@C}----------------------------------------------"
  768. send "{@T}{@C2} That team doesn't exist!"
  769. send "{@C}----------------------------------------------"
  770. else if arg-1 is "autodelete":
  771. if command sender is a player:
  772. if player does not have permission "{@PERM}":
  773. send "{@C}----------------------------------------------"
  774. send "{@T}{@C2} You do not have permission to do that!"
  775. send "{@C}----------------------------------------------"
  776. stop
  777. if arg-2 is "on" or "enable":
  778. send "{@C}----------------------------------------------"
  779. send "{@T}{@C2} Team Auto-Delete Enabled!"
  780. send "{@C}----------------------------------------------"
  781. delete {ninjateamsautodelete}
  782. else if arg-2 is "off" or "disable":
  783. send "{@C}----------------------------------------------"
  784. send "{@T}{@C2} Team Auto-Delete Disabled!"
  785. send "{@C}----------------------------------------------"
  786. set {ninjateamsautodelete} to false
  787. else if arg-1 is "friendlyfire" or "ff" or "fire":
  788. if command sender is a player:
  789. if player does not have permission "{@PERM}":
  790. send "{@C}----------------------------------------------"
  791. send "{@T}{@C2} You do not have permission to do that!"
  792. send "{@C}----------------------------------------------"
  793. stop
  794. if arg-2 is "on" or "enable":
  795. send "{@C}----------------------------------------------"
  796. send "{@T}{@C2} Friendly Fire Enabled!"
  797. send "{@C}----------------------------------------------"
  798. delete {teamfriendlyfire}
  799. loop {Teams::*}:
  800. command "/scoreboard teams option UHC%loop-value% friendlyfire true"
  801.  
  802. else if arg-2 is "off" or "disable":
  803. send "{@C}----------------------------------------------"
  804. send "{@T}{@C2} Friendly Fire Disabled!"
  805. send "{@C}----------------------------------------------"
  806. set {teamfriendlyfire} to false
  807. loop {Teams::*}:
  808. command "/scoreboard teams option UHC%loop-value% friendlyfire false"
  809.  
  810.  
  811.  
  812.  
  813.  
  814.  
  815.  
  816. command /colorteam <integer> [<text>] [<text>] [<text>] [<text>] [<text>]:
  817. usage: /colorteam <team> [<color>] [<bold>] [<underline>] [<strikethrough>] [<italic>]
  818. permission: {@PERM}
  819. trigger:
  820. {Teams::%arg-1%} is set
  821. if {allTheColors} is not set:
  822. set {allTheColors} to true
  823. set {allColors::*} to "aqua", "black", "blue", "dark_aqua", "dark_blue", "dark_gray", "dark_green", "dark_purple", "dark_red", "gold", "gray", "green", "light_purple", "red" and "yellow"
  824. set {allColorsBold::*} to "aqua", "black", "blue", "dark_aqua", "dark_blue", "dark_gray", "dark_green", "dark_purple", "dark_red", "gold", "gray", "green", "light_purple", "red", "white" and "yellow"
  825. set {allColorsUnderline::*} to "aqua", "black", "blue", "dark_aqua", "dark_blue", "dark_gray", "dark_green", "dark_purple", "dark_red", "gold", "gray", "green", "light_purple", "red", "white" and "yellow"
  826. set {allColorsStrikethrough::*} to "aqua", "black", "blue", "dark_aqua", "dark_blue", "dark_gray", "dark_green", "dark_purple", "dark_red", "gold", "gray", "green", "light_purple", "red", "white" and "yellow"
  827. set {allColorsItalic::*} to "aqua", "black", "blue", "dark_aqua", "dark_blue", "dark_gray", "dark_green", "dark_purple", "dark_red", "gold", "gray", "green", "light_purple", "red", "white" and "yellow"
  828. set {allColorsBoldUnderline::*} to "aqua", "black", "blue", "dark_aqua", "dark_blue", "dark_gray", "dark_green", "dark_purple", "dark_red", "gold", "gray", "green", "light_purple", "red", "white" and "yellow"
  829. set {allColorsBoldStrikethrough::*} to "aqua", "black", "blue", "dark_aqua", "dark_blue", "dark_gray", "dark_green", "dark_purple", "dark_red", "gold", "gray", "green", "light_purple", "red", "white" and "yellow"
  830. set {allColorsBoldItalic::*} to "aqua", "black", "blue", "dark_aqua", "dark_blue", "dark_gray", "dark_green", "dark_purple", "dark_red", "gold", "gray", "green", "light_purple", "red", "white" and "yellow"
  831. set {allColorsUnderlineStrikethrough::*} to "aqua", "black", "blue", "dark_aqua", "dark_blue", "dark_gray", "dark_green", "dark_purple", "dark_red", "gold", "gray", "green", "light_purple", "red", "white" and "yellow"
  832. set {allColorsUnderlineItalic::*} to "aqua", "black", "blue", "dark_aqua", "dark_blue", "dark_gray", "dark_green", "dark_purple", "dark_red", "gold", "gray", "green", "light_purple", "red", "white" and "yellow"
  833. set {allColorsStrikethroughItalic::*} to "aqua", "black", "blue", "dark_aqua", "dark_blue", "dark_gray", "dark_green", "dark_purple", "dark_red", "gold", "gray", "green", "light_purple", "red", "white" and "yellow"
  834. set {allColorsBoldUnderlineStrikethrough::*} to "aqua", "black", "blue", "dark_aqua", "dark_blue", "dark_gray", "dark_green", "dark_purple", "dark_red", "gold", "gray", "green", "light_purple", "red", "white" and "yellow"
  835. set {allColorsBoldUnderlineItalic::*} to "aqua", "black", "blue", "dark_aqua", "dark_blue", "dark_gray", "dark_green", "dark_purple", "dark_red", "gold", "gray", "green", "light_purple", "red", "white" and "yellow"
  836. set {allColorsBoldStrikethroughItalic::*} to "aqua", "black", "blue", "dark_aqua", "dark_blue", "dark_gray", "dark_green", "dark_purple", "dark_red", "gold", "gray", "green", "light_purple", "red", "white" and "yellow"
  837. set {allColorsBoldUnderlineStrikethroughItalic::*} to "aqua", "black", "blue", "dark_aqua", "dark_blue", "dark_gray", "dark_green", "dark_purple", "dark_red", "gold", "gray", "green", "light_purple", "red", "white" and "yellow"
  838. set {allColorsRandom::*} to "aqua", "black", "blue", "dark_aqua", "dark_blue", "dark_gray", "dark_green", "dark_purple", "dark_red", "gold", "gray", "green", "light_purple", "red", "white" and "yellow"
  839. if arg-2 is set:
  840. if arg-2 is not "aqua", "black", "blue", "dark_aqua", "dark_blue", "dark_gray", "dark_green", "dark_purple", "dark_red", "gold", "gray", "green", "light_purple", "red", "white" or "yellow":
  841. send "{@C}----------------------------------------------"
  842. send "{@T}{@C2} Invalid Color: {@C}%arg-2%{@C2}"
  843. send "{@T}{@C2} The following are valid colors: {@C}aqua, black, blue, dark_aqua, dark_blue, dark_gray, dark_green, dark_purple, dark_red, gold, gray, green, light_purple, red, white and yellow"
  844. send "{@C}----------------------------------------------"
  845. stop
  846. if {teamColor::%arg-1%::Color} is set:
  847. if {UsingUsedColors::%arg-1%} is not set:
  848. #Backward form of color checking to add the color back to the correct list variable
  849.  
  850.  
  851.  
  852. # bold underline strikethrough italic
  853. if {teamColor::%arg-1%::bold} and {teamColor::%arg-1%::underline} and {teamColor::%arg-1%::strikethrough} and {teamColor::%arg-1%::italic} is set:
  854. add "%{teamColor::%arg-1%::Color}%" to {allColorsBoldUnderlineStrikethroughItalic::*}
  855.  
  856. # bold underline strikethrough
  857. else if {teamColor::%arg-1%::bold} and {teamColor::%arg-1%::underline} and {teamColor::%arg-1%::strikethrough} is set:
  858. add "%{teamColor::%arg-1%::Color}%" to {allColorsBoldUnderlineStrikethrough::*}
  859.  
  860. # bold underline italic
  861. else if {teamColor::%arg-1%::bold} and {teamColor::%arg-1%::underline} and {teamColor::%arg-1%::italic} is set:
  862. add "%{teamColor::%arg-1%::Color}%" to {allColorsBoldUnderlineItalic::*}
  863.  
  864.  
  865. # bold underline
  866. else if {teamColor::%arg-1%::bold} and {teamColor::%arg-1%::underline} is set:
  867. add "%{teamColor::%arg-1%::Color}%" to {allColorsBoldUnderline::*}
  868.  
  869. # bold strikethrough
  870. else if {teamColor::%arg-1%::bold} and {teamColor::%arg-1%::strikethrough} is set:
  871. add "%{teamColor::%arg-1%::Color}%" to {allColorsBoldStrikethrough::*}
  872.  
  873. # bold italic
  874. else if {teamColor::%arg-1%::bold} and {teamColor::%arg-1%::italic} is set:
  875. add "%{teamColor::%arg-1%::Color}%" to {allColorsBoldItalic::*}
  876.  
  877. # bold
  878. else if {teamColor::%arg-1%::bold} is set:
  879. add "%{teamColor::%arg-1%::Color}%" to {allColorsBold::*}
  880.  
  881. # underline
  882. else if {teamColor::%arg-1%::underline} is set:
  883. add "%{teamColor::%arg-1%::Color}%" to {allColorsUnderline::*}
  884.  
  885. # strikethrough
  886. else if {teamColor::%arg-1%::strikethrough} is set:
  887. add "%{teamColor::%arg-1%::Color}%" to {allColorsStrikethrough::*}
  888.  
  889. # italic
  890. else if {teamColor::%arg-1%::italic} is set:
  891. add "%{teamColor::%arg-1%::Color}%" to {allColorsItalic::*}
  892.  
  893. else:
  894. add "%{teamColor::%arg-1%::Color}%" to {allColors::*}
  895.  
  896.  
  897.  
  898.  
  899. delete {teamColor::%arg-1%::*}
  900. set {teamColor::%arg-1%::%arg-3%} to true
  901. set {teamColor::%arg-1%::%arg-4%} to true
  902. set {teamColor::%arg-1%::%arg-5%} to true
  903. set {teamColor::%arg-1%::%arg-6%} to true
  904.  
  905. # bold underline strikethrough italic
  906. if {teamColor::%arg-1%::bold} and {teamColor::%arg-1%::underline} and {teamColor::%arg-1%::strikethrough} and {teamColor::%arg-1%::italic} is set:
  907. if (size of {allColorsBoldUnderlineStrikethroughItalic::*}) is greater than 0:
  908. if (size of {allColorsBoldUnderlineStrikethroughItalic::*}) is 1:
  909. delete {allTheColors}
  910. if "%{allColorsBoldUnderlineStrikethroughItalic::*}%" does not contain "%arg-2%":
  911. set {UsingUsedColors::%arg-1%} to true
  912. remove "%arg-2%" from {allColorsBoldUnderlineStrikethroughItalic::*}
  913.  
  914. # bold underline strikethrough
  915. else if {teamColor::%arg-1%::bold} and {teamColor::%arg-1%::underline} and {teamColor::%arg-1%::strikethrough} is set:
  916. if (size of {allColorsBoldUnderlineStrikethrough::*}) is greater than 0:
  917. if "%{allColorsBoldUnderlineStrikethrough::*}%" does not contain "%arg-2%":
  918. set {UsingUsedColors::%arg-1%} to true
  919. remove "%arg-2%" from {allColorsBoldUnderlineStrikethrough::*}
  920.  
  921. # bold underline italic
  922. else if {teamColor::%arg-1%::bold} and {teamColor::%arg-1%::underline} and {teamColor::%arg-1%::italic} is set:
  923. if (size of {allColorsBoldUnderlineItalic::*}) is greater than 0:
  924. if "%{allColorsBoldUnderlineItalic::*}%" does not contain "%arg-2%":
  925. set {UsingUsedColors::%arg-1%} to true
  926. remove "%arg-2%" from {allColorsBoldUnderlineItalic::*}
  927.  
  928.  
  929. # bold underline
  930. else if {teamColor::%arg-1%::bold} and {teamColor::%arg-1%::underline} is set:
  931. if (size of {allColorsBoldUnderline::*}) is greater than 0:
  932. if "%{allColorsBoldUnderline::*}%" does not contain "%arg-2%":
  933. set {UsingUsedColors::%arg-1%} to true
  934. remove "%arg-2%" from {allColorsBoldUnderline::*}
  935.  
  936. # bold strikethrough
  937. else if {teamColor::%arg-1%::bold} and {teamColor::%arg-1%::strikethrough} is set:
  938. if (size of {allColorsBoldStrikethrough::*}) is greater than 0:
  939. if "%{allColorsBoldStrikethrough::*}%" does not contain "%arg-2%":
  940. set {UsingUsedColors::%arg-1%} to true
  941. remove "%arg-2%" from {allColorsBoldStrikethrough::*}
  942.  
  943. # bold italic
  944. else if {teamColor::%arg-1%::bold} and {teamColor::%arg-1%::italic} is set:
  945. if (size of {allColorsBoldItalic::*}) is greater than 0:
  946. if "%{allColorsBoldItalic::*}%" does not contain "%arg-2%":
  947. set {UsingUsedColors::%arg-1%} to true
  948. remove "%arg-2%" from {allColorsBoldItalic::*}
  949.  
  950. # bold
  951. else if {teamColor::%arg-1%::bold} is set:
  952. if (size of {allColorsBold::*}) is greater than 0:
  953. if "%{allColorsBold::*}%" does not contain "%arg-2%":
  954. set {UsingUsedColors::%arg-1%} to true
  955. remove "%arg-2%" from {allColorsBold::*}
  956.  
  957. # underline
  958. else if {teamColor::%arg-1%::underline} is set:
  959. if (size of {allColorsUnderline::*}) is greater than 0:
  960. if "%{allColorsUnderline::*}%" does not contain "%arg-2%":
  961. set {UsingUsedColors::%arg-1%} to true
  962. remove "%arg-2%" from {allColorsUnderline::*}
  963.  
  964. # strikethrough
  965. else if {teamColor::%arg-1%::strikethrough} is set:
  966. if (size of {allColorsStrikethrough::*}) is greater than 0:
  967. if "%{allColorsStrikethrough::*}%" does not contain "%arg-2%":
  968. set {UsingUsedColors::%arg-1%} to true
  969. remove "%arg-2%" from {allColorsStrikethrough::*}
  970.  
  971. # italic
  972. else if {teamColor::%arg-1%::italic} is set:
  973. if (size of {allColorsItalic::*}) is greater than 0:
  974. if "%{allColorsItalic::*}%" does not contain "%arg-2%":
  975. set {UsingUsedColors::%arg-1%} to true
  976. remove "%arg-2%" from {allColorsItalic::*}
  977. else:
  978. if (size of {allColors::*}) is greater than 0:
  979. if "%{allColors::*}%" does not contain "%arg-2%":
  980. set {UsingUsedColors::%arg-1%} to true
  981. remove "%arg-2%" from {allColors::*}
  982. set {teamColor::%arg-1%::Color} to arg-2
  983. execute console command "/scoreboard teams option UHC%arg-1% color %arg-2%"
  984. wait 5 ticks
  985. if {teamColor::%arg-1%::bold} is true:
  986. execute console command "/bold UHC%arg-1%"
  987. if {teamColor::%arg-1%::underline} is true:
  988. execute console command "/underline UHC%arg-1%"
  989. if {teamColor::%arg-1%::strikethrough} is true:
  990. execute console command "/strikethrough UHC%arg-1%"
  991. if {teamColor::%arg-1%::italic} is true:
  992. execute console command "/italic UHC%arg-1%"
  993.  
  994.  
  995. else:
  996. if {teamColor::%arg-1%::Color} is not set:
  997. if (size of {allColors::*}) is greater than 0:
  998. set {_chosenColor} to (random element of {allColors::*})
  999. remove "%{_chosenColor}%" from {allColors::*}
  1000. else if (size of {allColorsBold::*}) is greater than 0:
  1001. set {_chosenColor} to (random element of {allColorsBold::*})
  1002. remove {_chosenColor} from {allColorsBold::*}
  1003. set {teamColor::%arg-1%::bold} to true
  1004. else if (size of {allColorsUnderline::*}) is greater than 0:
  1005. set {_chosenColor} to (random element of {allColorsUnderline::*})
  1006. remove {_chosenColor} from {allColorsUnderline::*}
  1007. set {teamColor::%arg-1%::underline} to true
  1008. else if (size of {allColorsStrikethrough::*}) is greater than 0:
  1009. set {_chosenColor} to (random element of {allColorsStrikethrough::*})
  1010. remove {_chosenColor} from {allColorsStrikethrough::*}
  1011. set {teamColor::%arg-1%::strikethrough} to true
  1012. else if (size of {allColorsItalic::*}) is greater than 0:
  1013. set {_chosenColor} to (random element of {allColorsItalic::*})
  1014. remove {_chosenColor} from {allColorsItalic::*}
  1015. set {teamColor::%arg-1%::italic} to true
  1016. else if (size of {allColorsBoldUnderline::*}) is greater than 0:
  1017. set {_chosenColor} to (random element of {allColorsBoldUnderline::*})
  1018. remove {_chosenColor} from {allColorsBoldUnderline::*}
  1019. set {teamColor::%arg-1%::bold} to true
  1020. set {teamColor::%arg-1%::underline} to true
  1021. else if (size of {allColorsBoldStrikethrough::*}) is greater than 0:
  1022. set {_chosenColor} to (random element of {allColorsBoldStrikethrough::*})
  1023. remove {_chosenColor} from {allColorsBoldStrikethrough::*}
  1024. set {teamColor::%arg-1%::bold} to true
  1025. set {teamColor::%arg-1%::strikethrough} to true
  1026. else if (size of {allColorsBoldItalic::*}) is greater than 0:
  1027. set {_chosenColor} to (random element of {allColorsBoldItalic::*})
  1028. remove {_chosenColor} from {allColorsBoldItalic::*}
  1029. set {teamColor::%arg-1%::bold} to true
  1030. set {teamColor::%arg-1%::italic} to true
  1031. else if (size of {allColorsUnderlineStrikethrough::*}) is greater than 0:
  1032. set {_chosenColor} to (random element of {allColorsUnderlineStrikethrough::*})
  1033. remove {_chosenColor} from {allColorsUnderlineStrikethrough::*}
  1034. set {teamColor::%arg-1%::underline} to true
  1035. set {teamColor::%arg-1%::strikethrough} to true
  1036. else if (size of {allColorsUnderlineItalic::*}) is greater than 0:
  1037. set {_chosenColor} to (random element of {allColorsUnderlineItalic::*})
  1038. remove {_chosenColor} from {allColorsUnderlineItalic::*}
  1039. set {teamColor::%arg-1%::underline} to true
  1040. set {teamColor::%arg-1%::italic} to true
  1041. else if (size of {allColorsStrikethroughItalic::*}) is greater than 0:
  1042. set {_chosenColor} to (random element of {allColorsStrikethroughItalic::*})
  1043. remove {_chosenColor} from {allColorsStrikethroughItalic::*}
  1044. set {teamColor::%arg-1%::strikethrough} to true
  1045. set {teamColor::%arg-1%::italic} to true
  1046. else if (size of {allColorsBoldUnderlineStrikethrough::*}) is greater than 0:
  1047. set {_chosenColor} to (random element of {allColorsBoldUnderlineStrikethrough::*})
  1048. remove {_chosenColor} from {allColorsBoldUnderlineStrikethrough::*}
  1049. set {teamColor::%arg-1%::bold} to true
  1050. set {teamColor::%arg-1%::underline} to true
  1051. set {teamColor::%arg-1%::strikethrough} to true
  1052. else if (size of {allColorsBoldUnderlineItalic::*}) is greater than 0:
  1053. set {_chosenColor} to (random element of {allColorsBoldUnderlineItalic::*})
  1054. remove {_chosenColor} from {allColorsBoldUnderlineItalic::*}
  1055. set {teamColor::%arg-1%::bold} to true
  1056. set {teamColor::%arg-1%::underline} to true
  1057. set {teamColor::%arg-1%::italic} to true
  1058. else if (size of {allColorsBoldStrikethroughItalic::*}) is greater than 0:
  1059. set {_chosenColor} to (random element of {allColorsBoldStrikethroughItalic::*})
  1060. remove {_chosenColor} from {allColorsBoldStrikethroughItalic::*}
  1061. set {teamColor::%arg-1%::bold} to true
  1062. set {teamColor::%arg-1%::strikethrough} to true
  1063. set {teamColor::%arg-1%::italic} to true
  1064. else if (size of {allColorsBoldUnderlineStrikethroughItalic::*}) is greater than 0:
  1065. if (size of {allColorsBoldUnderlineStrikethroughItalic::*}) is 1:
  1066. delete {allTheColors}
  1067. set {_chosenColor} to (random element of {allColorsBoldStrikethroughItalic::*})
  1068. remove {_chosenColor} from {allColorsBoldUnderlineStrikethroughItalic::*}
  1069. set {teamColor::%arg-1%::bold} to true
  1070. set {teamColor::%arg-1%::underline} to true
  1071. set {teamColor::%arg-1%::strikethrough} to true
  1072. set {teamColor::%arg-1%::italic} to true
  1073. set {teamColor::%arg-1%::Color} to {_chosenColor}
  1074. execute console command "/scoreboard teams option UHC%arg-1% color %{_chosenColor}%"
  1075. wait 5 ticks
  1076. if {teamColor::%arg-1%::Bold} is true:
  1077. execute console command "/bold UHC%arg-1%"
  1078. if {teamColor::%arg-1%::Underline} is true:
  1079. execute console command "/underline UHC%arg-1%"
  1080. if {teamColor::%arg-1%::Strikethrough} is true:
  1081. execute console command "/strikethrough UHC%arg-1%"
  1082. if {teamColor::%arg-1%::Italic} is true:
  1083. execute console command "/italic UHC%arg-1%"
  1084.  
  1085.  
  1086.  
  1087. command /pm <text>:
  1088. trigger:
  1089. if {Teams.InTeam::%player%} is not set:
  1090. send "{@C}----------------------------------------------"
  1091. send "{@T}{@C2} You are not on a team!"
  1092. send "{@C}----------------------------------------------"
  1093. stop
  1094. if {TeamMuted::%player%} is set:
  1095. send "{@C}----------------------------------------------"
  1096. send "{@T}{@C2} You're muted in team chat!"
  1097. send "{@C}----------------------------------------------"
  1098. else if {PMDISABLED} is set:
  1099. send "{@C}----------------------------------------------"
  1100. send "{@T}{@C2} Team chat is currently disabled!"
  1101. send "{@C}----------------------------------------------"
  1102. else:
  1103. delete {_sendTo::*}
  1104. loop {CanViewAllPM::*}:
  1105. ("%loop-value%" parsed as offline player) has permission "{@PERM}"
  1106. set {_sendTo::%loop-value%} to loop-value
  1107. loop {CanViewPM::%{TeamNumber::%player%}%::*}:
  1108. ("%loop-value%" parsed as offline player) has permission "{@PERM}"
  1109. set {_sendTo::%loop-value%} to loop-value
  1110. loop {Team.%{TeamNumber::%player%}%::*}:
  1111. set {_sendTo::%loop-value%} to loop-value
  1112. loop {_sendTo::*}:
  1113. message "{@TC} {@TC1}%player%: {@TC2}%arg-1%" to ("%loop-value%" parsed as offlineplayer)
  1114. delete {_sendTo::*}
  1115. command /pmcoords:
  1116. aliases: /pmc
  1117. trigger:
  1118. if {Teams.InTeam::%player%} is not set:
  1119. send "{@C}----------------------------------------------"
  1120. send "{@T}{@C2} You are not on a team!"
  1121. send "{@C}----------------------------------------------"
  1122. stop
  1123. if {TeamMuted::%player%} is set:
  1124. send "{@C}----------------------------------------------"
  1125. send "{@T}{@C2} You're muted in team chat!"
  1126. send "{@C}----------------------------------------------"
  1127. else if {PMDISABLED} is set:
  1128. send "{@C}----------------------------------------------"
  1129. send "{@T}{@C2} Team chat is currently disabled!"
  1130. send "{@C}----------------------------------------------"
  1131. else:
  1132. delete {_sendTo::*}
  1133. loop {CanViewAllPM::*}:
  1134. ("%loop-value%" parsed as offline player) has permission "{@PERM}"
  1135. set {_sendTo::%loop-value%} to loop-value
  1136. loop {CanViewPM::%{TeamNumber::%player%}%::*}:
  1137. ("%loop-value%" parsed as offline player) has permission "{@PERM}"
  1138. set {_sendTo::%loop-value%} to loop-value
  1139. loop {Team.%{TeamNumber::%player%}%::*}:
  1140. set {_sendTo::%loop-value%} to loop-value
  1141. loop {_sendTo::*}:
  1142. message "{@TC} {@TC1}%player%&7 {@TC2}is at {@TC1}%(player's location)%" to ("%loop-value%" parsed as offlineplayer)
  1143.  
  1144. command /pmores:
  1145. trigger:
  1146. if {Teams.InTeam::%player%} is not set:
  1147. send "{@C}----------------------------------------------"
  1148. send "{@T}{@C2} You are not on a team!"
  1149. send "{@C}----------------------------------------------"
  1150. stop
  1151. if {TeamMuted::%player%} is set:
  1152. send "{@C}----------------------------------------------"
  1153. send "{@T}{@C2} You're muted in team chat!"
  1154. send "{@C}----------------------------------------------"
  1155. else if {PMDISABLED} is set:
  1156. send "{@C}----------------------------------------------"
  1157. send "{@T}{@C2} Team chat is currently disabled!"
  1158. send "{@C}----------------------------------------------"
  1159. else:
  1160. delete {_sendTo::*}
  1161. loop {CanViewAllPM::*}:
  1162. ("%loop-value%" parsed as offline player) has permission "{@PERM}"
  1163. set {_sendTo::%loop-value%} to loop-value
  1164. loop {CanViewPM::%{TeamNumber::%player%}%::*}:
  1165. ("%loop-value%" parsed as offline player) has permission "{@PERM}"
  1166. set {_sendTo::%loop-value%} to loop-value
  1167. loop {Team.%{TeamNumber::%player%}%::*}:
  1168. set {_sendTo::%loop-value%} to loop-value
  1169. loop {_sendTo::*}:
  1170. message "{@TC}{@TC1} %player% {@TC2}has {@TC1}%((amount of iron ore in player's inventory) + (amount of iron ingot in player's inventory))% {@TC2}iron, {@TC1}%((amount of gold ore in player's inventory) + (amount of gold ingot in player's inventory))% {@TC2}gold, and {@TC1}%((amount of diamond ore in player's inventory) + (amount of diamond in player's inventory))% {@TC2}diamonds." to ("%loop-value%" parsed as offlineplayer)
  1171. command /dontrandomize <text>:
  1172. usage: /dontrandomize <player/list>
  1173. permission: {@PERM}
  1174. trigger:
  1175. if arg-1 is "list":
  1176. if (size of {dontrandomize::*}) is not 0:
  1177. send "{@C}----------------------------------------------"
  1178. send "{@T}{@C2} &lNot Randomizing:"
  1179. loop {dontrandomize::*}:
  1180. send "{@T}{@C} %loop-value%"
  1181. send "{@C}----------------------------------------------"
  1182. else:
  1183. send "{@C}----------------------------------------------"
  1184. send "{@T}{@C2} No players will not be not randomized!"
  1185. send "{@T}{@C2} Type {@C}/dontrandomize <player> {@C2}to not randomize a player!"
  1186. send "{@C}----------------------------------------------"
  1187. else:
  1188. set {dontrandomize::%arg-1%} to arg-1
  1189. send "{@C}----------------------------------------------"
  1190. send "{@T}{@C} %arg-1% {@C2} will not be randomized!"
  1191. send "{@T}{@C2} To undo this, type {@C}/dorandomize %arg-1%{@C2}!"
  1192. send "{@C}----------------------------------------------"
  1193.  
  1194. command /dorandomize <player>:
  1195. permission: {@PERM}
  1196. trigger:
  1197. delete {dontrandomize::%arg-1%}
  1198. send "{@C}----------------------------------------------"
  1199. send "{@T}{@C} %arg-1% {@C2}will be randomized!"
  1200. send "{@C}----------------------------------------------"
  1201.  
  1202.  
  1203.  
  1204. command /tc <player> <player> [<player>] [<player>] [<player>] [<player>] [<player>] [<player>] [<player>] [<player>] [<player>]:
  1205. aliases: /ct
  1206. permission: {@PERM}
  1207. trigger:
  1208. set {teamhighest} to (({teamhighest}) + 1)
  1209. set {Teams::%{teamhighest}%} to {teamhighest}
  1210. command "/scoreboard teams add UHC%{teamhighest}%"
  1211. if {teamfriendlyfire} is set:
  1212. command "/scoreboard teams option UHC%{teamhighest}% friendlyfire false"
  1213. send "{@C}----------------------------------------------"
  1214. send "{@T}{@C2} Team {@C}%{teamhighest}% {@C2}Created!"
  1215. send "{@C}----------------------------------------------"
  1216. delete {tcARGS::*}
  1217. set {tcARGS::%arg-1%} to arg-1
  1218. set {tcARGS::%arg-2%} to arg-2
  1219. set {tcARGS::%arg-3%} to arg-3
  1220. set {tcARGS::%arg-4%} to arg-4
  1221. set {tcARGS::%arg-5%} to arg-5
  1222. set {tcARGS::%arg-6%} to arg-6
  1223. set {tcARGS::%arg-7%} to arg-7
  1224. set {tcARGS::%arg-8%} to arg-8
  1225. set {tcARGS::%arg-9%} to arg-9
  1226. set {tcARGS::%arg-10%} to arg-10
  1227. loop {tcARGS::*}:
  1228. if {Teams.InTeam::%loop-value%} is set:
  1229. command "/scoreboard teams leave %loop-value%"
  1230. if (size of {Team.%{TeamNumber::%loop-value%}%::*} - 1) is less than 2:
  1231. {ninjateamsautodelete} is not set
  1232. command "/team resetcolor %{TeamNumber::%loop-value%}%"
  1233. loop {Team.%{TeamNumber::%loop-value%}%::*}:
  1234. command "/scoreboard teams leave %loop-value-2%"
  1235. delete {Teams::%{TeamNumber::%loop-value-2%}%}
  1236. delete {Teams.InTeam::%loop-value-2%}
  1237. delete {Team.%{TeamNumber::%loop-value-2%}%::%loop-value-2%}
  1238. delete {TeamNumber::%loop-value-2%}
  1239. delete {Team.%{TeamNumber::%loop-value%}%::%loop-value%}
  1240. loop all players:
  1241. delete {pendingteam::%loop-player%::loop-value-1}
  1242. set {Teams.InTeam::%loop-value%} to true
  1243. set {Team.%{teamhighest}%::%loop-value%} to loop-value
  1244. set {TeamNumber::%loop-value%} to {teamhighest}
  1245. if {ninjateams.dontautocolor} is not set:
  1246. command "/colorteam %{teamhighest}%"
  1247. command "/scoreboard teams join UHC%{teamhighest}% %loop-value%"
  1248. send "{@C}----------------------------------------------" to ("%loop-value%" parsed as offline player)
  1249. send "{@T}{@C2} You have joined team {@C}%{teamhighest}%{@C2}!" to ("%loop-value%" parsed as offline player)
  1250. send "{@C}----------------------------------------------" to ("%loop-value%" parsed as offline player)
  1251.  
  1252.  
  1253. on death of player:
  1254. {ninjateamsdeathkick} is set
  1255. {Teams.InTeam::%victim%} is set
  1256. wait 1 second
  1257. command "/scoreboard teams leave %victim%"
  1258. if (size of {Team.%{TeamNumber::%victim%}%::*} - 1) is less than 2:
  1259. {ninjateamsautodelete} is not set
  1260. execute console command "/team resetcolor %{TeamNumber::%victim%}%"
  1261. delete {Teams::%{TeamNumber::%victim%}%}
  1262. loop {Team.%{TeamNumber::%victim%}%::*}:
  1263. command "/scoreboard teams leave %loop-value%"
  1264. delete {Teams.InTeam::%loop-value%}
  1265. delete {Team.%{TeamNumber::%victim%}%::%loop-value%}
  1266. delete {TeamNumber::%loop-value%}
  1267. command "/scoreboard teams leave %victim%"
  1268. delete {Teams.InTeam::%victim%}
  1269. delete {Team.%{TeamNumber::%victim%}%::%victim%}
  1270. delete {TeamNumber::%victim%}
  1271.  
  1272.  
  1273. command /checkteam <offline player>:
  1274. permission: {@PERM}
  1275. trigger:
  1276. if {Teams.InTeam::%arg-1%} is set:
  1277. send "{@C}----------------------------------------------"
  1278. send "{@T}{@C2} Player: {@C}%arg-1%"
  1279. send "{@T}{@C2} Team Number: {@C}%{TeamNumber::%arg-1%}%"
  1280. send "{@T}{@C2} Team Size: {@C}%(size of {Team.%{TeamNumber::%arg-1%}%::*})%"
  1281. send "{@T}{@C2} Players on Team: {@C}%{Team.%{TeamNumber::%arg-1%}%::*}%"
  1282. send "{@C}----------------------------------------------"
  1283. else:
  1284. send "{@C}----------------------------------------------"
  1285. send "{@T}{@C2} That player is not on a team!"
  1286. send "{@C}----------------------------------------------"
Advertisement
Add Comment
Please, Sign In to add comment