Guest User

Untitled

a guest
Aug 10th, 2018
566
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 82.17 KB | None | 0 0
  1. # Dancing's Team Manager V1.3.4
  2. # Report Bugs to /u/DancingNinjas
  3.  
  4. options:
  5. T: &8[&7Teams&8]
  6. C: &8 # <------ Important Text Color
  7. C2: &7 # <----- Text Color
  8. PERM: manage.teams
  9. TC: &8[&7TeamChat&8]&7
  10. TC1: &8 #<------ Team Chat Important Text Color
  11. TC2: &7 #<------ Team Chat Text Color
  12.  
  13. command /team [<text>] [<text>] [<text>]:
  14. trigger:
  15. if arg-1 is not set:
  16. send "{@C}----------------------------------------------"
  17. send "{@T}{@C2} &lTeam Commands"
  18. send "{@T}{@C2} /team invite <player>"
  19. send "{@T}{@C2} /team accept <player>"
  20. send "{@T}{@C2} /team leave"
  21. send "{@T}{@C2} /team list"
  22. send "{@T}{@C2} /pm <message>"
  23. send "{@T}{@C2} /pmcoords"
  24. send "{@T}{@C2} /pmores"
  25. send "{@C}----------------------------------------------"
  26. if player has permission "{@PERM}":
  27. send "{@T}{@C2} &lAdmin Commands"
  28. send "{@T}{@C2} /team broadcast"
  29. send "{@T}{@C2} /team setsize <integer>"
  30. send "{@T}{@C2} /team create"
  31. send "{@T}{@C2} /tc <player> [<player>] [<player>] [<player>] [<player>]"
  32. send "{@T}{@C2} /team set <player> <team>"
  33. send "{@T}{@C2} /team lock/unlock"
  34. send "{@T}{@C2} /team kick <player>"
  35. send "{@T}{@C2} /team reset"
  36. send "{@T}{@C2} /team removeempty"
  37. send "{@T}{@C2} /team hidelist"
  38. send "{@T}{@C2} /team unhidelist"
  39. send "{@T}{@C2} /team deathkick <on/off>"
  40. send "{@T}{@C2} /team autodelete <on/off>"
  41. send "{@T}{@C2} /team autocolor <on/off>"
  42. send "{@T}{@C2} /team friendlyfire <on/off>"
  43. send "{@T}{@C2} /dontrandomize <player/list>"
  44. send "{@T}{@C2} /team randomize <team size>"
  45. send "{@T}{@C2} /team redvsblue [<number of teams>]"
  46. send "{@T}{@C2} /team doubledates [<ignorenumber>]"
  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.%{Teams.InTeam::%arg-2%}%::*}) is less than {teamsize}:
  100. set {Team.%{Teams.InTeam::%arg-2%}%::%player%} to player
  101. set {Teams.InTeam::%player%} to {Teams.InTeam::%arg-2%}
  102. command "/scoreboard teams join UHC%{Teams.InTeam::%arg-2%}% %player%"
  103. delete {pendingteam::%arg-2%::%player%}
  104. loop {Team.%{Teams.InTeam::%arg-2%}%::*}:
  105. if "%loop-value%" is not "%player%":
  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}%{Teams.InTeam::%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 {findteamnumber} to 1
  118. set {findingteamnumber} to true
  119. while {findingteamnumber} is true:
  120. if {Teams::%{findteamnumber}%} is not set:
  121. delete {findingteamnumber}
  122. else:
  123. add 1 to {findteamnumber}
  124.  
  125. set {Team.%{findteamnumber}%::%player%} to player
  126. set {Team.%{findteamnumber}%::%arg-2%} to arg-2
  127. set {Teams::%{findteamnumber}%} to {findteamnumber}
  128. command "/scoreboard teams add UHC%{findteamnumber}%"
  129. if {teamfriendlyfire} is set:
  130. command "/scoreboard teams option UHC%{findteamnumber}% friendlyfire false"
  131. set {Teams.InTeam::%player%} to {findteamnumber}
  132. set {Teams.InTeam::%arg-2%} to {findteamnumber}
  133. delete {pendingteam::%arg-2%::%player%}
  134. command "/scoreboard teams join UHC%{findteamnumber}% %player%"
  135. command "/scoreboard teams join UHC%{findteamnumber}% %arg-2%"
  136. send "{@C}----------------------------------------------------" to ("%arg-2%" parsed as offline player)
  137. send "{@T} {@C}%player% {@C2}has joined your team!" to ("%arg-2%" parsed as offline player)
  138. send "{@C}----------------------------------------------------" to ("%arg-2%" parsed as offline player)
  139. send "{@C}----------------------------------------------------"
  140. send "{@T}{@C2} You have joined team {@C}%{Teams.InTeam::%player%}%{@C2}!"
  141. send "{@C}----------------------------------------------------"
  142. if {ninjateams.dontautocolor} is not set:
  143. command "/colorteam %{Teams.InTeam::%player%}%"
  144. else:
  145. send "{@C}----------------------------------------------------"
  146. send "{@T}{@C2} You are already on a team!"
  147. send "{@T}{@C2} Type {@C}/team leave {@C2}to leave!"
  148. send "{@C}----------------------------------------------------"
  149. else:
  150. send "{@C}----------------------------------------------------"
  151. send "{@T}{@C2} That player did not invite you to his/her team!"
  152. send "{@C}----------------------------------------------------"
  153. else:
  154. send "{@C}----------------------------------------------------"
  155. send "{@T}{@C2} Teams are locked!"
  156. send "{@C}----------------------------------------------------"
  157.  
  158.  
  159.  
  160. else if arg-1 is "leave":
  161. if {Teams.InTeam::%player%} is not set:
  162. command sender is a player
  163. send "{@C}----------------------------------------------------"
  164. send "{@T}{@C2} You're not on a team, silly!"
  165. send "{@C}----------------------------------------------------"
  166. stop
  167. if {teamslocked} is not set:
  168. command "/scoreboard teams leave %player%"
  169. if (size of {Team.%{Teams.InTeam::%player%}%::*} - 1) is less than 2:
  170. {ninjateamsautodelete} is not set
  171. command "/team resetcolor %{Teams.InTeam::%player%}%"
  172. loop {Team.%{Teams.InTeam::%player%}%::*}:
  173. command "/scoreboard teams leave %loop-value%"
  174. delete {Teams::%{Teams.InTeam::%loop-value%}%}
  175. delete {Team.%{Teams.InTeam::%loop-value%}%::%loop-value%}
  176. delete {Teams.InTeam::%loop-value%}
  177. command "/scoreboard teams leave %player%"
  178. delete {Team.%{Teams.InTeam::%player%}%::%player%}
  179. delete {Teams.InTeam::%player%}
  180. send "{@C}----------------------------------------------------"
  181. send "{@T}{@C2} You have left your team!"
  182. send "{@C}----------------------------------------------------"
  183. else:
  184. send "{@C}----------------------------------------------------"
  185. send "{@T}{@C2} Teams are locked!"
  186. send "{@C}----------------------------------------------------"
  187. else if arg-1 is "list":
  188. if {ninjateamshidelist} is set:
  189. if player does not have permission "{@PERM}":
  190. send "{@C}----------------------------------------------------"
  191. send "{@T}{@C2} Teams are currently hidden!"
  192. send "{@C}----------------------------------------------------"
  193. stop
  194. else if (size of {Teams::*}) is not 0:
  195. send "{@C}----------------------------------------------------"
  196. send "{@C2}&lTeams"
  197. loop {Teams::*}:
  198. if {TeamColor::%loop-value%::Reference} is set:
  199. set {_saveteammembers} to "%{Team.%loop-value%::*}%"
  200. send "{@C2}&l %loop-value% {@C2}: %{TeamColor::%loop-value%::Reference}%%{_saveteammembers}%"
  201.  
  202. else:
  203. send "{@C2}&l %loop-value% :&f %{Team.%loop-value%::*}%"
  204. send "{@C}----------------------------------------------------"
  205. else if (size of {Teams::*}) is not 0:
  206. send "{@C}----------------------------------------------------"
  207. send "{@C2}&lTeams"
  208. loop {Teams::*}:
  209. if {TeamColor::%loop-value%::Reference} is set:
  210. set {_saveteammembers} to "%{Team.%loop-value%::*}%"
  211. send "{@C2}&l %loop-value% {@C2}: %{TeamColor::%loop-value%::Reference}%%{_saveteammembers}%"
  212.  
  213. else:
  214. send "{@C2}&l %loop-value% :&f %{Team.%loop-value%::*}%"
  215. send "{@C}----------------------------------------------------"
  216.  
  217. else:
  218. send "{@C}----------------------------------------------------"
  219. send "{@T}{@C2} No teams are set!"
  220. send "{@C}----------------------------------------------------"
  221. else if arg-1 is "reset":
  222. if command sender is a player:
  223. if player does not have permission "{@PERM}":
  224. send "{@C}----------------------------------------------"
  225. send "{@T}{@C2} You do not have permission to do that!"
  226. send "{@C}----------------------------------------------"
  227. stop
  228. delete {pendingteam::*}
  229. loop {Teams::*}:
  230. command "/scoreboard teams remove UHC%loop-value%"
  231. delete {Team.%loop-value%::*}
  232. delete {Teams.InTeam::*}
  233. delete {Teams::*}
  234. delete {allTheColors}
  235. delete {teamColor::*}
  236. delete {randomizing::*}
  237. delete {dontrandomize::*}
  238. delete {findteamnumber}
  239. delete {ninjateamsdeathkick}
  240. delete {UsingUsedColors::*}
  241. delete {TeamMuted::*}
  242. delete {CanViewPM::*}
  243. delete {CanViewAllPM::*}
  244.  
  245. 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"
  246. 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"
  247. 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"
  248. 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"
  249. 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"
  250. 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"
  251. 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"
  252. 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"
  253. 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"
  254. 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"
  255. 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"
  256. 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"
  257. 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"
  258. 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"
  259. set {allColorsUnderlineStrikethroughItalic::*} 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"
  260. 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"
  261. 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"
  262.  
  263.  
  264. send "{@C}----------------------------------------------------"
  265. send "{@T}{@C2} Teams Reset!"
  266. send "{@C}----------------------------------------------------"
  267. else if arg-1 is "set":
  268. if command sender is a player:
  269. if player does not have permission "{@PERM}":
  270. send "{@C}----------------------------------------------"
  271. send "{@T}{@C2} You do not have permission to do that!"
  272. send "{@C}----------------------------------------------"
  273. stop
  274. # If arg-3 is a valid team
  275. if {Teams::%arg-3%} is set:
  276.  
  277. if (size of {Team.%{Teams.InTeam::%arg-2%}%::*} - 1) is less than 2:
  278. {ninjateamsautodelete} is not set
  279. command "/team resetcolor %{Teams.InTeam::%arg-2%}%"
  280. loop {Team.%{Teams.InTeam::%arg-2%}%::*}:
  281. command "/scoreboard teams leave %loop-value%"
  282. delete {Teams::%{Teams.InTeam::%loop-value%}%}
  283. delete {Team.%{Teams.InTeam::%loop-value%}%::%loop-value%}
  284. delete {Teams.InTeam::%loop-value%}
  285.  
  286.  
  287. command "/scoreboard teams leave %arg-2%"
  288. delete {Team.%{Teams.InTeam::%arg-2%}%::%arg-2%}
  289. set {Teams.InTeam::%arg-2%} to arg-3
  290. set {Team.%arg-3%::%arg-2%} to arg-2
  291. loop all players:
  292. delete {pendingteam::%loop-player%::arg-2}
  293. command "/scoreboard teams join UHC%arg-3% %arg-2%"
  294. send "{@C}----------------------------------------------" to ("%arg-2%" parsed as offline player)
  295. send "{@T}{@C2} You have been added to team {@C}%arg-3%{@C2}!" to ("%arg-2%" parsed as offline player)
  296. send "{@C}----------------------------------------------" to ("%arg-2%" parsed as offline player)
  297. send "{@C}----------------------------------------------" to player
  298. send "{@T}{@C2} You set {@C}%arg-2% {@C2}to team {@C}%arg-3%{@C2}!" to player
  299. send "{@C}----------------------------------------------" to player
  300. else if {Teams.InTeam::%arg-3%} is set:
  301. if (size of {Team.%{Teams.InTeam::%arg-2%}%::*} - 1) is less than 2:
  302. {ninjateamsautodelete} is not set
  303. command "/team resetcolor %{Teams.InTeam::%arg-2%}%"
  304. loop {Team.%{Teams.InTeam::%arg-2%}%::*}:
  305. command "/scoreboard teams leave %loop-value%"
  306. delete {Teams::%{Teams.InTeam::%loop-value%}%}
  307. delete {Team.%{Teams.InTeam::%loop-value%}%::%loop-value%}
  308. delete {Teams.InTeam::%loop-value%}
  309.  
  310. command "/scoreboard teams leave %arg-2%"
  311. delete {Team.%{Teams.InTeam::%arg-2%}%::%arg-2%}
  312. set {Teams.InTeam::%arg-2%} to {Teams.InTeam::%arg-3%}
  313. set {Team.%{Teams.InTeam::%arg-3%}%::%arg-2%} to arg-2
  314. loop all players:
  315. delete {pendingteam::%loop-player%::arg-2}
  316. command "/scoreboard teams join UHC%{Teams.InTeam::%arg-3%}% %arg-2%"
  317. send "{@C}----------------------------------------------" to ("%arg-2%" parsed as offline player)
  318. send "{@T}{@C2} You have been added to team {@C}%{Teams.InTeam::%arg-3%}%{@C2}!" to ("%arg-2%" parsed as offline player)
  319. send "{@C}----------------------------------------------" to ("%arg-2%" parsed as offline player)
  320. send "{@C}----------------------------------------------" to player
  321. send "{@T}{@C2} You set {@C}%arg-2% {@C2}to {@C}%arg-3%{@C2}'s team!" to player
  322. send "{@C}----------------------------------------------" to player
  323.  
  324. else:
  325. arg-3 is set
  326. command "/ct %arg-2% %arg-3%"
  327. send "{@C}----------------------------------------------" to player
  328. send "{@T}{@C2} You set {@C}%arg-2% {@C2}to {@C}%arg-3%{@C2}'s team!" to player
  329. send "{@C}----------------------------------------------" to player
  330.  
  331. else if arg-1 is "create":
  332. if command sender is a player:
  333. if player does not have permission "{@PERM}":
  334. send "{@C}----------------------------------------------------"
  335. send "{@T}{@C2} Insufficient Permissions. This is an a staff command."
  336. send "{@T}{@C2} Use to {@C}/team invite {@C2}to create a team automatically!"
  337. send "{@C}----------------------------------------------------"
  338. stop
  339. set {findteamnumber} to 1
  340. set {findingteamnumber} to true
  341. while {findingteamnumber} is true:
  342. if {Teams::%{findteamnumber}%} is not set:
  343. delete {findingteamnumber}
  344. else:
  345. add 1 to {findteamnumber}
  346. set {Teams::%{findteamnumber}%} to {findteamnumber}
  347. command "/scoreboard teams add UHC%{findteamnumber}%"
  348. if {teamfriendlyfire} is set:
  349. command "/scoreboard teams option UHC%{findteamnumber}% friendlyfire false"
  350. if {ninjateams.dontautocolor} is not set:
  351. command "/colorteam %{findteamnumber}%"
  352. send "{@T}{@C2} Team {@C}%{findteamnumber}% {@C2}Created!"
  353. else if arg-1 is "lock":
  354. if command sender is a player:
  355. if player does not have permission "{@PERM}":
  356. send "{@C}----------------------------------------------"
  357. send "{@T}{@C2} You do not have permission to do that!"
  358. send "{@C}----------------------------------------------"
  359. stop
  360. set {teamslocked} to true
  361. send "{@C}----------------------------------------------"
  362. send "{@T}{@C2} Teams Locked!"
  363. send "{@C}----------------------------------------------"
  364. else if arg-1 is "unlock":
  365. if command sender is a player:
  366. if player does not have permission "{@PERM}":
  367. send "{@C}----------------------------------------------"
  368. send "{@T}{@C2} You do not have permission to do that!"
  369. send "{@C}----------------------------------------------"
  370. stop
  371. delete {teamslocked}
  372. send "{@C}----------------------------------------------"
  373. send "{@T}{@C2} Teams Unlocked!"
  374. send "{@C}----------------------------------------------"
  375. else if arg-1 is "autocolor":
  376. if command sender is a player:
  377. if player does not have permission "{@PERM}":
  378. send "{@C}----------------------------------------------"
  379. send "{@T}{@C2} You do not have permission to do that!"
  380. send "{@C}----------------------------------------------"
  381. stop
  382. if arg-2 is "on":
  383. delete {ninjateams.dontautocolor}
  384. send "{@C}----------------------------------------------"
  385. send "{@T}{@C2} Auto-Coloring Enabled!"
  386. send "{@C}----------------------------------------------"
  387. else if arg-2 is "off":
  388. set {ninjateams.dontautocolor} to true
  389. send "{@C}----------------------------------------------"
  390. send "{@T}{@C2} Auto-Coloring Disabled!"
  391. send "{@C}----------------------------------------------"
  392. else if arg-1 is "kick":
  393. if command sender is a player:
  394. if player does not have permission "{@PERM}":
  395. send "{@C}----------------------------------------------"
  396. send "{@T}{@C2} You do not have permission to do that!"
  397. send "{@C}----------------------------------------------"
  398. stop
  399. command "/scoreboard teams leave %arg-2%"
  400. if (size of {Team.%{Teams.InTeam::%arg-2%}%::*} - 1) is less than 2:
  401. {ninjateamsautodelete} is not set
  402. command "/team resetcolor %{Teams.InTeam::%arg-2%}%"
  403. loop {Team.%{Teams.InTeam::%arg-2%}%::*}:
  404. command "/scoreboard teams leave %loop-value%"
  405. delete {Teams::%{Teams.InTeam::%loop-value%}%}
  406. delete {Team.%{Teams.InTeam::%loop-value%}%::%loop-value%}
  407. delete {Teams.InTeam::%loop-value%}
  408. command "/scoreboard teams leave %arg-2%"
  409. delete {Team.%{Teams.InTeam::%arg-2%}%::%arg-2%}
  410. delete {Teams.InTeam::%arg-2%}
  411. send "{@C}----------------------------------------------------"
  412. send "{@T}{@C} %arg-2% {@C2}has been kicked from his/her team!"
  413. send "{@C}----------------------------------------------------"
  414. send "{@C}----------------------------------------------------" to ("%arg-2%" parsed as offline player)
  415. send "{@T}{@C2} You were removed from your team." to ("%arg-2%" parsed as offline player)
  416. send "{@C}----------------------------------------------------" to ("%arg-2%" parsed as offline player)
  417.  
  418. else if arg-1 is "setsize":
  419. if command sender is a player:
  420. if player does not have permission "{@PERM}":
  421. send "{@C}----------------------------------------------"
  422. send "{@T}{@C2} You do not have permission to do that!"
  423. send "{@C}----------------------------------------------"
  424. stop
  425. if ("%arg-2%" parsed as integer) is less than 2:
  426. send "{@C}----------------------------------------------"
  427. send "{@T}{@C2} Teams must be at least 2 in size!"
  428. send "{@C}----------------------------------------------"
  429. stop
  430. set {teamsize} to ("%arg-2%" parsed as integer)
  431. send "{@C}----------------------------------------------"
  432. send "{@T}{@C2} Team size set to {@C}%{teamsize}%{@C2}!"
  433. send "{@C}----------------------------------------------"
  434.  
  435. else if arg-1 is "randomize":
  436.  
  437.  
  438. if command sender is a player:
  439. if player does not have permission "{@PERM}":
  440. send "{@C}----------------------------------------------"
  441. send "{@T}{@C2} You do not have permission to do that!"
  442. send "{@C}----------------------------------------------"
  443. stop
  444. delete {randomizing::*}
  445. send "{@C}-----------------------------------------------------"
  446. send "{@T}{@C2} Randomizing Teams of {@C}%arg-2%{@C2}..."
  447. send "{@C}-----------------------------------------------------"
  448. loop all players:
  449. if {dontrandomize::%loop-player%} is not set:
  450. if {Teams.InTeam::%loop-player%} is not set:
  451. set {randomizing::%loop-player%} to loop-player
  452. set {_teamsize} to ("%arg-2%" parsed as integer)
  453. set {findteamnumber} to 1
  454. set {findingteamnumber} to true
  455. while {findingteamnumber} is true:
  456. if {Teams::%{findteamnumber}%} is not set:
  457. delete {findingteamnumber}
  458. else:
  459. add 1 to {findteamnumber}
  460. # Individually add each player to a random team
  461. loop (size of {randomizing::*}) times:
  462. if {Teams::%{findteamnumber}%} is not set:
  463. set {Teams::%{findteamnumber}%} to {findteamnumber}
  464. command "/scoreboard teams add UHC%{findteamnumber}%"
  465. if {teamfriendlyfire} is set:
  466. command "/scoreboard teams option UHC%{findteamnumber}% friendlyfire false"
  467. if {ninjateams.dontautocolor} is not set:
  468. command "/colorteam %{findteamnumber}%"
  469. set {_randomplayer} to (random element of {randomizing::*})
  470. if (size of {Team.%{findteamnumber}%::*}) is less than {_teamsize}:
  471. set {Teams.InTeam::%{_randomplayer}%} to {findteamnumber}
  472. set {Team.%{findteamnumber}%::%{_randomplayer}%} to {_randomplayer}
  473. message "{@C}-----------------------------------------------------" to {_randomplayer}
  474. message "{@T}{@C2} You are now on team {@C}%{findteamnumber}%&7." to {_randomplayer}
  475. message "{@C}-----------------------------------------------------" to {_randomplayer}
  476. execute console command "/scoreboard teams join UHC%{findteamnumber}% %{_randomplayer}%"
  477. delete {randomizing::%{_randomplayer}%}
  478. if (size of {Team.%{findteamnumber}%::*}) is {_teamsize}:
  479. set {findteamnumber} to 1
  480. set {findingteamnumber} to true
  481. while {findingteamnumber} is true:
  482. if {Teams::%{findteamnumber}%} is not set:
  483. delete {findingteamnumber}
  484. else:
  485. add 1 to {findteamnumber}
  486.  
  487.  
  488. else if arg-1 is "broadcast" or "br":
  489. if command sender is a player:
  490. if player does not have permission "{@PERM}":
  491. send "{@C}----------------------------------------------"
  492. send "{@T}{@C2} You do not have permission to do that!"
  493. send "{@C}----------------------------------------------"
  494. stop
  495. broadcast "{@C}-----------------------------------------------------"
  496. broadcast "{@T}{@C2} &lTeam Setup"
  497. broadcast "{@T}{@C2} /team invite <player>"
  498. broadcast "{@T}{@C2} /team accept <player>"
  499. broadcast "{@C}-----------------------------------------------------"
  500.  
  501. else if arg-1 is "removeempty":
  502. if command sender is a player:
  503. if player does not have permission "{@PERM}":
  504. send "{@C}----------------------------------------------"
  505. send "{@T}{@C2} You do not have permission to do that!"
  506. send "{@C}----------------------------------------------"
  507. stop
  508. loop {Teams::*}:
  509. if (size of {Team.%loop-value%::*}) is 0:
  510. command "/team resetcolor %loop-value%"
  511. delete {Team.%loop-value%::*}
  512. delete {Teams::%loop-value%}
  513. send "{@C}----------------------------------------------"
  514. send "{@T}{@C2} Empty Teams Removed!"
  515. send "{@C}----------------------------------------------"
  516. else if arg-1 is "deathkick":
  517. if command sender is a player:
  518. if player does not have permission "{@PERM}":
  519. send "{@C}----------------------------------------------"
  520. send "{@T}{@C2} You do not have permission to do that!"
  521. send "{@C}----------------------------------------------"
  522. stop
  523. if arg-2 is "on" or "enable":
  524. send "{@C}----------------------------------------------"
  525. send "{@T}{@C2} Team Death-Kick Enabled!"
  526. send "{@C}----------------------------------------------"
  527. set {ninjateamsdeathkick} to true #Should I make it so this variable is deleted when teams are reset?
  528. else if arg-2 is "off" or "disable":
  529. send "{@C}----------------------------------------------"
  530. send "{@T}{@C2} Team Death-Kick Disabled!"
  531. send "{@C}----------------------------------------------"
  532. delete {ninjateamsdeathkick}
  533.  
  534. else if arg-1 is "resetcolor":
  535. arg-2 is set
  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. if arg-2 is "all":
  543. loop {Teams::*}:
  544. command "/team resetcolor %loop-value%"
  545. send "{@C}----------------------------------------------"
  546. send "{@T}{@C2} All team colors have been reset!"
  547. send "{@C}----------------------------------------------"
  548. if {teamColor::%arg-2%::Color} is set:
  549. send "{@C}----------------------------------------------"
  550. send "{@T}{@C2} Color for team {@C}%arg-2% {@C2}has been reset!"
  551. send "{@C}----------------------------------------------"
  552. if {UsingUsedColors::%arg-2%} is not set:
  553. #Backward form of color checking to add the color back to the correct list variable
  554.  
  555. if {teamColor::%arg-2%::bold} and {teamColor::%arg-2%::underline} and {teamColor::%arg-2%::strikethrough} and {teamColor::%arg-2%::italic} is set:
  556. add "%{teamColor::%arg-2%::Color}%" to {allColorsBoldUnderlineStrikethroughItalic::*}
  557.  
  558. else if {teamColor::%arg-2%::bold} and {teamColor::%arg-2%::underline} and {teamColor::%arg-2%::strikethrough} is set:
  559. add "%{teamColor::%arg-2%::Color}%" to {allColorsBoldUnderlineStrikethrough::*}
  560.  
  561. else if {teamColor::%arg-2%::bold} and {teamColor::%arg-2%::underline} and {teamColor::%arg-2%::italic} is set:
  562. add "%{teamColor::%arg-2%::Color}%" to {allColorsBoldUnderlineItalic::*}
  563.  
  564. else if {teamColor::%arg-2%::bold} and {teamColor::%arg-2%::underline} is set:
  565. add "%{teamColor::%arg-2%::Color}%" to {allColorsBoldUnderline::*}
  566.  
  567. else if {teamColor::%arg-2%::bold} and {teamColor::%arg-2%::strikethrough} is set:
  568. add "%{teamColor::%arg-2%::Color}%" to {allColorsBoldStrikethrough::*}
  569.  
  570. else if {teamColor::%arg-2%::bold} and {teamColor::%arg-2%::italic} is set:
  571. add "%{teamColor::%arg-2%::Color}%" to {allColorsBoldItalic::*}
  572.  
  573. else if {teamColor::%arg-2%::bold} is set:
  574. add "%{teamColor::%arg-2%::Color}%" to {allColorsBold::*}
  575.  
  576. else if {teamColor::%arg-2%::underline} is set:
  577. add "%{teamColor::%arg-2%::Color}%" to {allColorsUnderline::*}
  578.  
  579. else if {teamColor::%arg-2%::strikethrough} is set:
  580. add "%{teamColor::%arg-2%::Color}%" to {allColorsStrikethrough::*}
  581.  
  582. else if {teamColor::%arg-2%::italic} is set:
  583. add "%{teamColor::%arg-2%::Color}%" to {allColorsItalic::*}
  584. else:
  585. add "%{teamColor::%arg-2%::Color}%" to {allColors::*}
  586.  
  587. command "/scoreboard teams option UHC%arg-2% color white"
  588. delete {teamColor::%arg-2%::*}
  589. delete {UsingUsedColors::%arg-2%}
  590.  
  591. else if arg-1 is "colorall":
  592. if command sender is a player:
  593. if player does not have permission "{@PERM}":
  594. send "{@C}----------------------------------------------"
  595. send "{@T}{@C2} You do not have permission to do that!"
  596. send "{@C}----------------------------------------------"
  597. stop
  598. loop {Teams::*}:
  599. command "/colorteam %loop-value%"
  600. send "{@C}----------------------------------------------"
  601. send "{@T}{@C2} All teams have been colored!"
  602. send "{@C}----------------------------------------------"
  603. else if arg-1 is "kickunder":
  604. if command sender is a player:
  605. if player does not have permission "{@PERM}":
  606. send "{@C}----------------------------------------------"
  607. send "{@T}{@C2} You do not have permission to do that!"
  608. send "{@C}----------------------------------------------"
  609. stop
  610. loop all players:
  611. if {Teams.InTeam::%loop-player%} is set:
  612. if (size of {Team.%{Teams.InTeam::%loop-player%}%::*}) is less than ("%arg-2%" parsed as integer):
  613. set {_saveloop} to {Teams.InTeam::%loop-player%}
  614. loop {Team.%{Teams.InTeam::%loop-player%}%::*}:
  615. command "/scoreboard teams leave %loop-value-2%"
  616. if "%loop-value-2%" parsed as offline player does not have permission "{@PERM}":
  617. kick ("%loop-value-2%" parsed as offline player) due to "{@T}{@C2} You were kicked for not having enough players on your team!"
  618. command "/whitelist remove %loop-value-2%"
  619. delete {Teams.InTeam::%loop-value-2%}
  620. delete {Teams.InTeam::%loop-value-2%}
  621. delete {Team.%{_saveloop}%::*}
  622. delete {Teams::%{_saveloop}%}
  623.  
  624. else if loop-player does not have permission "{@PERM}":
  625. kick loop-player due to "{@T}{@C2} You were kicked for not having enough players on your team!"
  626. command "/whitelist remove %loop-value%"
  627. send "{@C}----------------------------------------------"
  628. send "{@T}{@C2} Teams of less than {@C}%arg-2% {@C2}have been kicked!"
  629. send "{@C}----------------------------------------------"
  630.  
  631. else if arg-1 is "hidelist":
  632. if command sender is a player:
  633. if player does not have permission "{@PERM}":
  634. send "{@C}----------------------------------------------"
  635. send "{@T}{@C2} You do not have permission to do that!"
  636. send "{@C}----------------------------------------------"
  637. stop
  638. set {ninjateamshidelist} to true
  639. send "{@C}----------------------------------------------"
  640. send "{@T}{@C2} Players can no longer do {@C}/team list{@C2}!"
  641. send "{@T}{@C2} Type {@C}/team unhidelist{@C2} to undo this!"
  642. send "{@C}----------------------------------------------"
  643.  
  644. else if arg-1 is "unhidelist":
  645. if command sender is a player:
  646. if player does not have permission "{@PERM}":
  647. send "{@C}----------------------------------------------"
  648. send "{@T}{@C2} You do not have permission to do that!"
  649. send "{@C}----------------------------------------------"
  650. stop
  651. delete {ninjateamshidelist}
  652. send "{@C}----------------------------------------------"
  653. send "{@T}{@C2} Players can now do {@C}/team list{@C2}!"
  654. send "{@T}{@C2} Type {@C}/team hidelist{@C2} to hide the list!"
  655. send "{@C}----------------------------------------------"
  656.  
  657. else if arg-1 is "rvb" or "redvsblue":
  658. if command sender is a player:
  659. if player does not have permission "{@PERM}":
  660. send "{@C}----------------------------------------------"
  661. send "{@T}{@C2} You do not have permission to do that!"
  662. send "{@C}----------------------------------------------"
  663. stop
  664.  
  665. delete {randomizing::*}
  666. loop all players:
  667. if {dontrandomize::%loop-player%} is not set:
  668. if {Teams.InTeam::%loop-player%} is not set:
  669. set {randomizing::%loop-player%} to loop-player
  670. set {findteamnumber} to 1
  671. set {findingteamnumber} to true
  672. while {findingteamnumber} is true:
  673. if {Teams::%{findteamnumber}%} is not set:
  674. delete {findingteamnumber}
  675. else:
  676. add 1 to {findteamnumber}
  677. set {_currentnumber} to {findteamnumber}
  678. if arg-2 is set:
  679. set {_teamsize} to ceil((size of {randomizing::*}) / ("%arg-2%" parsed as integer))
  680. else:
  681. set {_teamsize} to ceil((size of {randomizing::*}) / 2)
  682. send "{@C}-----------------------------------------------------"
  683. send "{@T}{@C2} Randomizing RvB Teams of {@C}%{_teamsize}%{@C2}..."
  684. send "{@C}-----------------------------------------------------"
  685. set {_LOOPNUMBER} to 1
  686. # Individually add each player to a random team
  687. loop (size of {randomizing::*}) times:
  688. if {Teams::%{findteamnumber}%} is not set:
  689. set {Teams::%{findteamnumber}%} to {findteamnumber}
  690. command "/scoreboard teams add UHC%{findteamnumber}%"
  691. if {teamfriendlyfire} is set:
  692. command "/scoreboard teams option UHC%{findteamnumber}% friendlyfire false"
  693. if {ninjateams.dontautocolor} is not set:
  694. if {_LOOPNUMBER} is 1:
  695. command "/colorteam %{findteamnumber}% red"
  696. else if {_LOOPNUMBER} is 2:
  697. command "/colorteam %{findteamnumber}% blue"
  698. else if {_LOOPNUMBER} is 3:
  699. command "/colorteam %{findteamnumber}% yellow"
  700. else if {_LOOPNUMBER} is 4:
  701. command "/colorteam %{findteamnumber}% green"
  702. else:
  703. command "/colorteam %{findteamnumber}%"
  704. set {_LOOPNUMBER} to {_LOOPNUMBER} + 1
  705. set {_randomplayer} to (random element of {randomizing::*})
  706. if (size of {Team.%{findteamnumber}%::*}) is less than {_teamsize}:
  707. set {Teams.InTeam::%{_randomplayer}%} to {findteamnumber}
  708. set {Team.%{findteamnumber}%::%{_randomplayer}%} to {_randomplayer}
  709. message "{@C}-----------------------------------------------------" to {_randomplayer}
  710. message "{@T}{@C2} You are now on team {@C}%{findteamnumber}%&7." to {_randomplayer}
  711. message "{@C}-----------------------------------------------------" to {_randomplayer}
  712. execute console command "/scoreboard teams join UHC%{findteamnumber}% %{_randomplayer}%"
  713. delete {randomizing::%{_randomplayer}%}
  714. if (size of {Team.%{findteamnumber}%::*}) is {_teamsize}:
  715. set {findteamnumber} to 1
  716. set {findingteamnumber} to true
  717. while {findingteamnumber} is true:
  718. if {Teams::%{findteamnumber}%} is not set:
  719. delete {findingteamnumber}
  720. else:
  721. add 1 to {findteamnumber}
  722. else if arg-1 is "delete":
  723. if command sender is a player:
  724. if player does not have permission "{@PERM}":
  725. send "{@C}----------------------------------------------"
  726. send "{@T}{@C2} You do not have permission to do that!"
  727. send "{@C}----------------------------------------------"
  728. stop
  729. command "/team resetcolor %arg-2%"
  730. loop {Team.%arg-2%::*}:
  731. command "/scoreboard teams leave %loop-value%"
  732. delete {Team.%{Teams.InTeam::%loop-value%}%::%loop-value%}
  733. delete {Teams.InTeam::loop-value}
  734. delete {TeamColor::%arg-2%::*}
  735. delete {Teams::%arg-2%}
  736. delete {Team.%arg-2%::*}
  737. send "{@C}----------------------------------------------"
  738. send "{@T}{@C2} Team {@C}%arg-2% {@C2}has been deleted!"
  739. send "{@C}----------------------------------------------"
  740.  
  741. else if arg-1 is "listcolors":
  742. send "{@C}----------------------------------------------------"
  743. send "{@T}{@C2} &lColors:"
  744. send "{@T}{@C} <light aqua>aqua, <black>black, <light blue>blue, <dark aqua>dark_aqua, <dark blue>dark_blue, <dark gray>dark_gray, <dark green>dark_green, <dark purple>dark_purple, <dark red>dark_red, <gold>gold, <gray>gray, <light green>green, <light purple>light_purple, <red>red, <white>white, <yellow>yellow"
  745. send "{@C}----------------------------------------------------"
  746. else if arg-1 is "unmuteall":
  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. delete {PMDISABLED}
  754. send "{@C}----------------------------------------------"
  755. send "{@T}{@C2} Teams can now PM!"
  756. send "{@T}{@C2} Use {@C}/team muteall {@C2}to undo this!"
  757. send "{@C}----------------------------------------------"
  758. else if arg-1 is "mute":
  759. if command sender is a player:
  760. if player does not have permission "{@PERM}":
  761. send "{@C}----------------------------------------------"
  762. send "{@T}{@C2} You do not have permission to do that!"
  763. send "{@C}----------------------------------------------"
  764. stop
  765. if arg-2 is set:
  766. if arg-2 is "all" or "*":
  767. set {PMDISABLED} to true
  768. send "{@C}----------------------------------------------"
  769. send "{@T}{@C2} Teams can no longer use team chat!"
  770. send "{@T}{@C2} Use {@C}/team unmuteall {@C2}to undo this!"
  771. send "{@C}----------------------------------------------"
  772. else:
  773. set {TeamMuted::%arg-2%} to arg-2
  774. send "{@C}----------------------------------------------"
  775. send "{@T}{@C} %arg-2% {@C2}can no longer use team chat!"
  776. send "{@T}{@C2} Use {@C}/team unmute %arg-2% {@C2}to undo this!"
  777. send "{@C}----------------------------------------------"
  778. else if arg-1 is "unmute":
  779. if command sender is a player:
  780. if player does not have permission "{@PERM}":
  781. send "{@C}----------------------------------------------"
  782. send "{@T}{@C2} You do not have permission to do that!"
  783. send "{@C}----------------------------------------------"
  784. stop
  785. if arg-2 is set:
  786. if arg-2 is "all" or "*":
  787. delete {PMDISABLED}
  788. send "{@C}----------------------------------------------"
  789. send "{@T}{@C2} Teams can now use team chat!"
  790. send "{@T}{@C2} Use {@C}/team muteall {@C2}to undo this!"
  791. send "{@C}----------------------------------------------"
  792. else:
  793. delete {TeamMuted::%arg-2%}
  794. send "{@C}----------------------------------------------"
  795. send "{@T}{@C} %arg-2% {@C2}can now use team chat!"
  796. send "{@T}{@C2} Use {@C}/team mute %arg-2% {@C2}to undo this!"
  797. send "{@C}----------------------------------------------"
  798. else if arg-1 is "viewpm":
  799. if command sender is a player:
  800. if player does not have permission "{@PERM}":
  801. send "{@C}----------------------------------------------"
  802. send "{@T}{@C2} You do not have permission to do that!"
  803. send "{@C}----------------------------------------------"
  804. stop
  805. if arg-2 is set:
  806. if arg-2 is "all" or "*":
  807. set {CanViewAllPM::%player%} to player
  808. send "{@C}----------------------------------------------"
  809. send "{@T}{@C2} You can now view all team chat!"
  810. send "{@C}----------------------------------------------"
  811. else if {Teams::%arg-2%} is set:
  812. set {CanViewPM::%arg-2%::%player%} to player
  813. send "{@C}----------------------------------------------"
  814. send "{@T}{@C2} You can now view team {@C}%arg-2%{@C2}'s chat!"
  815. send "{@C}----------------------------------------------"
  816. else:
  817. send "{@C}----------------------------------------------"
  818. send "{@T}{@C2} That team doesn't exist!"
  819. send "{@C}----------------------------------------------"
  820.  
  821. else if arg-1 is "unviewpm":
  822. if command sender is a player:
  823. if player does not have permission "{@PERM}":
  824. send "{@C}----------------------------------------------"
  825. send "{@T}{@C2} You do not have permission to do that!"
  826. send "{@C}----------------------------------------------"
  827. stop
  828. if arg-2 is set:
  829. if arg-2 is "all" or "*":
  830. delete {CanViewAllPM::%player%}
  831. send "{@C}----------------------------------------------"
  832. send "{@T}{@C2} You can no longer view all team chat!"
  833. send "{@C}----------------------------------------------"
  834. loop {Teams::*}:
  835. delete {CanViewPM::%loop-value%::%player%}
  836. else if {Teams::%arg-2%} is set:
  837. delete {CanViewPM::%arg-2%::%player%}
  838. send "{@C}----------------------------------------------"
  839. send "{@T}{@C2} You can no longer view team {@C}%arg-2%{@C2}'s chat!"
  840. send "{@C}----------------------------------------------"
  841. else:
  842. send "{@C}----------------------------------------------"
  843. send "{@T}{@C2} That team doesn't exist!"
  844. send "{@C}----------------------------------------------"
  845. else if arg-1 is "autodelete":
  846. if command sender is a player:
  847. if player does not have permission "{@PERM}":
  848. send "{@C}----------------------------------------------"
  849. send "{@T}{@C2} You do not have permission to do that!"
  850. send "{@C}----------------------------------------------"
  851. stop
  852. if arg-2 is "on" or "enable":
  853. send "{@C}----------------------------------------------"
  854. send "{@T}{@C2} Team Auto-Delete Enabled!"
  855. send "{@C}----------------------------------------------"
  856. delete {ninjateamsautodelete}
  857. else if arg-2 is "off" or "disable":
  858. send "{@C}----------------------------------------------"
  859. send "{@T}{@C2} Team Auto-Delete Disabled!"
  860. send "{@C}----------------------------------------------"
  861. set {ninjateamsautodelete} to false
  862. else if arg-1 is "friendlyfire" or "ff" or "fire":
  863. if command sender is a player:
  864. if player does not have permission "{@PERM}":
  865. send "{@C}----------------------------------------------"
  866. send "{@T}{@C2} You do not have permission to do that!"
  867. send "{@C}----------------------------------------------"
  868. stop
  869. if arg-2 is "on" or "enable":
  870. send "{@C}----------------------------------------------"
  871. send "{@T}{@C2} Friendly Fire Enabled!"
  872. send "{@C}----------------------------------------------"
  873. delete {teamfriendlyfire}
  874. loop {Teams::*}:
  875. command "/scoreboard teams option UHC%loop-value% friendlyfire true"
  876.  
  877. else if arg-2 is "off" or "disable":
  878. send "{@C}----------------------------------------------"
  879. send "{@T}{@C2} Friendly Fire Disabled!"
  880. send "{@C}----------------------------------------------"
  881. set {teamfriendlyfire} to false
  882. loop {Teams::*}:
  883. command "/scoreboard teams option UHC%loop-value% friendlyfire false"
  884.  
  885. else if arg-1 is "doubledates":
  886. if command sender is a player:
  887. if player does not have permission "{@PERM}":
  888. send "{@C}----------------------------------------------"
  889. send "{@T}{@C2} You do not have permission to do that!"
  890. send "{@C}----------------------------------------------"
  891. stop
  892. set {_num1moduled} to (size of {Teams::*})
  893. if {_num1moduled} is equal to 1:
  894. send "{@C}----------------------------------------------"
  895. send "{@T}{@C2} Not enough teams!"
  896. send "{@C}----------------------------------------------"
  897. stop trigger
  898. if {_num1moduled} is equal to 0:
  899. send "{@C}----------------------------------------------"
  900. send "{@T} No teams are set!"
  901. send "{@C}----------------------------------------------"
  902. stop trigger
  903. while {_num1moduled} is greater than or equal to 2:
  904. set {_count} to {_count} + 1
  905. set {_num1moduled} to {_num1moduled} - 2
  906. if {_num1moduled} is 1:
  907. "%arg-2%" is not "ignorenumber"
  908. send "{@C}----------------------------------------------"
  909. send "{@T}{@C2} There is an odd number of teams." to player
  910. send "{@T}{@C2} You can do {@C}/team doubledates ignorenumber {@C2}, but one team won't get a double date." to player
  911. send "{@C}----------------------------------------------"
  912. stop trigger
  913. send "{@C}----------------------------------------------"
  914. send "{@T}{@C2} Each team is now merged with another team."
  915. send "{@C}----------------------------------------------"
  916. delete {DDatesOriginal::*}
  917. loop {Teams::*}:
  918. set {DDatesOriginal::%loop-value%} to loop-value
  919. loop ((size of {Teams::*}) / 2) times:
  920. set {_team1} to (random element of {DDatesOriginal::*})
  921. delete {Teams::%{_team1}%}
  922. delete {DDatesOriginal::%{_team1}%}
  923. set {_team2} to (random element of {DDatesOriginal::*})
  924. delete {Teams::%{_team2}%}
  925. delete {DDatesOriginal::%{_team2}%}
  926. set {_count2} to 1
  927. delete {_creatingteam::*}
  928. loop {Team.%{_team1}%::*}:
  929. set {_creatingteam::%{_count2}%} to loop-value-2
  930. add 1 to {_count2}
  931. loop {Team.%{_team2}%::*}:
  932. set {_creatingteam::%{_count2}%} to loop-value-2
  933. add 1 to {_count2}
  934.  
  935. loop {_creatingteam::*}:
  936. if {Teams.InTeam::%loop-value-2%} is set:
  937. command "/scoreboard teams leave %loop-value-2%"
  938. if ((size of {Team.%{Teams.InTeam::%loop-value-2%}%::*}) - 1) is less than 2:
  939. {ninjateamsautodelete} is not set
  940. command "/team resetcolor %{Teams.InTeam::%loop-value-2%}%"
  941. loop {Team.%{Teams.InTeam::%loop-value-2%}%::*}:
  942. command "/scoreboard teams leave %loop-value-3%"
  943. delete {Teams::%{Teams.InTeam::%loop-value-3%}%}
  944. delete {Team.%{Teams.InTeam::%loop-value-3%}%::%loop-value-3%}
  945. delete {Teams.InTeam::%loop-value-3%}
  946. delete {Team.%{Teams.InTeam::%loop-value-2%}%::%loop-value-2%}
  947. loop all players:
  948. delete {pendingteam::%loop-player%::loop-value-1}
  949.  
  950. set {findteamnumber} to 1
  951. set {findingteamnumber} to true
  952. while {findingteamnumber} is true:
  953. if {Teams::%{findteamnumber}%} is not set:
  954. delete {findingteamnumber}
  955. else:
  956. add 1 to {findteamnumber}
  957. set {Teams::%{findteamnumber}%} to {findteamnumber}
  958. command "/scoreboard teams add UHC%{findteamnumber}%"
  959. if {teamfriendlyfire} is set:
  960. command "/scoreboard teams option UHC%{findteamnumber}% friendlyfire false"
  961.  
  962. loop {_creatingteam::*}:
  963. set {Teams.InTeam::%loop-value-2%} to {findteamnumber}
  964. set {Team.%{findteamnumber}%::%loop-value-2%} to loop-value-2
  965. if {ninjateams.dontautocolor} is not set:
  966. command "/colorteam %{findteamnumber}%"
  967. command "/scoreboard teams join UHC%{findteamnumber}% %loop-value-2%"
  968.  
  969.  
  970.  
  971.  
  972.  
  973.  
  974. command /colorteam <integer> [<text>] [<text>] [<text>] [<text>] [<text>]:
  975. usage: /colorteam <team> [color] [bold] [underline] [strikethrough] [italic]
  976. permission: {@PERM}
  977. trigger:
  978. {Teams::%arg-1%} is set
  979. if {allTheColors} is not set:
  980. set {allTheColors} to true
  981. 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"
  982. 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"
  983. 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"
  984. 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"
  985. 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"
  986. 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"
  987. 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"
  988. 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"
  989. 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"
  990. 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"
  991. 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"
  992. 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"
  993. 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"
  994. 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"
  995. set {allColorsUnderlineStrikethroughItalic::*} 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"
  996. 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"
  997. 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"
  998. if arg-2 is set:
  999. 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":
  1000. send "{@C}----------------------------------------------"
  1001. send "{@T}{@C2} Invalid Color: {@C}%arg-2%{@C2}"
  1002. 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"
  1003. send "{@C}----------------------------------------------"
  1004. stop
  1005. if {teamColor::%arg-1%::Color} is set:
  1006. if {UsingUsedColors::%arg-1%} is not set:
  1007. #Backward form of color checking to add the color back to the correct list variable
  1008.  
  1009.  
  1010.  
  1011. # bold underline strikethrough italic
  1012. if {teamColor::%arg-1%::bold} and {teamColor::%arg-1%::underline} and {teamColor::%arg-1%::strikethrough} and {teamColor::%arg-1%::italic} is set:
  1013. add "%{teamColor::%arg-1%::Color}%" to {allColorsBoldUnderlineStrikethroughItalic::*}
  1014.  
  1015. # bold underline strikethrough
  1016. else if {teamColor::%arg-1%::bold} and {teamColor::%arg-1%::underline} and {teamColor::%arg-1%::strikethrough} is set:
  1017. add "%{teamColor::%arg-1%::Color}%" to {allColorsBoldUnderlineStrikethrough::*}
  1018.  
  1019. # bold underline italic
  1020. else if {teamColor::%arg-1%::bold} and {teamColor::%arg-1%::underline} and {teamColor::%arg-1%::italic} is set:
  1021. add "%{teamColor::%arg-1%::Color}%" to {allColorsBoldUnderlineItalic::*}
  1022.  
  1023. # underline strikethrough italic
  1024. else if {teamColor::%arg-1%::underline} and {teamColor::%arg-1%::strikethrough} and {teamColor::%arg-1%::italic} is set:
  1025. add "%{teamColor::%arg-1%::Color}%" to {allColorsUnderlineStrikethroughItalic::*}
  1026.  
  1027. # bold strikethrough italic
  1028. else if {teamColor::%arg-1%::bold} and {teamColor::%arg-1%::strikethrough} and {teamColor::%arg-1%::italic} is set:
  1029. add "%{teamColor::%arg-1%::Color}%" to {allColorsBoldStrikethroughItalic::*}
  1030.  
  1031. # bold underline
  1032. else if {teamColor::%arg-1%::bold} and {teamColor::%arg-1%::underline} is set:
  1033. add "%{teamColor::%arg-1%::Color}%" to {allColorsBoldUnderline::*}
  1034.  
  1035. # bold strikethrough
  1036. else if {teamColor::%arg-1%::bold} and {teamColor::%arg-1%::strikethrough} is set:
  1037. add "%{teamColor::%arg-1%::Color}%" to {allColorsBoldStrikethrough::*}
  1038.  
  1039. # bold italic
  1040. else if {teamColor::%arg-1%::bold} and {teamColor::%arg-1%::italic} is set:
  1041. add "%{teamColor::%arg-1%::Color}%" to {allColorsBoldItalic::*}
  1042.  
  1043. # underline strikethrough
  1044. else if {teamColor::%arg-1%::underline} and {teamColor::%arg-1%::strikethrough} is set:
  1045. add "%{teamColor::%arg-1%::Color}%" to {allColorsUnderlineStrikethrough::*}
  1046.  
  1047. # underline italic
  1048. else if {teamColor::%arg-1%::underline} and {teamColor::%arg-1%::italic} is set:
  1049. add "%{teamColor::%arg-1%::Color}%" to {allColorsUnderlineItalic::*}
  1050.  
  1051. # strikethrough italic
  1052. else if {teamColor::%arg-1%::strikethrough} and {teamColor::%arg-1%::italic} is set:
  1053. add "%{teamColor::%arg-1%::Color}%" to {allColorsStrikethroughItalic::*}
  1054. # bold
  1055. else if {teamColor::%arg-1%::bold} is set:
  1056. add "%{teamColor::%arg-1%::Color}%" to {allColorsBold::*}
  1057.  
  1058. # underline
  1059. else if {teamColor::%arg-1%::underline} is set:
  1060. add "%{teamColor::%arg-1%::Color}%" to {allColorsUnderline::*}
  1061.  
  1062. # strikethrough
  1063. else if {teamColor::%arg-1%::strikethrough} is set:
  1064. add "%{teamColor::%arg-1%::Color}%" to {allColorsStrikethrough::*}
  1065.  
  1066. # italic
  1067. else if {teamColor::%arg-1%::italic} is set:
  1068. add "%{teamColor::%arg-1%::Color}%" to {allColorsItalic::*}
  1069.  
  1070. else:
  1071. add "%{teamColor::%arg-1%::Color}%" to {allColors::*}
  1072.  
  1073.  
  1074.  
  1075.  
  1076. delete {teamColor::%arg-1%::*}
  1077. set {teamColor::%arg-1%::%arg-3%} to true
  1078. set {teamColor::%arg-1%::%arg-4%} to true
  1079. set {teamColor::%arg-1%::%arg-5%} to true
  1080. set {teamColor::%arg-1%::%arg-6%} to true
  1081.  
  1082. # bold underline strikethrough italic
  1083. if {teamColor::%arg-1%::bold} and {teamColor::%arg-1%::underline} and {teamColor::%arg-1%::strikethrough} and {teamColor::%arg-1%::italic} is set:
  1084. if (size of {allColorsBoldUnderlineStrikethroughItalic::*}) is greater than 0:
  1085. if (size of {allColorsBoldUnderlineStrikethroughItalic::*}) is 1:
  1086. delete {allTheColors}
  1087. if "%{allColorsBoldUnderlineStrikethroughItalic::*}%" does not contain "%arg-2%":
  1088. set {UsingUsedColors::%arg-1%} to true
  1089. remove "%arg-2%" from {allColorsBoldUnderlineStrikethroughItalic::*}
  1090.  
  1091. # bold underline strikethrough
  1092. else if {teamColor::%arg-1%::bold} and {teamColor::%arg-1%::underline} and {teamColor::%arg-1%::strikethrough} is set:
  1093. if (size of {allColorsBoldUnderlineStrikethrough::*}) is greater than 0:
  1094. if "%{allColorsBoldUnderlineStrikethrough::*}%" does not contain "%arg-2%":
  1095. set {UsingUsedColors::%arg-1%} to true
  1096. remove "%arg-2%" from {allColorsBoldUnderlineStrikethrough::*}
  1097.  
  1098. # bold underline italic
  1099. else if {teamColor::%arg-1%::bold} and {teamColor::%arg-1%::underline} and {teamColor::%arg-1%::italic} is set:
  1100. if (size of {allColorsBoldUnderlineItalic::*}) is greater than 0:
  1101. if "%{allColorsBoldUnderlineItalic::*}%" does not contain "%arg-2%":
  1102. set {UsingUsedColors::%arg-1%} to true
  1103. remove "%arg-2%" from {allColorsBoldUnderlineItalic::*}
  1104.  
  1105. # underline strikethrough italic
  1106. else if {teamColor::%arg-1%::underline} and {teamColor::%arg-1%::strikethrough} and {teamColor::%arg-1%::italic} is set:
  1107. if (size of {allColorsUnderlineStrikethroughItalic::*}) is greater than 0:
  1108. if "%{allColorsUnderlineStrikethroughItalic::*}%" does not contain "%arg-2%":
  1109. set {UsingUsedColors::%arg-1%} to true
  1110. remove "%arg-2%" from {allColorsUnderlineStrikethroughItalic::*}
  1111.  
  1112. # bold strikethrough italic
  1113. else if {teamColor::%arg-1%::bold} and {teamColor::%arg-1%::strikethrough} and {teamColor::%arg-1%::italic} is set:
  1114. if (size of {allColorsBoldStrikethroughItalic::*}) is greater than 0:
  1115. if "%{allColorsBoldStrikethroughItalic::*}%" does not contain "%arg-2%":
  1116. set {UsingUsedColors::%arg-1%} to true
  1117. remove "%arg-2%" from {allColorsBoldStrikethroughItalic::*}
  1118. # bold underline
  1119. else if {teamColor::%arg-1%::bold} and {teamColor::%arg-1%::underline} is set:
  1120. if (size of {allColorsBoldUnderline::*}) is greater than 0:
  1121. if "%{allColorsBoldUnderline::*}%" does not contain "%arg-2%":
  1122. set {UsingUsedColors::%arg-1%} to true
  1123. remove "%arg-2%" from {allColorsBoldUnderline::*}
  1124.  
  1125. # bold strikethrough
  1126. else if {teamColor::%arg-1%::bold} and {teamColor::%arg-1%::strikethrough} is set:
  1127. if (size of {allColorsBoldStrikethrough::*}) is greater than 0:
  1128. if "%{allColorsBoldStrikethrough::*}%" does not contain "%arg-2%":
  1129. set {UsingUsedColors::%arg-1%} to true
  1130. remove "%arg-2%" from {allColorsBoldStrikethrough::*}
  1131.  
  1132. # bold italic
  1133. else if {teamColor::%arg-1%::bold} and {teamColor::%arg-1%::italic} is set:
  1134. if (size of {allColorsBoldItalic::*}) is greater than 0:
  1135. if "%{allColorsBoldItalic::*}%" does not contain "%arg-2%":
  1136. set {UsingUsedColors::%arg-1%} to true
  1137. remove "%arg-2%" from {allColorsBoldItalic::*}
  1138.  
  1139. # underline strikethrough
  1140. else if {teamColor::%arg-1%::underline} and {teamColor::%arg-1%::strikethrough} is set:
  1141. if (size of {allColorsUnderlineStrikethrough::*}) is greater than 0:
  1142. if "%{allColorsUnderlineStrikethrough::*}%" does not contain "%arg-2%":
  1143. set {UsingUsedColors::%arg-1%} to true
  1144. remove "%arg-2%" from {allColorsUnderlineStrikethrough::*}
  1145.  
  1146. # underline italic
  1147. else if {teamColor::%arg-1%::underline} and {teamColor::%arg-1%::italic} is set:
  1148. if (size of {allColorsUnderlineItalic::*}) is greater than 0:
  1149. if "%{allColorsUnderlineItalic::*}%" does not contain "%arg-2%":
  1150. set {UsingUsedColors::%arg-1%} to true
  1151. remove "%arg-2%" from {allColorsUnderlineItalic::*}
  1152.  
  1153. # strikethrough italic
  1154. else if {teamColor::%arg-1%::strikethrough} and {teamColor::%arg-1%::italic} is set:
  1155. if (size of {allColorsStrikethroughItalic::*}) is greater than 0:
  1156. if "%{allColorsStrikethroughItalic::*}%" does not contain "%arg-2%":
  1157. set {UsingUsedColors::%arg-1%} to true
  1158. remove "%arg-2%" from {allColorsStrikethroughItalic::*}
  1159.  
  1160. # bold
  1161. else if {teamColor::%arg-1%::bold} is set:
  1162. if (size of {allColorsBold::*}) is greater than 0:
  1163. if "%{allColorsBold::*}%" does not contain "%arg-2%":
  1164. set {UsingUsedColors::%arg-1%} to true
  1165. remove "%arg-2%" from {allColorsBold::*}
  1166.  
  1167. # underline
  1168. else if {teamColor::%arg-1%::underline} is set:
  1169. if (size of {allColorsUnderline::*}) is greater than 0:
  1170. if "%{allColorsUnderline::*}%" does not contain "%arg-2%":
  1171. set {UsingUsedColors::%arg-1%} to true
  1172. remove "%arg-2%" from {allColorsUnderline::*}
  1173.  
  1174. # strikethrough
  1175. else if {teamColor::%arg-1%::strikethrough} is set:
  1176. if (size of {allColorsStrikethrough::*}) is greater than 0:
  1177. if "%{allColorsStrikethrough::*}%" does not contain "%arg-2%":
  1178. set {UsingUsedColors::%arg-1%} to true
  1179. remove "%arg-2%" from {allColorsStrikethrough::*}
  1180.  
  1181. # italic
  1182. else if {teamColor::%arg-1%::italic} is set:
  1183. if (size of {allColorsItalic::*}) is greater than 0:
  1184. if "%{allColorsItalic::*}%" does not contain "%arg-2%":
  1185. set {UsingUsedColors::%arg-1%} to true
  1186. remove "%arg-2%" from {allColorsItalic::*}
  1187. else:
  1188. if (size of {allColors::*}) is greater than 0:
  1189. if "%{allColors::*}%" does not contain "%arg-2%":
  1190. set {UsingUsedColors::%arg-1%} to true
  1191. remove "%arg-2%" from {allColors::*}
  1192. set {teamColor::%arg-1%::Color} to arg-2
  1193. set {teamColor::%arg-1%::Reference} to "%{teamColor::%arg-1%::Color}%"
  1194. replace "_" in {teamColor::%arg-1%::Reference} with " "
  1195. if "%{teamColor::%arg-1%::Reference}%" is "aqua":
  1196. set {teamColor::%arg-1%::Reference} to "light aqua"
  1197. else if "%{teamColor::%arg-1%::Reference}%" is "blue":
  1198. set {teamColor::%arg-1%::Reference} to "light blue"
  1199. else if "%{teamColor::%arg-1%::Reference}%" is "green":
  1200. set {teamColor::%arg-1%::Reference} to "light green"
  1201. else if "%{teamColor::%arg-1%::Reference}%" is "red":
  1202. set {teamColor::%arg-1%::Reference} to "light red"
  1203. set {teamColor::%arg-1%::Reference} to "<%{teamColor::%arg-1%::Reference}%>"
  1204. set {teamColor::%arg-1%::ColorReference} to {teamColor::%arg-1%::Reference}
  1205. execute console command "/scoreboard teams option UHC%arg-1% color %arg-2%"
  1206. wait 5 ticks
  1207. if {teamColor::%arg-1%::bold} is true:
  1208. execute console command "/bold UHC%arg-1%"
  1209. set {teamColor::%arg-1%::Reference} to "%{teamColor::%arg-1%::Reference}%&l"
  1210. if {teamColor::%arg-1%::underline} is true:
  1211. execute console command "/underline UHC%arg-1%"
  1212. set {teamColor::%arg-1%::Reference} to "%{teamColor::%arg-1%::Reference}%&n"
  1213. if {teamColor::%arg-1%::strikethrough} is true:
  1214. execute console command "/strikethrough UHC%arg-1%"
  1215. set {teamColor::%arg-1%::Reference} to "%{teamColor::%arg-1%::Reference}%&m"
  1216. if {teamColor::%arg-1%::italic} is true:
  1217. execute console command "/italic UHC%arg-1%"
  1218. set {teamColor::%arg-1%::Reference} to "%{teamColor::%arg-1%::Reference}%&o"
  1219.  
  1220.  
  1221. else:
  1222. if {teamColor::%arg-1%::Color} is not set:
  1223. if (size of {allColors::*}) is greater than 0:
  1224. set {_chosenColor} to (random element of {allColors::*})
  1225. remove "%{_chosenColor}%" from {allColors::*}
  1226. else if (size of {allColorsBold::*}) is greater than 0:
  1227. set {_chosenColor} to (random element of {allColorsBold::*})
  1228. remove {_chosenColor} from {allColorsBold::*}
  1229. set {teamColor::%arg-1%::bold} to true
  1230. else if (size of {allColorsUnderline::*}) is greater than 0:
  1231. set {_chosenColor} to (random element of {allColorsUnderline::*})
  1232. remove {_chosenColor} from {allColorsUnderline::*}
  1233. set {teamColor::%arg-1%::underline} to true
  1234. else if (size of {allColorsStrikethrough::*}) is greater than 0:
  1235. set {_chosenColor} to (random element of {allColorsStrikethrough::*})
  1236. remove {_chosenColor} from {allColorsStrikethrough::*}
  1237. set {teamColor::%arg-1%::strikethrough} to true
  1238. else if (size of {allColorsItalic::*}) is greater than 0:
  1239. set {_chosenColor} to (random element of {allColorsItalic::*})
  1240. remove {_chosenColor} from {allColorsItalic::*}
  1241. set {teamColor::%arg-1%::italic} to true
  1242. else if (size of {allColorsBoldUnderline::*}) is greater than 0:
  1243. set {_chosenColor} to (random element of {allColorsBoldUnderline::*})
  1244. remove {_chosenColor} from {allColorsBoldUnderline::*}
  1245. set {teamColor::%arg-1%::bold} to true
  1246. set {teamColor::%arg-1%::underline} to true
  1247. else if (size of {allColorsBoldStrikethrough::*}) is greater than 0:
  1248. set {_chosenColor} to (random element of {allColorsBoldStrikethrough::*})
  1249. remove {_chosenColor} from {allColorsBoldStrikethrough::*}
  1250. set {teamColor::%arg-1%::bold} to true
  1251. set {teamColor::%arg-1%::strikethrough} to true
  1252. else if (size of {allColorsBoldItalic::*}) is greater than 0:
  1253. set {_chosenColor} to (random element of {allColorsBoldItalic::*})
  1254. remove {_chosenColor} from {allColorsBoldItalic::*}
  1255. set {teamColor::%arg-1%::bold} to true
  1256. set {teamColor::%arg-1%::italic} to true
  1257. else if (size of {allColorsUnderlineStrikethrough::*}) is greater than 0:
  1258. set {_chosenColor} to (random element of {allColorsUnderlineStrikethrough::*})
  1259. remove {_chosenColor} from {allColorsUnderlineStrikethrough::*}
  1260. set {teamColor::%arg-1%::underline} to true
  1261. set {teamColor::%arg-1%::strikethrough} to true
  1262. else if (size of {allColorsUnderlineItalic::*}) is greater than 0:
  1263. set {_chosenColor} to (random element of {allColorsUnderlineItalic::*})
  1264. remove {_chosenColor} from {allColorsUnderlineItalic::*}
  1265. set {teamColor::%arg-1%::underline} to true
  1266. set {teamColor::%arg-1%::italic} to true
  1267. else if (size of {allColorsStrikethroughItalic::*}) is greater than 0:
  1268. set {_chosenColor} to (random element of {allColorsStrikethroughItalic::*})
  1269. remove {_chosenColor} from {allColorsStrikethroughItalic::*}
  1270. set {teamColor::%arg-1%::strikethrough} to true
  1271. set {teamColor::%arg-1%::italic} to true
  1272. else if (size of {allColorsBoldUnderlineStrikethrough::*}) is greater than 0:
  1273. set {_chosenColor} to (random element of {allColorsBoldUnderlineStrikethrough::*})
  1274. remove {_chosenColor} from {allColorsBoldUnderlineStrikethrough::*}
  1275. set {teamColor::%arg-1%::bold} to true
  1276. set {teamColor::%arg-1%::underline} to true
  1277. set {teamColor::%arg-1%::strikethrough} to true
  1278. else if (size of {allColorsBoldUnderlineItalic::*}) is greater than 0:
  1279. set {_chosenColor} to (random element of {allColorsBoldUnderlineItalic::*})
  1280. remove {_chosenColor} from {allColorsBoldUnderlineItalic::*}
  1281. set {teamColor::%arg-1%::bold} to true
  1282. set {teamColor::%arg-1%::underline} to true
  1283. set {teamColor::%arg-1%::italic} to true
  1284. else if (size of {allColorsBoldStrikethroughItalic::*}) is greater than 0:
  1285. set {_chosenColor} to (random element of {allColorsBoldStrikethroughItalic::*})
  1286. remove {_chosenColor} from {allColorsBoldStrikethroughItalic::*}
  1287. set {teamColor::%arg-1%::bold} to true
  1288. set {teamColor::%arg-1%::strikethrough} to true
  1289. set {teamColor::%arg-1%::italic} to true
  1290. else if (size of {allColorsUnderlineStrikethroughItalic::*}) is greater than 0:
  1291. set {_chosenColor} to (random element of {allColorsUnderlineStrikethroughItalic::*})
  1292. remove {_chosenColor} from {allColorsUnderlineStrikethroughItalic::*}
  1293. set {teamColor::%arg-1%::underline} to true
  1294. set {teamColor::%arg-1%::strikethrough} to true
  1295. set {teamColor::%arg-1%::italic} to true
  1296. else if (size of {allColorsBoldUnderlineStrikethroughItalic::*}) is greater than 0:
  1297. if (size of {allColorsBoldUnderlineStrikethroughItalic::*}) is 1:
  1298. delete {allTheColors}
  1299. set {_chosenColor} to (random element of {allColorsBoldStrikethroughItalic::*})
  1300. remove {_chosenColor} from {allColorsBoldUnderlineStrikethroughItalic::*}
  1301. set {teamColor::%arg-1%::bold} to true
  1302. set {teamColor::%arg-1%::underline} to true
  1303. set {teamColor::%arg-1%::strikethrough} to true
  1304. set {teamColor::%arg-1%::italic} to true
  1305. set {teamColor::%arg-1%::Color} to {_chosenColor}
  1306. set {teamColor::%arg-1%::Reference} to "%{_chosenColor}%"
  1307. replace "_" in {teamColor::%arg-1%::Reference} with " "
  1308. if "%{teamColor::%arg-1%::Reference}%" is "aqua":
  1309. set {teamColor::%arg-1%::Reference} to "light aqua"
  1310. else if "%{teamColor::%arg-1%::Reference}%" is "blue":
  1311. set {teamColor::%arg-1%::Reference} to "light blue"
  1312. else if "%{teamColor::%arg-1%::Reference}%" is "green":
  1313. set {teamColor::%arg-1%::Reference} to "light green"
  1314. else if "%{teamColor::%arg-1%::Reference}%" is "red":
  1315. set {teamColor::%arg-1%::Reference} to "light red"
  1316. set {teamColor::%arg-1%::Reference} to "<%{teamColor::%arg-1%::Reference}%>"
  1317. set {teamColor::%arg-1%::ColorReference} to {teamColor::%arg-1%::Reference}
  1318. execute console command "/scoreboard teams option UHC%arg-1% color %{_chosenColor}%"
  1319. wait 5 ticks
  1320. if {teamColor::%arg-1%::Bold} is true:
  1321. execute console command "/bold UHC%arg-1%"
  1322. set {teamColor::%arg-1%::Reference} to "%{teamColor::%arg-1%::Reference}%&l"
  1323. if {teamColor::%arg-1%::Underline} is true:
  1324. execute console command "/underline UHC%arg-1%"
  1325. set {teamColor::%arg-1%::Reference} to "%{teamColor::%arg-1%::Reference}%&n"
  1326. if {teamColor::%arg-1%::Strikethrough} is true:
  1327. execute console command "/strikethrough UHC%arg-1%"
  1328. set {teamColor::%arg-1%::Reference} to "%{teamColor::%arg-1%::Reference}%&m"
  1329. if {teamColor::%arg-1%::Italic} is true:
  1330. execute console command "/italic UHC%arg-1%"
  1331. set {teamColor::%arg-1%::Reference} to "%{teamColor::%arg-1%::Reference}%&o"
  1332.  
  1333.  
  1334.  
  1335. command /pm <text>:
  1336. trigger:
  1337. if {Teams.InTeam::%player%} is not set:
  1338. send "{@C}----------------------------------------------"
  1339. send "{@T}{@C2} You are not on a team!"
  1340. send "{@C}----------------------------------------------"
  1341. stop
  1342. if {TeamMuted::%player%} is set:
  1343. send "{@C}----------------------------------------------"
  1344. send "{@T}{@C2} You're muted in team chat!"
  1345. send "{@C}----------------------------------------------"
  1346. else if {PMDISABLED} is set:
  1347. send "{@C}----------------------------------------------"
  1348. send "{@T}{@C2} Team chat is currently disabled!"
  1349. send "{@C}----------------------------------------------"
  1350. else:
  1351. delete {_sendTo::*}
  1352. loop {CanViewAllPM::*}:
  1353. ("%loop-value%" parsed as offline player) has permission "{@PERM}"
  1354. set {_sendTo::%loop-value%} to loop-value
  1355. loop {CanViewPM::%{Teams.InTeam::%player%}%::*}:
  1356. ("%loop-value%" parsed as offline player) has permission "{@PERM}"
  1357. set {_sendTo::%loop-value%} to loop-value
  1358. loop {Team.%{Teams.InTeam::%player%}%::*}:
  1359. set {_sendTo::%loop-value%} to loop-value
  1360. loop {_sendTo::*}:
  1361. if {TeamColor::%{Teams.InTeam::%player%}%::ColorReference} is set:
  1362. send "{@TC} %{TeamColor::%{Teams.InTeam::%player%}%::ColorReference}%%player%{@TC1}: {@TC2}%arg-1%" to ("%loop-value%" parsed as offlineplayer)
  1363. else:
  1364. send "{@TC} %player%{@TC1}: {@TC2}%arg-1%" to ("%loop-value%" parsed as offlineplayer)
  1365. delete {_sendTo::*}
  1366. command /pmcoords:
  1367. aliases: /pmc
  1368. trigger:
  1369. if {Teams.InTeam::%player%} is not set:
  1370. send "{@C}----------------------------------------------"
  1371. send "{@T}{@C2} You are not on a team!"
  1372. send "{@C}----------------------------------------------"
  1373. stop
  1374. if {TeamMuted::%player%} is set:
  1375. send "{@C}----------------------------------------------"
  1376. send "{@T}{@C2} You're muted in team chat!"
  1377. send "{@C}----------------------------------------------"
  1378. else if {PMDISABLED} is set:
  1379. send "{@C}----------------------------------------------"
  1380. send "{@T}{@C2} Team chat is currently disabled!"
  1381. send "{@C}----------------------------------------------"
  1382. else:
  1383. delete {_sendTo::*}
  1384. loop {CanViewAllPM::*}:
  1385. ("%loop-value%" parsed as offline player) has permission "{@PERM}"
  1386. set {_sendTo::%loop-value%} to loop-value
  1387. loop {CanViewPM::%{Teams.InTeam::%player%}%::*}:
  1388. ("%loop-value%" parsed as offline player) has permission "{@PERM}"
  1389. set {_sendTo::%loop-value%} to loop-value
  1390. loop {Team.%{Teams.InTeam::%player%}%::*}:
  1391. set {_sendTo::%loop-value%} to loop-value
  1392. loop {_sendTo::*}:
  1393. if {TeamColor::%{Teams.InTeam::%player%}%::ColorReference} is set:
  1394. message "{@TC} %{TeamColor::%{Teams.InTeam::%player%}%::ColorReference}%%player%&7 {@TC2}is at {@TC1}%(player's location)%" to ("%loop-value%" parsed as offlineplayer)
  1395. else:
  1396. message "{@TC} %player%&7 {@TC2}is at {@TC1}%(player's location)%" to ("%loop-value%" parsed as offlineplayer)
  1397.  
  1398. command /pmores:
  1399. trigger:
  1400. if {Teams.InTeam::%player%} is not set:
  1401. send "{@C}----------------------------------------------"
  1402. send "{@T}{@C2} You are not on a team!"
  1403. send "{@C}----------------------------------------------"
  1404. stop
  1405. if {TeamMuted::%player%} is set:
  1406. send "{@C}----------------------------------------------"
  1407. send "{@T}{@C2} You're muted in team chat!"
  1408. send "{@C}----------------------------------------------"
  1409. else if {PMDISABLED} is set:
  1410. send "{@C}----------------------------------------------"
  1411. send "{@T}{@C2} Team chat is currently disabled!"
  1412. send "{@C}----------------------------------------------"
  1413. else:
  1414. delete {_sendTo::*}
  1415. loop {CanViewAllPM::*}:
  1416. ("%loop-value%" parsed as offline player) has permission "{@PERM}"
  1417. set {_sendTo::%loop-value%} to loop-value
  1418. loop {CanViewPM::%{Teams.InTeam::%player%}%::*}:
  1419. ("%loop-value%" parsed as offline player) has permission "{@PERM}"
  1420. set {_sendTo::%loop-value%} to loop-value
  1421. loop {Team.%{Teams.InTeam::%player%}%::*}:
  1422. set {_sendTo::%loop-value%} to loop-value
  1423. loop {_sendTo::*}:
  1424. if {TeamColor::%{Teams.InTeam::%player%}%::ColorReference} is set:
  1425. message "{@TC} %{TeamColor::%{Teams.InTeam::%player%}%::ColorReference}%%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)
  1426. else:
  1427. message "{@TC} %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)
  1428. command /dontrandomize <text>:
  1429. usage: /dontrandomize <player/list>
  1430. permission: {@PERM}
  1431. trigger:
  1432. if arg-1 is "list":
  1433. if (size of {dontrandomize::*}) is not 0:
  1434. send "{@C}----------------------------------------------"
  1435. send "{@T}{@C2} &lNot Randomizing:"
  1436. loop {dontrandomize::*}:
  1437. send "{@T}{@C} %loop-value%"
  1438. send "{@C}----------------------------------------------"
  1439. else:
  1440. send "{@C}----------------------------------------------"
  1441. send "{@T}{@C2} No players will not be not randomized!"
  1442. send "{@T}{@C2} Type {@C}/dontrandomize <player> {@C2}to not randomize a player!"
  1443. send "{@C}----------------------------------------------"
  1444. else:
  1445. set {dontrandomize::%arg-1%} to arg-1
  1446. send "{@C}----------------------------------------------"
  1447. send "{@T}{@C} %arg-1% {@C2} will not be randomized!"
  1448. send "{@T}{@C2} To undo this, type {@C}/dorandomize %arg-1%{@C2}!"
  1449. send "{@C}----------------------------------------------"
  1450.  
  1451. command /dorandomize <player>:
  1452. permission: {@PERM}
  1453. trigger:
  1454. delete {dontrandomize::%arg-1%}
  1455. send "{@C}----------------------------------------------"
  1456. send "{@T}{@C} %arg-1% {@C2}will be randomized!"
  1457. send "{@C}----------------------------------------------"
  1458.  
  1459.  
  1460.  
  1461. command /tc <text> [<text>] [<text>] [<text>] [<text>] [<text>] [<text>] [<text>] [<text>] [<text>] [<text>]:
  1462. usage: /tc <player> [<player>] [<player>] [<player>] [<player>] [<player>] [<player>] [<player>] [<player>] [<player>] [<player>]
  1463. aliases: /ct
  1464. permission: {@PERM}
  1465. trigger:
  1466.  
  1467. delete {tcARGS::*}
  1468. set {tcARGS::%arg-1%} to arg-1
  1469. set {tcARGS::%arg-2%} to arg-2
  1470. set {tcARGS::%arg-3%} to arg-3
  1471. set {tcARGS::%arg-4%} to arg-4
  1472. set {tcARGS::%arg-5%} to arg-5
  1473. set {tcARGS::%arg-6%} to arg-6
  1474. set {tcARGS::%arg-7%} to arg-7
  1475. set {tcARGS::%arg-8%} to arg-8
  1476. set {tcARGS::%arg-9%} to arg-9
  1477. set {tcARGS::%arg-10%} to arg-10
  1478. loop {tcARGS::*}:
  1479. if {Teams.InTeam::%loop-value%} is set:
  1480. command "/scoreboard teams leave %loop-value%"
  1481. if (size of {Team.%{Teams.InTeam::%loop-value%}%::*} - 1) is less than 2:
  1482. {ninjateamsautodelete} is not set
  1483. command "/team resetcolor %{Teams.InTeam::%loop-value%}%"
  1484. loop {Team.%{Teams.InTeam::%loop-value%}%::*}:
  1485. command "/scoreboard teams leave %loop-value-2%"
  1486. delete {Teams::%{Teams.InTeam::%loop-value-2%}%}
  1487. delete {Team.%{Teams.InTeam::%loop-value-2%}%::%loop-value-2%}
  1488. delete {Teams.InTeam::%loop-value-2%}
  1489. delete {Team.%{Teams.InTeam::%loop-value%}%::%loop-value%}
  1490. loop all players:
  1491. delete {pendingteam::%loop-player%::loop-value-1}
  1492.  
  1493. set {findteamnumber} to 1
  1494. set {findingteamnumber} to true
  1495. while {findingteamnumber} is true:
  1496. if {Teams::%{findteamnumber}%} is not set:
  1497. delete {findingteamnumber}
  1498. else:
  1499. add 1 to {findteamnumber}
  1500. set {Teams::%{findteamnumber}%} to {findteamnumber}
  1501. command "/scoreboard teams add UHC%{findteamnumber}%"
  1502. if {teamfriendlyfire} is set:
  1503. command "/scoreboard teams option UHC%{findteamnumber}% friendlyfire false"
  1504. send "{@C}----------------------------------------------"
  1505. send "{@T}{@C2} Team {@C}%{findteamnumber}% {@C2}Created!"
  1506. send "{@C}----------------------------------------------"
  1507.  
  1508.  
  1509. loop {tcARGS::*}:
  1510. set {Teams.InTeam::%loop-value%} to {findteamnumber}
  1511. set {Team.%{findteamnumber}%::%loop-value%} to loop-value
  1512. if {ninjateams.dontautocolor} is not set:
  1513. command "/colorteam %{findteamnumber}%"
  1514. command "/scoreboard teams join UHC%{findteamnumber}% %loop-value%"
  1515. send "{@C}----------------------------------------------" to ("%loop-value%" parsed as offline player)
  1516. send "{@T}{@C2} You have joined team {@C}%{findteamnumber}%{@C2}!" to ("%loop-value%" parsed as offline player)
  1517. send "{@C}----------------------------------------------" to ("%loop-value%" parsed as offline player)
  1518.  
  1519.  
  1520.  
  1521.  
  1522. on death of player:
  1523. {ninjateamsdeathkick} is set
  1524. {Teams.InTeam::%victim%} is set
  1525. wait 1 second
  1526. command "/scoreboard teams leave %victim%"
  1527. if (size of {Team.%{Teams.InTeam::%victim%}%::*} - 1) is less than 2:
  1528. {ninjateamsautodelete} is not set
  1529. execute console command "/team resetcolor %{Teams.InTeam::%victim%}%"
  1530. delete {Teams::%{Teams.InTeam::%victim%}%}
  1531. loop {Team.%{Teams.InTeam::%victim%}%::*}:
  1532. command "/scoreboard teams leave %loop-value%"
  1533. delete {Team.%{Teams.InTeam::%loop-value%}%::%loop-value%}
  1534. delete {Teams.InTeam::%loop-value%}
  1535. command "/scoreboard teams leave %victim%"
  1536. delete {Team.%{Teams.InTeam::%victim%}%::%victim%}
  1537. delete {Teams.InTeam::%victim%}
  1538.  
  1539.  
  1540. command /checkteam <offline player>:
  1541. permission: {@PERM}
  1542. trigger:
  1543. if {Teams.InTeam::%arg-1%} is set:
  1544. set {_displaycolor} to {TeamColor::%{Teams.InTeam::%arg-1%}%::Color}
  1545. replace all "_" in {_displaycolor} with " "
  1546. send "{@C}----------------------------------------------"
  1547. send "{@T}{@C2} Player: {@C}%arg-1%"
  1548. send "{@T}{@C2} Team Number: {@C}%{Teams.InTeam::%arg-1%}%"
  1549. send "{@T}{@C2} Team Size: {@C}%(size of {Team.%{Teams.InTeam::%arg-1%}%::*})%"
  1550. send "{@T}{@C2} Players on Team: {@C}%{Team.%{Teams.InTeam::%arg-1%}%::*}%"
  1551. send "{@T}{@C2} Team Color: %{TeamColor::%{Teams.InTeam::%arg-1%}%::Reference}%%{TeamColor::%{Teams.InTeam::%arg-1%}%::Color}%"
  1552. send "{@C}----------------------------------------------"
  1553. else:
  1554. send "{@C}----------------------------------------------"
  1555. send "{@T}{@C} %arg-1% {@C2}is not on a team!"
  1556. send "{@C}----------------------------------------------"
Advertisement
Add Comment
Please, Sign In to add comment