Advertisement
Guest User

Untitled

a guest
Oct 21st, 2019
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 26.26 KB | None | 0 0
  1. options:
  2. P: &7[&9Teams&7]
  3. C: &7
  4. H: &c
  5. NoPerms: {@P}&4You do not have the permission!
  6.  
  7. command /team [<text>] [<text>] [<text>]:
  8. aliases: /teams
  9. trigger:
  10. if arg-1 is not set:
  11. command sender command "/team help"
  12. else if arg-1 is "help":
  13. send "&f {@H}Team Help Page&f "
  14. if {Teams.Management} is not set:
  15. send "{@P}{@C} Warning: Team Management is currently {@H}DISABLED{@C}, therefore these commands will not work."
  16. send "{@P}{@H} /team list&f - {@C}Lists teams"
  17. send "{@P}{@H} /team create&f - {@C}Create a team to invite players!"
  18. send "{@P}{@H} /team invite <player>&f - {@C}Invite <player> to your team!"
  19. send "{@P}{@H} /team accept <player>&f - {@C}Accept <player>'s invite!"
  20. send "{@P}{@H} /team leave&f - {@C}Leave your current team"
  21. send "{@P}{@H} /pmcoords&f - {@C}Send your teammates your coordinates!"
  22. send "{@P}{@H} /pmores&f - {@C}Send your teammates your ores!"
  23. send "{@P}{@H} /pm <text:coords:ores>&f - {@C}Chat with your teammates!"
  24. if command sender has permission "teams.help":
  25. send "{@P}{@H} -------"
  26. send "{@P}{@H} Admin Commands:"
  27. send "{@P}{@H} -------"
  28. send "{@P}{@H} /tm <off/on> <limit> - turns on team management, and sets a limit."
  29. send "{@P}{@H} /team createteam <number> - creates a team"
  30. send "{@P}{@H} /ct <player names between 1 and 6>&f - {@C}Creates teams with the listed players"
  31. send "{@P}{@H} /team color"
  32. send "{@P}{@H} /team random <size> <amt>"
  33. send "{@P}{@H} /team reset"
  34. send "{@P}{@H} /team fire <on/off>"
  35. send "{@P}{@H} /team join <id/player in team> [<player=you>]"
  36. send "{@P}{@H} /team makeleave [<player=you>]"
  37. send "{@P}{@H} /team uncolor"
  38. send "{@P}{@H} /team solos - list solos"
  39. send "{@P}{@H} /team management <on/off/toggle>"
  40. send "{@P}{@H} /team limit <number>"
  41. else if arg-1 is "list":
  42. if {teamlist} is set:
  43. {secretteams} is not set:
  44. if {Teams::*} is not set:
  45. send "{@P}{@C} No teams set."
  46. else:
  47. loop {Teams::*}:
  48. if size of {Team.%loop-value%::*} is not 0:
  49. send "{@P}{@C} Team {@H}%loop-value%{@C}: %{Team.%loop-value%::*}%"
  50. else:
  51. add 1 to {_0}
  52. if {_0} is size of {Teams::*}:
  53. send "{@P}{@C} No teams set."
  54. else:
  55. sender has permission "skript.op"
  56. if {Teams::*} is not set:
  57. send "{@P}{@C} No teams set."
  58. else:
  59. loop {Teams::*}:
  60. if size of {Team.%loop-value%::*} is not 0:
  61. send "{@P}{@C} Team {@H}%loop-value%{@C}: %{Team.%loop-value%::*}%"
  62. else:
  63. add 1 to {_0}
  64. if {_0} is size of {Teams::*}:
  65. send "{@P}{@C} No teams set."
  66. else:
  67. if sender has permission "skript.op":
  68. if {Teams::*} is not set:
  69. send "{@P}{@C} No teams set."
  70. else:
  71. loop {Teams::*}:
  72. if size of {Team.%loop-value%::*} is not 0:
  73. send "{@P}{@C} Team {@H}%loop-value%{@C}: %{Team.%loop-value%::*}%"
  74. else:
  75. add 1 to {_0}
  76. if {_0} is size of {Teams::*}:
  77. send "{@P}{@C} No teams set."
  78. else if arg-1 is "invite":
  79. if {Teams.Management} is not set:
  80. send "{@P}{@C} Team Management is currently disabled!"
  81. else:
  82. if arg-2 is not set:
  83. send "{@P}{@C} Please specify a player!"
  84. else if {Teams.InTeam::%command sender%} is not set:
  85. send "{@P}{@C} You don't have a team to invite {@H}%arg-2%{@C} to!"
  86. else if {Teams.Limit} is not set:
  87. send "{@P}{@C} Tell the host to set a team size limit!"
  88. else if size of {Team.%{Teams.InTeam::%command sender%}%::*} is greater than or equal to {Teams.Limit}:
  89. send "{@P}{@C} Your team is too big!"
  90. else:
  91. set {Teams.Invite::%arg-2%::%command sender%} to true
  92. send "{@P}{@C} You have invited {@H}%arg-2%{@C} to your team!"
  93. send "{@P}{@H} %command sender%{@C} invited you to their team! Do /team accept %command sender%!" to ("%arg-2%" parsed as player)
  94. else if arg-1 is "accept":
  95. if {Teams.Management} is not set:
  96. send "{@P}{@C} Team Management is currently disabled!"
  97. else:
  98. if arg-2 is not set:
  99. send "{@P}{@C} Please specify a player!"
  100. else if {Teams.Invite::%command sender%::%arg-2%} is not set:
  101. send "{@P}{@C} You don't have a team invite from {@H}%arg-2%!"
  102. else if {Teams.InTeam::%command sender%} is set:
  103. send "{@P}{@C} You are already on a team!"
  104. delete {Teams.Invite::%arg-2%::%command sender%}
  105. else if {Teams.InTeam::%arg-2%} is not set:
  106. send "{@P}{@C}{@H} %arg-2%{@C} does not have a team!"
  107. delete {Teams.Invite::%arg-2%::%command sender%}
  108. else if {Teams.Limit} is not set:
  109. send "{@P}{@C} Tell the host to set a team size limit!"
  110. else if size of {Team.%{Teams.InTeam::%arg-2%}%::*} is greater than or equal to {Teams.Limit}:
  111. send "{@P}{@C}{@H} %arg-2%'s{@C} team is too big!"
  112. delete {Teams.Invite::%arg-2%::%command sender%}
  113. else:
  114. set {_TM} to ({Teams.InTeam::%arg-2%})
  115. delete {Teams.Invite::%arg-2%::%command sender%}
  116. send "{@P}{@C} You have joined {@H}%arg-2%'s{@C} team!"
  117. loop {Team.%{_TM}%::*}:
  118. send "{@P}{@H} %command sender%{@C} joined your team!" to ("%loop-value%" parsed as player)
  119. set {Teams.InTeam::%command sender%} to ({_TM})
  120. add "%command sender%" to {Team.%{_TM}%::*}
  121. {secretteams} is not set
  122. command "/scoreboard teams join UHC%{_TM}% %command sender%"
  123.  
  124. else if arg 1 is equal to "delete":
  125. if command sender does not have the permission "teams.delete":
  126. message "{@P} &4Permission denied. &r(missing ""teams.delete"")"
  127. else if arg 2 is not set:
  128. message "{@P} {@NoPerms}"
  129. else if arg 3 is set:
  130. message "{@P} {@NoPerms}"
  131. else:
  132. set {_TeamNumber} to ("%arg 2%" parsed as integer)
  133. if {_TeamNumber} is not set:
  134. message "{@P} error"
  135. else if {_TeamNumber} is smaller than 1:
  136. message "{@P} Invalid Team Number!"
  137. else if {Teams::%{_TeamNumber}%} is not set:
  138. message "{@P} That team does not exist."
  139. else:
  140. delete {Teams::%{_TeamNumber}%}
  141. loop {Team.%{_TeamNumber}%::*}:
  142. message "{@P} Your team was deleted." to ("%loop-value%" parsed as player)
  143. delete {Teams.InTeam::%loop-value%}
  144. delete {Team.%{_TeamNumber}%::*}
  145. command "/scoreboard teams remove UHC%{_TeamNumber}%"
  146.  
  147. message "{@P} Deleted Team &6%{_TeamNumber}%"
  148. loop all players:
  149. loop-player has the permission "teams.delete.notify"
  150. loop-player is not command sender
  151. message "{@P} {@C} Deleted Team &6%{_TeamNumber}%" to loop-player
  152. else if arg-1 is "leave":
  153. if arg-2 is set:
  154. if command sender has permission "teams.mleave":
  155. command sender command "/team mleave %arg-2%"
  156. stop trigger
  157. else:
  158. if {Teams.Management} is not set:
  159. send "{@P}{@C} Team Management is currently disabled!"
  160. stop trigger
  161. else:
  162. send "{@P}{@C} Wrong syntax!"
  163. stop trigger
  164. if {Teams.Management} is not set:
  165. send "{@P}{@C} Team Management is currently disabled!"
  166. else:
  167. if {Teams.InTeam::%command sender%} is not set:
  168. send "{@P}{@C} Your not in a team!"
  169. else:
  170. send "{@P}{@C} You have left team {@H}UHC%{Teams.InTeam::%command sender%}%"
  171. remove "%command sender%" from {Team.%{Teams.InTeam::%command sender%}%::*}
  172. command "/scoreboard teams leave %command sender%"
  173. loop {Team.%{Teams.InTeam::%command sender%}%::*}:
  174. loop-value is not {_P}
  175. send "{@P}{@C}{@H} %command sender%{@C} left your team." to ("%loop-value%" parsed as player)
  176. set {_Team} to ({Teams.InTeam::%{_P}%})
  177. if size of {Team.%{_Team}%::*} is 1:
  178. delete {Team.%{_Team}%::*}
  179. command "/scoreboard teams remove UHC%{_Team}%"
  180. delete {Teams::%{_Team}%}
  181. delete {Teams.InTeam::%command sender%}
  182. else if arg 1 is equal to "createteam":
  183. if command sender does not have the permission "teams.create":
  184. message "{@P} &4Permission denied. &r(missing ""teams.create"")"
  185. else if arg 2 is not set:
  186. message "{@P} error"
  187. else if arg 3 is set:
  188. message "{@P} error"
  189. else:
  190. set {_TeamNumber} to ("%arg 2%" parsed as integer)
  191. if {_TeamNumber} is not set:
  192. message "{@P} error"
  193. else if {_TeamNumber} is smaller than 1:
  194. message "{@P} Invalid Team Number!"
  195. else if {Teams::%{_TeamNumber}%} is set:
  196. message "{@P} That team already exists."
  197. else:
  198. set {Teams::%{_TeamNumber}%} to {_TeamNumber}
  199. command "/scoreboard teams add UHC%{_TeamNumber}%"
  200.  
  201. message "{@P} Created Team &6%{_TeamNumber}%"
  202. loop all players:
  203. loop-player has the permission "teams.create.notify"
  204. loop-player is not command sender
  205. message "{@P} Created Team&6%{_TeamNumber}%" to loop-player
  206. else if arg-1 is "create":
  207. if {Teams.Management} is not set:
  208. send "{@P}{@C} Team Management is currently disabled!"
  209. else:
  210. if {Teams.InTeam::%command sender%} is set:
  211. command sender does not have permission "teams.create"
  212. send "{@P}{@C} Your in a team already!"
  213. stop trigger
  214. set {_TM} to 1
  215. while {Teams::%{_TM}%} is set:
  216. add 1 to {_TM}
  217. set {Teams::%{_TM}%} to {_TM}
  218. command "/scoreboard teams add UHC%{_TM}%"
  219. if {Teams.InTeam::%command sender%} is not set:
  220. set {Teams.InTeam::%command sender%} to ({_TM})
  221. add "%command sender%" to {Team.%{_TM}%::*}
  222. {secretteams} is not set
  223. command "/scoreboard teams join UHC%{_TM}% %command sender%"
  224. send "{@P}{@C} You created team {@H}UHC%{_TM}%"
  225. else if arg-1 is "reset":
  226. if command sender does not have the permission "teams.reset":
  227. send "{@NoPerms}"
  228. else:
  229. broadcast "{@P}{@C} Teams reset by {@H}%command sender%"
  230. loop {Teams::*}:
  231. delete {Team.%loop-value%::*}
  232. command "/scoreboard teams remove UHC%loop-value%"
  233. delete {Teams::*}
  234. delete {Teams.InTeam::*}
  235. delete {Teams.Limit}
  236. delete {Teams.Invite::*}
  237. delete {Teams.Management}
  238. else if arg-1 is "fire":
  239. if command sender does not have the permission "teams.fire":
  240. send "{@NoPerms}"
  241. else:
  242. if arg-2 is not set:
  243. send "{@P}{@C} Specify to turn friendly fire on or off."
  244. else:
  245. if arg-2 is "on":
  246. loop {Teams::*}:
  247. command "/scoreboard teams option UHC%loop-value% friendlyfire true"
  248. broadcast "{@P}{@C}{@H} %command sender%{@C} enabled friendly fire!"
  249. else if arg-2 is "off":
  250. loop {Teams::*}:
  251. command "/scoreboard teams option UHC%loop-value% friendlyfire false"
  252. broadcast "{@P}{@C}{@H} %command sender%{@C} disabled friendly fire!"
  253.  
  254. else if arg 1 is equal to "solos":
  255. if command sender does not have the permission "teams.solos":
  256. message "{@P} &4Permission denied. &r(missing ""teams.solos"")"
  257. else if arg 2 is set:
  258. message "{@P} &4error"
  259. else:
  260. loop all players:
  261. {Teams.InTeam::%loop-player%} is not set
  262. add (name of loop-player) to {_Solos::*}
  263.  
  264. if {_Solos::*} is not set:
  265. message "{@P} There are no solos!"
  266. else:
  267. message "{@P} Solos: %join {_Solos::*} with "", ""%"
  268.  
  269.  
  270. else if arg-1 is "random":
  271. if command sender does not have the permission "teams.random":
  272. send "{@NoPerms}"
  273. else if arg-2 is not set:
  274. send "{@P}{@C} Specify a team size!"
  275. else if arg-3 is not set:
  276. send "{@P}{@C} Specify a team amount!"
  277. else:
  278. set {_Size} to ("%arg-2%" parsed as integer)
  279. set {_Amt} to ("%arg-3%" parsed as integer)
  280. if {_Size} is not set:
  281. send "{@P}{@C} Enter a valid team size!"
  282. else if {_Amt} is not set:
  283. send "{@P}{@C} Enter a valid team amount!"
  284. else if {_Size} is less than 1:
  285. send "{@P}{@C} Enter a valid team size!"
  286. else if {_Amt} is less than 1:
  287. send "{@P}{@C} Enter a valid team amount!"
  288. else:
  289. loop all players:
  290. {Teams.InTeam::%loop-player%} is not set
  291. {spec::%loop-player%} is not set
  292. add "%loop-player%" to {_RT::*}
  293. if ({_Size}*{_Amt}) is not (size of {_RT::*}):
  294. send "{@P}{@C} The amount of players and teams does not match!"
  295. else:
  296. set {_TM} to 1
  297. while {Teams::%{_TM}%} is set:
  298. add 1 to {_TM}
  299. set {_TM} to ({_TM} - 1)
  300. broadcast "{@P}{@C} Randomizing {@H}%arg-3%{@C} teams of {@H}%arg-2%{@C}..."
  301. loop all players:
  302. command "/playsound note.snare %loop-player%"
  303. wait 10 ticks
  304. loop ({_Amt}) times:
  305. set {_ttm} to ({_TM}+(loop-number))
  306. set {Teams::%{_ttm}%} to {_ttm}
  307. command "/scoreboard teams add UHC%{_ttm}%"
  308. loop {_Size} times:
  309. set {_P} to a random element out of {_RT::*}
  310. remove {_P} from {_RT::*}
  311. set {Teams.InTeam::%{_P}%} to ({_ttm})
  312. add "%{_P}%" to {Team.%{_ttm}%::*}
  313. {killreveal} is not set
  314. {secretteams} is not set
  315. command "/scoreboard teams join UHC%{_ttm}% %{_P}%"
  316. loop {Teams::*}:
  317. loop-value is greater than {_TM}
  318. loop {Team.%loop-value%::*}:
  319. send "{@P}{@C} Your team:{@H} %{Team.%loop-value-1%::*}%" to ("%loop-value-2%" parsed as player)
  320. else if arg-1 is "uncolor":
  321. if command sender does not have the permission "teams.uncolor":
  322. send "{@NoPerms}"
  323. else:
  324. if {Teams::*} is not set:
  325. send "{@P}{@C} No teams are set!"
  326. else:
  327. loop {Teams::*}:
  328. command "/scoreboard teams option UHC%loop-value% color reset"
  329. broadcast "{@P}{@C}{@H} %command sender%{@C} uncolored all teams!"
  330. else if arg-1 is "management" or "man" or "manage":
  331. if command sender does not have the permission "teams.manage":
  332. send "{@NoPerms}"
  333. else:
  334. if arg-2 is not set:
  335. send "{@P}{@C} Specify to toggle team management, turn it on, or off."
  336. else:
  337. if arg-2 is "on":
  338. set {Teams.Management} to true
  339. broadcast "{@P}{@C}{@H} %command sender%{@C} enabled team management!"
  340. else if arg-2 is "off":
  341. delete {Teams.Management}
  342. broadcast "{@P}{@C}{@H} %command sender%{@C} disabled team management!"
  343. else if arg-2 is "toggle":
  344. if {Teams.Management} is not set:
  345. command sender command "/team man on"
  346. else:
  347. command sender command "/team man off"
  348. else if arg-1 is "limit" or "lim":
  349. if command sender does not have the permission "teams.limit":
  350. send "{@NoPerms}"
  351. else:
  352. if arg-2 is not set:
  353. send "{@P}{@C} Specify an amount of players per team!"
  354. else:
  355. set {_L} to ("%arg-2%" parsed as integer)
  356. if {_L} is not set:
  357. send "{@P}{@C} Enter a valid amount of players per team!"
  358. else if {_L} is less than 1:
  359. send "{@P}{@C} Enter a valid amount of players per team!"
  360. else:
  361. broadcast "{@P}{@C}{@H} %command sender%{@C} set the team size limit to %{_L}%"
  362. set {Teams.Limit} to {_L}
  363. else if arg-1 is "makeleave" or "forceleave" or "mleave" or "fleave":
  364. if command sender does not have the permission "teams.leave":
  365. message "{@P} &4Permission denied. &r(missing ""teams.leave"")"
  366. else if arg 3 is set:
  367. message "{@P} Invalid"
  368. else:
  369. if arg 2 is not set:
  370. if command sender is console:
  371. message "{@P} Invalid"
  372. stop
  373. set {_Player} to (name of command sender)
  374. else:
  375. set {_Player} to arg 2
  376.  
  377. if {Teams.InTeam::%{_Player}%} is not set:
  378. message "{@P} Player %{_Player}% is not in a team!"
  379. else:
  380. set {_TeamNumber} to {Teams.InTeam::%{_Player}%}
  381. delete {Teams.InTeam::%{_Player}%}
  382. remove {_Player} from {Team.%{_TeamNumber}%::*}
  383. command "/scoreboard teams leave %{_Player}%"
  384.  
  385. loop {Team.%{_TeamNumber}%::*}:
  386. set {_TeamPlayer} to ("%loop-value-1%" parsed as player)
  387. if {_TeamPlayer} is online:
  388. message "{@P} &6%{_Player}% &rhas been removed from your team." to {_TeamPlayer}
  389.  
  390. message "{@P} You were removed from &6Team %{_TeamNumber}%" to ("%{_Player}%" parsed as player)
  391. message "{@P} Removed &c%{_Player}% &rfrom Team &6%{_TeamNumber}%"
  392. {secretteams} is not set
  393. loop all players:
  394. loop-player has the permission "teams.join.notify"
  395. loop-player is not command sender
  396. message "{@P} Removed &c%{_Player}% &rfrom Team &6%{_TeamNumber}%" to loop-player
  397. else if arg-1 is "join":
  398. if command sender does not have the permission "teams.join":
  399. send "{@NoPerms}"
  400. else:
  401. if arg-2 is not set:
  402. send "{@P}{@C} Specify a team/player that is on that team"
  403. else:
  404. set {_te} to ("%arg-2%" parsed as player)
  405. set {_Test1} to ("%arg-2%" parsed as integer)
  406. if {_Test1} is set:
  407. set {_TN} to ("%arg-2%" parsed as integer)
  408. else if {Teams.InTeam::%{_te}%} is set:
  409. set {_TN} to ({Teams.InTeam::%{_te}%})
  410. else:
  411. send "{@P}{@C} Specify a valid team/player that is on that team"
  412. stop trigger
  413. if arg-3 is set:
  414. set {_P} to ("%arg-3%" parsed as player)
  415. else:
  416. set {_P} to command sender
  417. if {Teams.InTeam::%{_P}%} is set:
  418. send "{@P}{@C}{@H} %{_P}%{@C} is already a team!"
  419. stop trigger
  420. set {Teams.InTeam::%{_P}%} to ({_TN})
  421. add "%{_P}%" to {Team.%{_TN}%::*}
  422. {secretteams} is not set:
  423. command "/scoreboard teams join UHC%{_TN}% %{_P}%"
  424. if {_P} is not command sender:
  425. send "{@P}{@C}{@H} %command sender% added you to team {@H}UHC%{_TN}%" to {_P}
  426. send "{@P}{@C} Added {@H}%{_P}%{@C} to team {@H}UHC%{_TN}%"
  427. loop {Team.%{Teams.InTeam::%{_P}%}%::*}:
  428. loop-value is not {_P}
  429. send "{@P}{@C}{@H} %{_P}%{@C} was added your team by {@H}%command sender%{@C}." to ("%loop-value%" parsed as player)
  430. else if arg-1 is "color":
  431. if command sender does not have the permission "teams.color":
  432. send "{@NoPerms}"
  433. else:
  434. if {Teams::*} is not set:
  435. send "{@P}{@C} No teams are set!"
  436. set {_choices::*} to "aqua", "black", "blue", "dark_aqua", "dark_blue", "dark_gray", "dark_green", "dark_purple", "dark_red", "gold", "gray", "green", "light_purple", "red", and "yellow"
  437. set {_choices2::*} to "aqua", "black", "blue", "dark_aqua", "dark_blue", "dark_gray", "dark_green", "dark_purple", "dark_red", "gold", "gray", "green", "light_purple", "red", and "yellow"
  438. set {_choices3::*} to "aqua", "black", "blue", "dark_aqua", "dark_blue", "dark_gray", "dark_green", "dark_purple", "dark_red", "gold", "gray", "green", "light_purple", "red", and "yellow"
  439. set {_choices4::*} to "aqua", "black", "blue", "dark_aqua", "dark_blue", "dark_gray", "dark_green", "dark_purple", "dark_red", "gold", "gray", "green", "light_purple", "red", and "yellow"
  440. set {_choices5::*} to "aqua", "black", "blue", "dark_aqua", "dark_blue", "dark_gray", "dark_green", "dark_purple", "dark_red", "gold", "gray", "green", "light_purple", "red", and "yellow"
  441. set {_choices6::*} to "aqua", "black", "blue", "dark_aqua", "dark_blue", "dark_gray", "dark_green", "dark_purple", "dark_red", "gold", "gray", "green", "light_purple", "red", and "yellow"
  442. set {_choices7::*} to "aqua", "black", "blue", "dark_aqua", "dark_blue", "dark_gray", "dark_green", "dark_purple", "dark_red", "gold", "gray", "green", "light_purple", "red", and "yellow"
  443. loop {Teams::*}:
  444. if loop-value is less than or equal to 15:
  445. set {_C} to (random element out of {_choices::*})
  446. remove {_C} from {_choices::*}
  447. command "/scoreboard teams option UHC%loop-value% color %{_C}%"
  448. replace all "_" with " " in {_C}
  449. loop {Team.%loop-value%::*}:
  450. send "{@P}{@C} Your team's color is <%{_C}%>%{_C}%!" to ("%loop-value-2%" parsed as player)
  451. else if loop-value is between 16 and 30:
  452. set {_C} to (random element out of {_choices2::*})
  453. remove {_C} from {_choices2::*}
  454. command "/scoreboard teams option UHC%loop-value% color %{_C}%"
  455. command "/italic UHC%loop-value%"
  456. replace all "_" with " " in {_C}
  457. loop {Team.%loop-value%::*}:
  458. send "{@P}{@C} Your team's color is <italic><%{_C}%> Italic %{_C}%!" to ("%loop-value-2%" parsed as player)
  459. else if loop-value is between 31 and 45:
  460. set {_C} to (random element out of {_choices3::*})
  461. remove {_C} from {_choices3::*}
  462. command "/scoreboard teams option UHC%loop-value% color %{_C}%"
  463. command "/bold UHC%loop-value%"
  464. replace all "_" with " " in {_C}
  465. loop {Team.%loop-value%::*}:
  466. send "{@P}{@C} Your team's color is <bold><%{_C}%> Bold %{_C}%!" to ("%loop-value-2%" parsed as player)
  467. else if loop-value is between 46 and 60:
  468. set {_C} to (random element out of {_choices4::*})
  469. remove {_C} from {_choices4::*}
  470. command "/scoreboard teams option UHC%loop-value% color %{_C}%"
  471. command "/underline UHC%loop-value%"
  472. replace all "_" with " " in {_C}
  473. loop {Team.%loop-value%::*}:
  474. send "{@P}{@C} Your team's color is <underline><%{_C}%> Underline %{_C}%!" to ("%loop-value-2%" parsed as player)
  475. else if loop-value is between 61 and 75:
  476. set {_C} to (random element out of {_choices5::*})
  477. remove {_C} from {_choices5::*}
  478. command "/scoreboard teams option UHC%loop-value% color %{_C}%"
  479. command "/italic UHC%loop-value%"
  480. command "/bold UHC%loop-value%"
  481. replace all "_" with " " in {_C}
  482. loop {Team.%loop-value%::*}:
  483. send "{@P}{@C} Your team's color is <underline><bold><%{_C}%> Italic Bold %{_C}%!" to ("%loop-value-2%" parsed as player)
  484. else if loop-value is between 76 and 90:
  485. set {_C} to (random element out of {_choices6::*})
  486. remove {_C} from {_choices6::*}
  487. command "/scoreboard teams option UHC%loop-value% color %{_C}%"
  488. command "/italic UHC%loop-value%"
  489. command "/underline UHC%loop-value%"
  490. replace all "_" with " " in {_C}
  491. loop {Team.%loop-value%::*}:
  492. send "{@P}{@C} Your team's color is <underline><italic><%{_C}%> Underline Italic %{_C}%!" to ("%loop-value-2%" parsed as player)
  493. else if loop-value is between 91 and 105:
  494. set {_C} to (random element out of {_choices7::*})
  495. remove {_C} from {_choices7::*}
  496. command "/scoreboard teams option UHC%loop-value% color %{_C}%"
  497. command "/bold UHC%loop-value%"
  498. command "/underline UHC%loop-value%"
  499. replace all "_" with " " in {_C}
  500. loop {Team.%loop-value%::*}:
  501. send "{@P}{@C} Your team's color is <underline><bold><%{_C}%> Underline Bold %{_C}%!" to ("%loop-value-2%" parsed as player)
  502. broadcast "{@P}{@C}{@H} %command sender%{@C} colored all teams!"
  503. else:
  504. command sender command "/team help"
  505.  
  506. command /ct <text> <text> [<text>] [<text>] [<text>] [<text>]:
  507. permission: teams.createteam
  508. usage: /ct <players> [up to 6]
  509. trigger:
  510. add (arg 1) to {_ThisTeam::*}
  511. add (arg 2) to {_ThisTeam::*}
  512. if arg 3 is set:
  513. add (arg 3) to {_ThisTeam::*}
  514. if arg 4 is set:
  515. add (arg 4) to {_ThisTeam::*}
  516. if arg 5 is set:
  517. add (arg 5) to {_ThisTeam::*}
  518. if arg 6 is set:
  519. add (arg 6) to {_ThisTeam::*}
  520.  
  521. loop {_ThisTeam::*}:
  522. {Teams.InTeam::%loop-value%} is set
  523. add loop-value to {_AlreadyOnTeam::*}
  524.  
  525. if {_AlreadyOnTeam::*} is set:
  526. message "{@P} The following players are already on a team."
  527. message "{@P} %join {_AlreadyOnTeam::*} with "", ""%"
  528. else:
  529. set {_TeamNumber} to 1
  530. while {Teams::%{_TeamNumber}%} is set:
  531. set {_TeamNumber} to {_TeamNumber}+1
  532.  
  533. set {Teams::%{_TeamNumber}%} to {_TeamNumber}
  534. command "/scoreboard teams add UHC%{_TeamNumber}%"
  535. loop {_ThisTeam::*}:
  536. set {Teams.InTeam::%loop-value%} to {_TeamNumber}
  537. add "%loop-value%" to {Team.%{_TeamNumber}%::*}
  538. {secretteams} is not set
  539. command "/scoreboard teams join UHC%{_TeamNumber}% %loop-value%"
  540.  
  541. set {_Buffer} to ""
  542. loop {_ThisTeam::*}:
  543. set {_Player} to ("%loop-value%" parsed as player)
  544. if {_Player} is online:
  545. set {_Buffer} to "%{_Buffer}%&a%loop-value% "
  546. else:
  547. set {_Buffer} to "%{_Buffer}%&c%loop-value% "
  548. command "/wl add %loop-value%"
  549.  
  550. loop {_ThisTeam::*}:
  551. set {_Player} to ("%loop-value%" parsed as player)
  552. command "/playsound note.pling %loop-value%"
  553. message "{@P} You have been put on a team with the following people!" to {_Player}
  554. message "{@P} %{_Buffer}%" to {_Player}
  555. message "{@P} idk some people" to {_Player}
  556. message "{@P} Names in &cred &rare offline, but have been whitelisted!" to {_Player}
  557. message "{@P} &6&oMistake? &c&lImmediately ""&4/helpop WRONG TEAM!&c""!" to {_Player}
  558.  
  559. message "{@P} Created a team with the following members:"
  560. message "{@P} %{_Buffer}%"
  561. {secretteams} is not set
  562. loop all players:
  563. loop-player has the permission "teams.createteam.notify"
  564. loop-player is not command sender
  565. message "{@P} {@C} Created team with members:" to loop-player
  566. message "{@P} %{_Buffer}%" to loop-player
  567.  
  568.  
  569. command /tm <text> [<text>]:
  570. permission: skript.op
  571. trigger:
  572. if arg-1 is "on" or "enable":
  573. if arg-2 is set:
  574. make player execute "team management on"
  575. make player execute "team limit %arg-2%"
  576. else:
  577. message "&4specify a limit"
  578. if arg-1 is "off" or "disable":
  579. make player execute "team management off"
  580.  
  581. command /teamlist <text>:
  582. permission: skript.op
  583. trigger:
  584. if arg-1 is "on" or "enable":
  585. set {teamlist} to true
  586. broadcast "Enabled /team list"
  587. else:
  588. delete {teamlist}
  589. broadcast "Disabled /team list"
  590.  
  591.  
  592. command /secretteams <text>:
  593. permission: skript.op
  594. trigger:
  595. if arg-1 is "on" or "enable":
  596. set {secretteams} to true
  597. broadcast "{@P} Enabled Secret Teams"
  598. else:
  599. delete {secretteams}
  600. broadcast "{@P} Disabled Secret Teams"
  601.  
  602.  
  603. command /pmcoords:
  604. trigger:
  605. if {Teams.InTeam::%command sender%} is not set:
  606. send "{@P}{@C} You are not in a team!"
  607. stop trigger
  608. loop all players:
  609. {Teams.InTeam::%loop-player%} is {Teams.InTeam::%command sender%}
  610. send "{@P}{@C}{@H} %command sender%'s{@C} coordinates: {@C}x: {@H}%round(command sender's x-coordinate)%{@C}, {@C}y: {@H}%round(command sender's y-coordinate)%{@C}, {@C}z: {@H}%round(command sender's z-coordinate)%" to loop-player
  611.  
  612. command /pm <text>:
  613. trigger:
  614. if {Teams.InTeam::%command sender%} is not set:
  615. send "{@P}{@C} You are not in a team!"
  616. else if arg-1 is "coords" or "coordinates":
  617. command sender command "/pmcoords"
  618. else if arg-1 is "ores":
  619. command sender command "/pmores"
  620. else:
  621. loop all players:
  622. {Teams.InTeam::%loop-player%} is {Teams.InTeam::%command sender%}
  623. send "{@P}{@C}{@H} %command sender%{@C}: %arg-1%" to loop-player
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement