Advertisement
Guest User

Team Manager

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