Guest User

Untitled

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