Advertisement
fleft17

Untitled

Jun 30th, 2014
260
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 23.14 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: &8[&bTeams&8]&r
  29. N: §9§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 "§r/team help §4- §7This help page"
  46. message "§r/team list §4- §7List teams"
  47. message "§r/team create [<id>] §4- §7Create Team"
  48. message "§r/team delete <id> §4- §7Delete Team"
  49. message "§r/team join <id> [<player=you>] §4- §7Put <player> in Team"
  50. message "§r/team leave [<player=you>] §4- §7Remove <player> from Team"
  51. message "§r/team color §4- §7Color all teams at once"
  52. message "§r/team uncolor §4- §7Decolor all teams"
  53. message "§r/team solos §4- §7View online players not in teams"
  54. message "§r/team soloinform §4- §7Tell solos to re-/helpop"
  55. message "§r/team tpbox §4- §7Teleport Teams into boxes"
  56. message "§r/team setboxwarp <id> §4- §7Set Teamboxwarp for <id>"
  57. message "§r/team rebuild §4- §7Rebuild teams, skip empty"
  58. message "§r/team random <size> <amount> [extend] §4- §7Create Random Teams"
  59. message "§r/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 "§rTeam &a%loop-value%&r:"
  69. loop {Team.%loop-value%::*}:
  70. message "§b§l- §r§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. {seeRemove.%{_TeamPlayer}%} is true:
  203. message "{@P} §6%{_Player}% §rhas been removed from your team." to {_TeamPlayer}
  204.  
  205. message "{@P} You were removed from §6Team %{_TeamNumber}%" to ("%{_Player}%" parsed as offlineplayer)
  206. {seeRemove.%command sender%} is true:
  207. message "{@P} Removed §c%{_Player}% §rfrom Team §6%{_TeamNumber}%"
  208. loop all players:
  209. loop-player has the permission "teams.join.notify"
  210. {seeRemove.%loop-player%} is true:
  211. loop-player is not command sender
  212. message "{@P} {@N} Removed §c%{_Player}% §rfrom Team §6%{_TeamNumber}%" to loop-player
  213.  
  214.  
  215.  
  216. else if arg 1 is equal to "color":
  217. if command sender does not have the permission "teams.color":
  218. message "{@P} §4Permission denied. §r(missing ""teams.color"")"
  219. else if arg 2 is set:
  220. message "{@P} {@IS}"
  221. else if {Teams::*} is not set:
  222. message "{@P} No teams to color!"
  223. else:
  224. 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"
  225.  
  226. loop {Teams::*}:
  227. add {Teams::*} to {TeamColor::*}
  228. set {_Color} to (random element out of {_Colors::*})
  229. remove {_Color} from {_Colors::*}
  230. command "/scoreboard teams option UHC%loop-value% color %{_Color}%"
  231. replace all "_" with " " in {_Color}
  232. loop {Team.%loop-value%::*}:
  233. message "{@P} Your team's color is %{_Color}%§r!" to ("%loop-value-2%" parsed as offlineplayer)
  234.  
  235.  
  236. message "{@P} Colored all teams"
  237. loop all players:
  238. loop-player has the permission "teams.color.notify"
  239. loop-player is not command sender
  240. message "{@P} {@N} Colored all teams" to loop-player
  241.  
  242.  
  243.  
  244. else if arg 1 is equal to "uncolor":
  245. if command sender does not have the permission "teams.uncolor":
  246. message "{@P} §4Permission denied. §r(missing ""teams.uncolor"")"
  247. else if arg 2 is set:
  248. message "{@P} {@IS}"
  249. else if {Teams::*} is not set:
  250. message "{@P} No teams to uncolor!"
  251. else:
  252. loop {Teams::*}:
  253. command "/scoreboard teams option UHC%loop-value% color reset"
  254. loop {Team.%loop-value%::*}:
  255. message "{@P} Your Team color was removed." to ("%loop-value-2%" parsed as offlineplayer)
  256.  
  257. message "{@P} Uncolored all teams"
  258. loop all players:
  259. loop-player has the permission "teams.uncolor.notify"
  260. loop-player is not command sender
  261. message "{@P} {@N} Uncolored all teams" to loop-player
  262. execute console command "/colorreset"
  263.  
  264.  
  265.  
  266.  
  267. else if arg 1 is equal to "solos":
  268. if command sender does not have the permission "teams.solos":
  269. message "{@P} §4Permission denied. §r(missing ""teams.solos"")"
  270. else if arg 2 is set:
  271. message "{@P} {@IS}"
  272. else:
  273. loop all players:
  274. {Teams.InTeam::%loop-player%} is not set
  275. add (name of loop-player) to {_Solos::*}
  276.  
  277. if {_Solos::*} is not set:
  278. message "{@P} There are no solos!"
  279. else:
  280. message "{@P} Solos: %join {_Solos::*} with "", ""%"
  281.  
  282.  
  283.  
  284. else if arg 1 is equal to "soloinform":
  285. if command sender does not have the permission "teams.soloinform":
  286. message "{@P} §4Permission denied. §r(missing ""teams.soloinform"")"
  287. else if arg 2 is set:
  288. message "{@P} {@IS}"
  289. else:
  290. loop all players:
  291. loop-player is not command sender
  292. if {Teams.InTeam::%loop-player%} is not set:
  293. command "/playsound note.pling %loop-player%"
  294. message "{@P} §4Warning! §rYou are not yet in a team." to loop-player
  295. message "{@P} If you have a set team, please re-§4/helpop §rit." to loop-player
  296. message "{@P} If you are solo, please ""§4/helpop I am solo§r""." to loop-player
  297. if loop-player has the permission "teams.soloinform.notify":
  298. message "{@P} {@N} Informed Solos" to loop-player
  299. message "{@P} Informed Solos"
  300.  
  301.  
  302. else if arg 1 is equal to "tpbox":
  303. if command sender does not have the permission "teams.tpbox":
  304. message "{@P} §4Permission denied. §r(missing ""teams.tpbox"")"
  305. else if arg 2 is set:
  306. message "{@P} {@IS}"
  307. else if (size of {TeamBoxWarps::*}) is smaller than (size of {Teams::*}):
  308. message "{@P} Too less warps!"
  309. else:
  310. set {_Count} to 0
  311. loop {Teams::*}:
  312. increase {_Count} by 1
  313. loop {Team.%loop-value%::*}:
  314. teleport ("%loop-value-2%" parsed as offlineplayer) to {TeamBoxWarps::%{_Count}%}
  315.  
  316. message "{@P} Teleported Teams in Boxes"
  317. loop all players:
  318. loop-player has the permission "teams.tpbox.notify"
  319. loop-player is not command sender
  320. message "{@P} {@N} Teleported Teams in Boxes" to loop-player
  321.  
  322.  
  323. else if arg 1 is equal to "setboxwarp":
  324. if command sender is console:
  325. message "{@P} {@IS}"
  326. if command sender does not have the permission "teams.setboxwarp":
  327. message "{@P} §4Permission denied. §r(missing ""teams.setboxwarp"")"
  328. else if arg 2 is not set:
  329. message "{@P} {@IS}"
  330. else if arg 3 is set:
  331. message "{@P} {@IS}"
  332. else:
  333. set {_WarpNumber} to ("%arg 2%" parsed as integer)
  334. if {_WarpNumber} is not set:
  335. message "{@P} {@IS}"
  336. else if {_WarpNumber} is smaller than 1:
  337. message "{@P} {@IS}"
  338. else:
  339. if {_WarpNumber} is not equal to 1:
  340. set {_TestWarpNumber} to {_WarpNumber}-1
  341. if {TeamBoxWarps::%{_TestWarpNumber}%} is not set:
  342. message "{@P} The previous warp %{_TestWarpNumber}% is not set!"
  343. stop
  344.  
  345.  
  346. set {TeamBoxWarps::%{_WarpNumber}%} to (location of (block at command sender))
  347. message "{@P} Configured Warp %{_WarpNumber}% to %{TeamBoxWarps::%{_WarpNumber}%}%"
  348.  
  349.  
  350.  
  351. else if arg 1 is equal to "rebuild":
  352. if command sender does not have the permission "teams.rebuild":
  353. message "{@P} §4Permission denied. §r(missing ""teams.rebuild"")"
  354. else if arg 2 is set:
  355. message "{@P} {@IS}"
  356. else:
  357. set {_TeamCount} to 0
  358. delete {Teams.InTeam::*}
  359. loop {Teams::*}:
  360. if (size of {Team.%loop-value%::*}) is not equal to 0:
  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. set {randomizingTeams} to true
  416. broadcast "{@P}&7 -------------------------------------------"
  417.  
  418. broadcast "{@P} Randomizing &a%arg 3% teams §9of %arg 2%§r..."
  419. loop all players:
  420. command "/playsound note.harp %loop-player%"
  421. wait 10 ticks
  422.  
  423. loop {_TeamAmount} times:
  424. command "/scoreboard teams add UHC%loop-number%"
  425. set {Teams::%loop-number%} to loop-number
  426. loop {_TeamSize} times:
  427. set {_Player} to (random element out of {_Players::*})
  428. remove {_Player} from {_Players::*}
  429. command "/scoreboard teams join UHC%loop-number-1% %{_Player}%"
  430. add {_Player} to {Team.%loop-number-1%::*}
  431. set {Teams.InTeam::%{_Player}%} to loop-number-1
  432.  
  433. loop {Teams::*}:
  434. loop {Team.%loop-value%::*}:
  435. set {_Player} to ("%loop-value-2%" parsed as offlineplayer)
  436. if {_Player} is online:
  437. message "{@P} &9Your team:" to {_Player}
  438. loop {Team.%loop-value-1%::*}:
  439. loop-value-3 is not equal to loop-value-2
  440. message "{@P} §a%loop-value-3%" to {_Player}
  441.  
  442. if arg 4 is set:
  443. if arg 4 is equal to "extend":
  444. set {_Extend} to true
  445.  
  446. if {_Extend} is not set:
  447. broadcast "{@P} &c&lTeams are randomized!"
  448. broadcast "{@P} §lGet into Teamspeak!"
  449. broadcast "{@P} Channels have been created by %command sender%."
  450. broadcast "{@P} Password = TS Team number"
  451. broadcast "{@P} Leaving now results in a ban."
  452. broadcast "{@P}&7 -------------------------------------------"
  453. set {randomizingTeams} to false
  454.  
  455.  
  456. loop all players:
  457. command "/playsound note.pling %loop-player%"
  458. wait 0.25 seconds
  459. loop all players:
  460. command "/playsound note.pling %loop-player%"
  461. wait 0.25 seconds
  462. loop all players:
  463. command "/playsound note.pling %loop-player%"
  464.  
  465.  
  466.  
  467.  
  468.  
  469.  
  470.  
  471.  
  472.  
  473. else if arg 1 is equal to "reset":
  474. if command sender does not have the permission "teams.reset":
  475. message "{@P} §4Permission denied. §r(missing ""teams.reset"")"
  476. else if arg 2 is set:
  477. message "{@P} {@IS}"
  478. else:
  479. loop {Teams::*}:
  480. command "/scoreboard teams remove UHC%loop-value%"
  481. delete {Team.%loop-value%::*}
  482. delete {Teams::*}
  483. delete {Teams.InTeam::*}
  484.  
  485. message "{@P} Team Manager Reset!"
  486. loop all players:
  487. loop-player has the permission "teams.reset.notify"
  488. loop-player is not command sender
  489. message "{@P} {@N} Reset all teams" to loop-player
  490.  
  491.  
  492. else if arg 1 is equal to "death":
  493. if {seeRemove.%command sender%} is not set:
  494. set {seeRemove.%command sender%} to true
  495. if {seeRemove.%command sender%} is true:
  496. set {seeRemove.%command sender%} to false
  497. stop
  498. if {seeRemove.%command sender%} is false:
  499. set {seeRemove.%command sender%} to true
  500. stop
  501.  
  502.  
  503.  
  504. else:
  505. command sender command "/team help"
  506.  
  507.  
  508. command /pm <text>:
  509. executable by: players
  510. trigger:
  511. if {Teams.InTeam::%command sender%} is not set:
  512. message "{@P} You are not in a team!"
  513. else:
  514. set {_Team} to {Teams.InTeam::%command sender%}
  515. loop all players:
  516. if {Teams.InTeam::%loop-player%} is equal to {_Team}:
  517. message "§f[§7§lTEAM§f] §e§o%command sender%§r: %arg 1%" to loop-player
  518. else if {PMSocialSpy::%loop-player%} is true:
  519. message "§f[§7§lPMS§f] §9[§f%{_Team}%§9] §e§o%command sender%§r: %arg 1%" to loop-player
  520.  
  521. command /fpm <text> <text>:
  522. permission: skript.forcepm
  523. usage: /fpm <team number/player> <text>
  524. trigger:
  525. set {_Number} to ("%arg 1%" parsed as integer)
  526. if {_Number} is set:
  527. if {Teams::%arg 1%} is not set:
  528. message "Team %arg 1% not defined."
  529. else:
  530. loop all players:
  531. {Teams.InTeam::%loop-player%} is equal to {_Number}
  532. message "§f[§7§lTEAM§f] §4§o%command sender%§r: %arg 1%" to loop-player
  533. else:
  534. if {Teams.InTeam::%arg 1%} is not set:
  535. message "Player %arg 1% not in a team."
  536. else:
  537. loop all players:
  538. {Teams.InTeam::%loop-player%} is equal to {Teams.InTeam::%arg 1%}
  539. message "§f[§7§lTEAM§f] §4§o%command sender%§r: %arg 1%" to loop-player
  540.  
  541. command /pms:
  542. permission: skript.pm.socialspy
  543. trigger:
  544. if {PMSocialSpy::%command sender%} is not set:
  545. set {PMSocialSpy::%command sender%} to true
  546. message "Team Socialspy now on"
  547. else:
  548. delete {PMSocialSpy::%command sender%}
  549. message "Team Socialspy now off"
  550.  
  551.  
  552.  
  553. command /ct <text> <text> [<text>] [<text>] [<text>] [<text>]:
  554. permission: teams.createteam
  555. usage: /ct <players> [up to 6]
  556. trigger:
  557. add (arg 1) to {_ThisTeam::*}
  558. add (arg 2) to {_ThisTeam::*}
  559. if arg 3 is set:
  560. add (arg 3) to {_ThisTeam::*}
  561. if arg 4 is set:
  562. add (arg 4) to {_ThisTeam::*}
  563. if arg 5 is set:
  564. add (arg 5) to {_ThisTeam::*}
  565. if arg 6 is set:
  566. add (arg 6) to {_ThisTeam::*}
  567.  
  568. loop {_ThisTeam::*}:
  569. {Teams.InTeam::%loop-value%} is set
  570. add loop-value to {_AlreadyOnTeam::*}
  571.  
  572. if {_AlreadyOnTeam::*} is set:
  573. message "{@P} The following players are already on a team."
  574. message "{@P} %join {_AlreadyOnTeam::*} with "", ""%"
  575. else:
  576. set {_TeamNumber} to 1
  577. while {Teams::%{_TeamNumber}%} is set:
  578. set {_TeamNumber} to {_TeamNumber}+1
  579.  
  580. set {Teams::%{_TeamNumber}%} to {_TeamNumber}
  581. command "/scoreboard teams add UHC%{_TeamNumber}%"
  582. loop {_ThisTeam::*}:
  583. set {Teams.InTeam::%loop-value%} to {_TeamNumber}
  584. add "%loop-value%" to {Team.%{_TeamNumber}%::*}
  585. command "/scoreboard teams join UHC%{_TeamNumber}% %loop-value%"
  586.  
  587. set {_Buffer} to ""
  588. loop {_ThisTeam::*}:
  589. set {_Player} to ("%loop-value%" parsed as offlineplayer)
  590. if {_Player} is online:
  591. set {_Buffer} to "%{_Buffer}%§a%loop-value% "
  592. else:
  593. set {_Buffer} to "%{_Buffer}%§c%loop-value% "
  594. command sender command "/wl add %loop-value%"
  595.  
  596. loop {_ThisTeam::*}:
  597. set {_Player} to ("%loop-value%" parsed as offlineplayer)
  598. command "/playsound note.pling %loop-value%"
  599. message "{@P} You have been put on a team with the following people!" to {_Player}
  600. message "{@P} %{_Buffer}%" to {_Player}
  601. message "{@P} Names in &cred &rare offline, but have been whitelisted!" to {_Player}
  602. message "{@P} Mistake? &cImmediately&r ""/helpop WRONG TEAM!""!" to {_Player}
  603.  
  604. message "{@P} Created a team with the following members:"
  605. message "{@P} %{_Buffer}%"
  606. loop all players:
  607. loop-player has the permission "teams.createteam.notify"
  608. loop-player is not command sender
  609. message "{@P} {@N} Created team with members:" to loop-player
  610. message "{@P} %{_Buffer}%" to loop-player
  611.  
  612.  
  613.  
  614.  
  615.  
  616. on chat:
  617. {randomizingTeams} is true:
  618. cancel the event
  619. #on command:
  620. # command is equal to "scoreboard"
  621. # substring of (full command) from 1 to 16 is equal to "scoreboard teams"
  622. # command sender is not console
  623. # cancel the event
  624. # if command sender does not have the permission "team.showhandler":
  625. # 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."
  626. # else:
  627. # message "You dumbie. §9Use the team handler. §b/team help"
  628.  
  629.  
  630.  
  631.  
  632.  
  633. # loop {Teams::*}:
  634. # {TeamColor::*} is false:
  635. # 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"
  636. # command "/scoreboard teams option UHC%loop-value% color %{_Color}%"
  637. # set {_newColors.%loop-value%} to a random integer between 1 and 3
  638. # if {_newColors} is 1:
  639. # execute console command "/bold UHC%loop-value%"
  640. # if {_newColors} is 2:
  641. # execute console command "/italic UHC%loop-value%"
  642. # if {_newColors} is 3:
  643. # execute console command "/underline UHC%loop-value%"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement