Advertisement
BaneOfSmite

Untitled

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