Advertisement
fleft17

Untitled

Oct 3rd, 2014
210
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 22.72 KB | None | 0 0
  1. #variables
  2. #{Teams::%id%} - list of integer - all team numbers currently active
  3. #loop-index = loop-value - so {Teams::%id%} to check if team exists
  4.  
  5. #{Team.%integer%::*} - list of "text" - player names in that team (TEXT!)
  6. #{Teams.InTeam::%player%} - integer/null - what team is player in?
  7.  
  8. #{TeamBoxWarps::%number%} - list of locations
  9.  
  10. #commands
  11. #/team help
  12. #/team list
  13. #/team create <id>
  14. #/team delete <id>
  15. #/team join <id> [<player>]
  16. #/team leave [<player>]
  17. #/team color
  18. #/team uncolor
  19. #/team solos
  20. #/team soloinform
  21. #/team tpbox
  22. #/team setboxwarp <id>
  23. #/team rebuild
  24. #/team random <team size> <team amount>
  25. #/team reset
  26.  
  27. options:
  28. P: §7[§bTeams§7]§r
  29. N: §4§o%command sender%:§r
  30.  
  31. IS: Invalid Syntax. §b/team help§r?
  32.  
  33. command /team [<text>] [<text>] [<text>] [<text>] [<text>]:
  34. trigger:
  35.  
  36. if arg 1 is not set:
  37. command sender command "/team help"
  38.  
  39.  
  40.  
  41. else if arg 1 is equal to "help":
  42. if command sender does not have the permission "teams.help":
  43. message "{@P} §4Permission denied. §r(missing ""teams.help"")"
  44. else:
  45. message "§6/team help §4- §7This help page"
  46. message "§6/team list §4- §7List teams"
  47. message "§6/team create [<id>] §4- §7Create Team"
  48. message "§6/team delete <id> §4- §7Delete Team"
  49. message "§6/team join <id> [<player=you>] §4- §7Put <player> in Team"
  50. message "§6/team leave [<player=you>] §4- §7Remove <player> from Team"
  51. message "§6/team color §4- §7Color all teams at once"
  52. message "§6/team uncolor §4- §7Decolor all teams"
  53. message "§6/team solos §4- §7View online players not in teams"
  54. message "§6/team soloinform §4- §7Tell solos to re-/helpop"
  55. message "§6/team tpbox §4- §7Teleport Teams into boxes"
  56. message "§6/team setboxwarp <id> §4- §7Set Teamboxwarp for <id>"
  57. message "§6/team rebuild §4- §7Rebuild teams, skip empty"
  58. message "§6/team random <size> <amount> [extend] §4- §7Create Random Teams"
  59. message "§6/team reset §4- §7Reset all teams"
  60.  
  61.  
  62.  
  63. else if arg 1 is equal to "list":
  64. if {Teams::*} is not set:
  65. message "{@P} No teams defined."
  66. else:
  67. loop {Teams::*}:
  68. message "§6Team %loop-value%:"
  69. loop {Team.%loop-value%::*}:
  70. message "§7§l- §c§o%loop-value-2%"
  71.  
  72.  
  73.  
  74. else if arg 1 is equal to "create":
  75. if command sender does not have the permission "teams.create":
  76. message "{@P} §4Permission denied. §r(missing ""teams.create"")"
  77. else if arg 2 is not set:
  78. message "{@P} {@IS}"
  79. else if arg 3 is set:
  80. message "{@P} {@IS}"
  81. else:
  82. set {_TeamNumber} to ("%arg 2%" parsed as integer)
  83. if {_TeamNumber} is not set:
  84. message "{@P} {@IS}"
  85. else if {_TeamNumber} is smaller than 1:
  86. message "{@P} Invalid Team Number!"
  87. else if {Teams::%{_TeamNumber}%} is set:
  88. message "{@P} That team already exists."
  89. else:
  90. set {Teams::%{_TeamNumber}%} to {_TeamNumber}
  91. command "/scoreboard teams add UHC%{_TeamNumber}%"
  92.  
  93. message "{@P} Created Team §6%{_TeamNumber}%"
  94. loop all players:
  95. loop-player has the permission "teams.create.notify"
  96. loop-player is not command sender
  97. message "{@P} {@N} Created Team§6%{_TeamNumber}%" to loop-player
  98.  
  99.  
  100.  
  101. else if arg 1 is equal to "delete":
  102. if command sender does not have the permission "teams.delete":
  103. message "{@P} §4Permission denied. §r(missing ""teams.delete"")"
  104. else if arg 2 is not set:
  105. message "{@P} {@IS}"
  106. else if arg 3 is set:
  107. message "{@P} {@IS}"
  108. else:
  109. set {_TeamNumber} to ("%arg 2%" parsed as integer)
  110. if {_TeamNumber} is not set:
  111. message "{@P} {@IS}"
  112. else if {_TeamNumber} is smaller than 1:
  113. message "{@P} Invalid Team Number!"
  114. else if {Teams::%{_TeamNumber}%} is not set:
  115. message "{@P} That team does not exist."
  116. else:
  117. delete {Teams::%{_TeamNumber}%}
  118. loop {Team.%{_TeamNumber}%::*}:
  119. message "{@P} Your team was deleted." to ("%loop-value%" parsed as offlineplayer)
  120. delete {Teams.InTeam::%loop-value%}
  121. delete {Team.%{_TeamNumber}%::*}
  122. command "/scoreboard teams remove UHC%{_TeamNumber}%"
  123.  
  124. message "{@P} Deleted Team §6%{_TeamNumber}%"
  125. loop all players:
  126. loop-player has the permission "teams.delete.notify"
  127. loop-player is not command sender
  128. message "{@P} {@N} Deleted Team §6%{_TeamNumber}%" to loop-player
  129.  
  130.  
  131.  
  132. else if arg 1 is equal to "join":
  133. if command sender does not have the permission "teams.join":
  134. message "{@P} §4Permission denied. §r(missing ""teams.join"")"
  135. else if arg 2 is not set:
  136. message "{@P} {@IS}"
  137. else if arg 4 is set:
  138. message "{@P} {@IS}"
  139. else:
  140. set {_TeamNumber} to ("%arg 2%" parsed as integer)
  141. if {_TeamNumber} is not set:
  142. message "{@P} {@IS}"
  143. else if {_TeamNumber} is smaller than 1:
  144. message "{@P} Invalid Team Number!"
  145. else if {Teams::%{_TeamNumber}%} is not set:
  146. message "{@P} Team does not exist!"
  147. else:
  148. if arg 3 is not set:
  149. if command sender is console:
  150. message "{@P} {@IS}"
  151. stop
  152. set {_Player} to (name of command sender)
  153. else:
  154. set {_Player} to arg 3
  155.  
  156. if {Teams.InTeam::%{_Player}%} is set:
  157. message "{@P} Player %{_Player}% is already in a team!"
  158. else:
  159. loop {Team.%{_TeamNumber}%::*}:
  160. set {_TeamPlayer} to ("%loop-value-1%" parsed as offlineplayer)
  161. if {_TeamPlayer} is online:
  162. message "{@P} §6%{_Player}% §rhas been added to your team." to {_TeamPlayer}
  163.  
  164. set {Teams.InTeam::%{_Player}%} to {_TeamNumber}
  165. add {_Player} to {Team.%{_TeamNumber}%::*}
  166. command "/scoreboard teams join UHC%{_TeamNumber}% %{_Player}%"
  167.  
  168. message "{@P} You were added to §6Team %{_TeamNumber}%" to ("%{_Player}%" parsed as offlineplayer)
  169. message "{@P} Added §c%{_Player}% §rto Team §6%{_TeamNumber}%"
  170. loop all players:
  171. loop-player has the permission "teams.join.notify"
  172. loop-player is not command sender
  173. message "{@P} {@N} Added §c%{_Player}% §rto Team §6%{_TeamNumber}%" to loop-player
  174.  
  175.  
  176.  
  177. else if arg 1 is equal to "leave":
  178. if command sender does not have the permission "teams.leave":
  179. message "{@P} §4Permission denied. §r(missing ""teams.leave"")"
  180. else if arg 3 is set:
  181. message "{@P} {@IS}"
  182. else:
  183. if arg 2 is not set:
  184. if command sender is console:
  185. message "{@P} {@IS}"
  186. stop
  187. set {_Player} to (name of command sender)
  188. else:
  189. set {_Player} to arg 2
  190.  
  191. if {Teams.InTeam::%{_Player}%} is not set:
  192. message "{@P} Player %{_Player}% is not in a team!"
  193. else:
  194. set {_TeamNumber} to {Teams.InTeam::%{_Player}%}
  195. delete {Teams.InTeam::%{_Player}%}
  196. remove {_Player} from {Team.%{_TeamNumber}%::*}
  197. command "/scoreboard teams leave %{_Player}%"
  198.  
  199. loop {Team.%{_TeamNumber}%::*}:
  200. set {_TeamPlayer} to ("%loop-value-1%" parsed as offlineplayer)
  201. if {_TeamPlayer} is online:
  202. message "{@P} §6%{_Player}% §rhas been removed from your team." to {_TeamPlayer}
  203.  
  204. message "{@P} You were removed from §6Team %{_TeamNumber}%" to ("%{_Player}%" parsed as offlineplayer)
  205. message "{@P} Removed §c%{_Player}% §rfrom Team §6%{_TeamNumber}%"
  206. loop all players:
  207. loop-player has the permission "teams.join.notify"
  208. loop-player is not command sender
  209. message "{@P} {@N} Removed §c%{_Player}% §rfrom Team §6%{_TeamNumber}%" to loop-player
  210.  
  211.  
  212.  
  213. else if arg 1 is equal to "color":
  214. if command sender does not have the permission "teams.color":
  215. message "{@P} §4Permission denied. §r(missing ""teams.color"")"
  216. else if arg 2 is set:
  217. message "{@P} {@IS}"
  218. else if {Teams::*} is not set:
  219. message "{@P} No teams to color!"
  220. else if (size of {Teams::*}) is bigger than 20:
  221. message "{@P} Too many teams to color!"
  222. else:
  223. if (size of {Teams::*}) is smaller than 16:
  224. set {_Colors::*} to "aqua", "black", "blue", "dark_aqua", "dark_blue", "dark_gray", "dark_green", "dark_purple", "dark_red", "gold", "gray", "green", "light_purple", "red" and "yellow"
  225. else if (size of {Teams::*}) is smaller than 20:
  226. set {_Colors::*} to "aqua", "black", "blue", "bold", "dark_aqua", "dark_blue", "dark_gray", "dark_green", "dark_purple", "dark_red", "gold", "gray", "green", "italic", "light_purple", "red", "strikethrough", "underline" and "yellow"
  227. else:
  228. set {_Colors::*} to "aqua", "black", "blue", "bold", "dark_aqua", "dark_blue", "dark_gray", "dark_green", "dark_purple", "dark_red", "gold", "gray", "green", "italic", "light_purple", "red", "strikethrough", "underline", "white" and "yellow"
  229. loop {Teams::*}:
  230. set {_Color} to (random element out of {_Colors::*})
  231. remove {_Color} from {_Colors::*}
  232. command "/scoreboard teams option UHC%loop-value% color %{_Color}%"
  233. replace all "_" with " " in {_Color}
  234. loop {Team.%loop-value%::*}:
  235. message "{@P} Your Team color is <%{_Color}%>%{_Color}%§r!" to ("%loop-value-2%" parsed as offlineplayer)
  236.  
  237. message "{@P} Colored all teams"
  238. loop all players:
  239. loop-player has the permission "teams.color.notify"
  240. loop-player is not command sender
  241. message "{@P} {@N} Colored all teams" to loop-player
  242.  
  243.  
  244.  
  245. else if arg 1 is equal to "uncolor":
  246. if command sender does not have the permission "teams.uncolor":
  247. message "{@P} §4Permission denied. §r(missing ""teams.uncolor"")"
  248. else if arg 2 is set:
  249. message "{@P} {@IS}"
  250. else if {Teams::*} is not set:
  251. message "{@P} No teams to uncolor!"
  252. else:
  253. loop {Teams::*}:
  254. command "/scoreboard teams option UHC%loop-value% color reset"
  255. loop {Team.%loop-value%::*}:
  256. message "{@P} Your Team color was removed." to ("%loop-value-2%" parsed as offlineplayer)
  257.  
  258. message "{@P} Uncolored all teams"
  259. loop all players:
  260. loop-player has the permission "teams.uncolor.notify"
  261. loop-player is not command sender
  262. message "{@P} {@N} Uncolored all teams" to loop-player
  263.  
  264.  
  265.  
  266. else if arg 1 is equal to "solos":
  267. if command sender does not have the permission "teams.solos":
  268. message "{@P} §4Permission denied. §r(missing ""teams.solos"")"
  269. else if arg 2 is set:
  270. message "{@P} {@IS}"
  271. else:
  272. loop all players:
  273. {Teams.InTeam::%loop-player%} is not set
  274. add (name of loop-player) to {_Solos::*}
  275.  
  276. if {_Solos::*} is not set:
  277. message "{@P} There are no solos!"
  278. else:
  279. message "{@P} Solos: %join {_Solos::*} with "", ""%"
  280.  
  281.  
  282.  
  283. else if arg 1 is equal to "soloinform":
  284. if command sender does not have the permission "teams.soloinform":
  285. message "{@P} §4Permission denied. §r(missing ""teams.soloinform"")"
  286. else if arg 2 is set:
  287. message "{@P} {@IS}"
  288. else:
  289. loop all players:
  290. loop-player is not command sender
  291. if {Teams.InTeam::%loop-player%} is not set:
  292. command "/playsound note.pling %loop-player%"
  293. message "{@P} §4Warning! §rYou are not yet in a team." to loop-player
  294. message "{@P} If you have a set team, please re-§4/helpop §rit." to loop-player
  295. message "{@P} If you are solo, please ""§4/helpop I am solo§r""." to loop-player
  296. if loop-player has the permission "teams.soloinform.notify":
  297. message "{@P} {@N} Informed Solos" to loop-player
  298. message "{@P} Informed Solos"
  299.  
  300.  
  301. else if arg 1 is equal to "tpbox":
  302. if command sender does not have the permission "teams.tpbox":
  303. message "{@P} §4Permission denied. §r(missing ""teams.tpbox"")"
  304. else if arg 2 is set:
  305. message "{@P} {@IS}"
  306. else if (size of {TeamBoxWarps::*}) is smaller than (size of {Teams::*}):
  307. message "{@P} Too less warps!"
  308. else:
  309. set {_Count} to 0
  310. loop {Teams::*}:
  311. increase {_Count} by 1
  312. loop {Team.%loop-value%::*}:
  313. teleport ("%loop-value-2%" parsed as offlineplayer) to {TeamBoxWarps::%{_Count}%}
  314.  
  315. message "{@P} Teleported Teams in Boxes"
  316. loop all players:
  317. loop-player has the permission "teams.tpbox.notify"
  318. loop-player is not command sender
  319. message "{@P} {@N} Teleported Teams in Boxes" to loop-player
  320.  
  321.  
  322. else if arg 1 is equal to "setboxwarp":
  323. if command sender is console:
  324. message "{@P} {@IS}"
  325. if command sender does not have the permission "teams.setboxwarp":
  326. message "{@P} §4Permission denied. §r(missing ""teams.setboxwarp"")"
  327. else if arg 2 is not set:
  328. message "{@P} {@IS}"
  329. else if arg 3 is set:
  330. message "{@P} {@IS}"
  331. else:
  332. set {_WarpNumber} to ("%arg 2%" parsed as integer)
  333. if {_WarpNumber} is not set:
  334. message "{@P} {@IS}"
  335. else if {_WarpNumber} is smaller than 1:
  336. message "{@P} {@IS}"
  337. else:
  338. if {_WarpNumber} is not equal to 1:
  339. set {_TestWarpNumber} to {_WarpNumber}-1
  340. if {TeamBoxWarps::%{_TestWarpNumber}%} is not set:
  341. message "{@P} The previous warp %{_TestWarpNumber}% is not set!"
  342. stop
  343.  
  344.  
  345. set {TeamBoxWarps::%{_WarpNumber}%} to (location of (block at command sender))
  346. message "{@P} Configured Warp %{_WarpNumber}% to %{TeamBoxWarps::%{_WarpNumber}%}%"
  347.  
  348.  
  349.  
  350. else if arg 1 is equal to "rebuild":
  351. if command sender does not have the permission "teams.rebuild":
  352. message "{@P} §4Permission denied. §r(missing ""teams.rebuild"")"
  353. else if arg 2 is set:
  354. message "{@P} {@IS}"
  355. else:
  356. set {_TeamCount} to 0
  357. delete {Teams.InTeam::*}
  358. loop {Teams::*}:
  359. if (size of {Team.%loop-value%::*}) is not equal to 0:
  360. message "%loop-value%"
  361. set {_TeamCount} to {_TeamCount}+1
  362. set {_New.Team.%{_TeamCount}%::*} to {Team.%loop-value%::*}
  363. set {_New.Teams::%{_TeamCount}%} to {_TeamCount}
  364. delete {Team.%loop-value%::*}
  365. command "/scoreboard teams remove UHC%loop-value%"
  366.  
  367. delete {Teams::*}
  368. set {Teams::*} to {_New.Teams::*}
  369. loop {Teams::*}:
  370. command "/scoreboard teams add UHC%loop-value%"
  371. set {Team.%loop-value%::*} to {_New.Team.%loop-value%::*}
  372. loop {Team.%loop-value%::*}:
  373. set {Teams.InTeam::%loop-value-2%} to loop-value-1
  374. command "/scoreboard teams join UHC%loop-value-1% %loop-value-2%"
  375.  
  376. message "{@P} Issued Rebuild"
  377. loop all players:
  378. loop-player has the permission "teams.rebuild.notify"
  379. loop-player is not command sender
  380. message "{@P} {@N} Issued Rebuild" to loop-player
  381.  
  382.  
  383. else if arg 1 is equal to "random":
  384. if command sender does not have the permission "teams.random":
  385. message "{@P} §4Permission denied. §r(missing ""teams.random"")"
  386. else if arg 2 is not set:
  387. message "{@P} {@IS}"
  388. else if arg 3 is not set:
  389. message "{@P} {@IS}"
  390. else:
  391. set {_TeamSize} to ("%arg 2%" parsed as integer)
  392. set {_TeamAmount} to ("%arg 3%" parsed as integer)
  393. if {_TeamSize} is not set:
  394. message "{@P} {@IS}"
  395. else if {_TeamAmount} is not set:
  396. message "{@P} {@IS}"
  397. else if {_TeamSize} is less than 1:
  398. message "{@P} {@IS}"
  399. else if {_TeamAmount} is less than 1:
  400. message "{@P} {@IS}"
  401. else:
  402. loop all players:
  403. {Teams.InTeam::%loop-player%} is not set
  404. add (name of loop-player) to {_Players::*}
  405.  
  406. if ({_TeamSize}*{_TeamAmount}) is not equal to (size of {_Players::*}):
  407. message "{@P} The amount of people does not match."
  408. else:
  409. loop {Teams::*}:
  410. command "/scoreboard teams remove UHC%loop-value%"
  411. delete {Team.%loop-value%::*}
  412. delete {Teams.InTeam::*}
  413. delete {Teams::*}
  414.  
  415. broadcast "{@P} Randomizing §6%arg 3% teams §cof %arg 2%§r..."
  416. loop all players:
  417. command "/playsound note.harp %loop-player%"
  418. wait 10 ticks
  419.  
  420. loop {_TeamAmount} times:
  421. command "/scoreboard teams add UHC%loop-number%"
  422. set {Teams::%loop-number%} to loop-number
  423. wait 10 ticks
  424. broadcast "{@P} Team %loop-number%:"
  425. command "/noise fireworks.twinkle"
  426. loop {_TeamSize} times:
  427. set {_Player} to (random element out of {_Players::*})
  428. remove {_Player} from {_Players::*}
  429. broadcast "{@P} - %{_Player}%"
  430. command "/scoreboard teams join UHC%loop-number-1% %{_Player}%"
  431. command "/noise fireworks.launch"
  432. wait 3 ticks
  433. add {_Player} to {Team.%loop-number-1%::*}
  434. set {Teams.InTeam::%{_Player}%} to loop-number-1
  435.  
  436. loop {Teams::*}:
  437. loop {Team.%loop-value%::*}:
  438. set {_Player} to ("%loop-value-2%" parsed as offlineplayer)
  439. if {_Player} is online:
  440. message "{@P} §6Your team!" to {_Player}
  441. loop {Team.%loop-value-1%::*}:
  442. loop-value-3 is not equal to loop-value-2
  443. message "{@P} §7§l- §c§o%loop-value-3%" to {_Player}
  444.  
  445. if arg 4 is set:
  446. if arg 4 is equal to "extend":
  447. set {_Extend} to true
  448.  
  449. if {_Extend} is not set:
  450. broadcast "{@P} §7Teams are randomized!"
  451. else:
  452. broadcast "{@P} §fTeams are randomized! §c§lGet into Teamspeak!"
  453. broadcast "{@P} §fThe IP is §6§nts.publicuhc.com§f."
  454. broadcast "{@P} §3Channel Info: §fIf one of your teammembers has a"
  455. broadcast "{@P} ""§3verified§f"" Teamspeak account, he can create a"
  456. broadcast "{@P} §7private channel §ffor your team. If not, please"
  457. broadcast "{@P} §cask an operator §fvia §4/helpop §fto create a channel"
  458. broadcast "{@P} §ffor your team. §3§lUse §2§l/pm §3§lto communicate."
  459. loop all players:
  460. command "/playsound random.explode %loop-player%"
  461.  
  462.  
  463.  
  464.  
  465.  
  466.  
  467.  
  468.  
  469.  
  470. else if arg 1 is equal to "reset":
  471. if command sender does not have the permission "teams.reset":
  472. message "{@P} §4Permission denied. §r(missing ""teams.reset"")"
  473. else if arg 2 is set:
  474. message "{@P} {@IS}"
  475. else:
  476. loop {Teams::*}:
  477. loop {Team.%loop-value%::*}:
  478. message "{@P} Your team was deleted in a global reset." to ("%loop-value-2%" parsed as offlineplayer)
  479. command "/scoreboard teams remove UHC%loop-value%"
  480. delete {Team.%loop-value%::*}
  481. delete {Teams::*}
  482. delete {Teams.InTeam::*}
  483.  
  484. message "{@P} All teams reset"
  485. loop all players:
  486. loop-player has the permission "teams.reset.notify"
  487. loop-player is not command sender
  488. message "{@P} {@N} Reset all teams" to loop-player
  489.  
  490.  
  491.  
  492. else:
  493. command sender command "/team help"
  494.  
  495.  
  496. command /pm <text>:
  497. executable by: players
  498. trigger:
  499. if {Teams.InTeam::%command sender%} is not set:
  500. message "{@P} You are not in a team!"
  501. else:
  502. set {_Team} to {Teams.InTeam::%command sender%}
  503. loop all players:
  504. if {Teams.InTeam::%loop-player%} is equal to {_Team}:
  505. message "§f[§7§lTEAM§f] §e§o%command sender%§r: %arg 1%" to loop-player
  506. else if {PMSocialSpy::%loop-player%} is true:
  507. message "§f[§7§lPMS§f] §9[§f%{_Team}%§9] §e§o%command sender%§r: %arg 1%" to loop-player
  508.  
  509. command /fpm <text> <text>:
  510. permission: skript.forcepm
  511. usage: /fpm <team number/player> <text>
  512. trigger:
  513. set {_Number} to ("%arg 1%" parsed as integer)
  514. if {_Number} is set:
  515. if {Teams::%arg 1%} is not set:
  516. message "Team %arg 1% not defined."
  517. else:
  518. loop all players:
  519. {Teams.InTeam::%loop-player%} is equal to {_Number}
  520. message "§f[§7§lTEAM§f] §4§o%command sender%§r: %arg 1%" to loop-player
  521. else:
  522. if {Teams.InTeam::%arg 1%} is not set:
  523. message "Player %arg 1% not in a team."
  524. else:
  525. loop all players:
  526. {Teams.InTeam::%loop-player%} is equal to {Teams.InTeam::%arg 1%}
  527. message "§f[§7§lTEAM§f] §4§o%command sender%§r: %arg 1%" to loop-player
  528.  
  529. command /pms:
  530. permission: skript.pm.socialspy
  531. trigger:
  532. if {PMSocialSpy::%command sender%} is not set:
  533. set {PMSocialSpy::%command sender%} to true
  534. message "Team Socialspy now on"
  535. else:
  536. delete {PMSocialSpy::%command sender%}
  537. message "Team Socialspy now off"
  538.  
  539.  
  540.  
  541. command /ct <text> <text> [<text>] [<text>] [<text>] [<text>]:
  542. permission: teams.createteam
  543. usage: /ct <players> [up to 6]
  544. trigger:
  545. add (arg 1) to {_ThisTeam::*}
  546. add (arg 2) to {_ThisTeam::*}
  547. if arg 3 is set:
  548. add (arg 3) to {_ThisTeam::*}
  549. if arg 4 is set:
  550. add (arg 4) to {_ThisTeam::*}
  551. if arg 5 is set:
  552. add (arg 5) to {_ThisTeam::*}
  553. if arg 6 is set:
  554. add (arg 6) to {_ThisTeam::*}
  555.  
  556. loop {_ThisTeam::*}:
  557. {Teams.InTeam::%loop-value%} is set
  558. add loop-value to {_AlreadyOnTeam::*}
  559.  
  560. if {_AlreadyOnTeam::*} is set:
  561. message "{@P} The following players are already on a team."
  562. message "{@P} %join {_AlreadyOnTeam::*} with "", ""%"
  563. else:
  564. set {_TeamNumber} to 1
  565. while {Teams::%{_TeamNumber}%} is set:
  566. set {_TeamNumber} to {_TeamNumber}+1
  567.  
  568. set {Teams::%{_TeamNumber}%} to {_TeamNumber}
  569. command "/scoreboard teams add UHC%{_TeamNumber}%"
  570. loop {_ThisTeam::*}:
  571. set {Teams.InTeam::%loop-value%} to {_TeamNumber}
  572. add "%loop-value%" to {Team.%{_TeamNumber}%::*}
  573. command "/scoreboard teams join UHC%{_TeamNumber}% %loop-value%"
  574.  
  575. set {_Buffer} to ""
  576. loop {_ThisTeam::*}:
  577. set {_Player} to ("%loop-value%" parsed as offlineplayer)
  578. if {_Player} is online:
  579. set {_Buffer} to "%{_Buffer}%§a%loop-value% "
  580. else:
  581. set {_Buffer} to "%{_Buffer}%§c%loop-value% "
  582. command "/whitelist add %loop-value%"
  583.  
  584. loop {_ThisTeam::*}:
  585. set {_Player} to ("%loop-value%" parsed as offlineplayer)
  586. command "/playsound note.pling %loop-value%"
  587. message "{@P} You have been put on a team with the following people!" to {_Player}
  588. message "{@P} %{_Buffer}%" to {_Player}
  589. message "{@P} Names in §cred §rare offline, but have been whitelisted!" to {_Player}
  590. message "{@P} §6§oMistake? §c§lImmediately ""§4/helpop WRONG TEAM!§c""!" to {_Player}
  591.  
  592. message "{@P} Created a team with the following members:"
  593. message "{@P} %{_Buffer}%"
  594. loop all players:
  595. loop-player has the permission "teams.createteam.notify"
  596. loop-player is not command sender
  597. message "{@P} {@N} Created team with members:" to loop-player
  598. message "{@P} %{_Buffer}%" to loop-player
  599.  
  600. on command:
  601. command is equal to "scoreboard"
  602. substring of (full command) from 1 to 16 is equal to "scoreboard teams"
  603. command sender is not console
  604. cancel the event
  605. if command sender does not have the permission "team.showhandler":
  606. message "§cI'm sorry, but you do not have the permission to perform this command. Please contact the server administrators if you believe that this is in error."
  607. else:
  608. message "You dumbie. §9Use the team handler. §b/team help"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement