Advertisement
fleft17

Untitled

Jul 28th, 2014
250
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 23.58 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?
  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} Permission 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} &ePermission 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 &e%{_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&e%{_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} &ePermission 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 &e%{_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 &e%{_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} &ePermission 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} &e%{_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 &eTeam %{_TeamNumber}%" to ("%{_Player}%" parsed as offlineplayer)
  169. message "{@P} Added &c%{_Player}% &rto Team &e%{_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 &e%{_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} &ePermission 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} &e%{_Player}% &rhas been removed from your team." to {_TeamPlayer}
  204.  
  205. message "{@P} You were removed from &eTeam %{_TeamNumber}%" to ("%{_Player}%" parsed as offlineplayer)
  206. {seeRemove.%command sender%} is true:
  207. message "{@P} Removed &c%{_Player}% &rfrom Team &e%{_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 &e%{_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} &ePermission denied. &a(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 if (size of {Teams::*}) is bigger than 40:
  224. message "{@P} Too many teams to color!"
  225. else:
  226. if (size of {Teams::*}) is smaller than 16:
  227. 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"
  228. else if (size of {Teams::*}) is smaller than 20:
  229. 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"
  230. else if (size of {Teams::*}) is equal to 20:
  231. 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"
  232. else:
  233. 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"
  234. set {_Other.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"
  235. set {_Format.Codes::*} to "bold", "italic", "strikethrough", and "underline"
  236. loop {Teams::*}:
  237. if loop-value is less than or equal to 21:
  238. set {_Color} to (random element out of {_Colors::*})
  239. remove {_Color} from {_Colors::*}
  240. command "/scoreboard teams option UHC%loop-value% color %{_Color}%"
  241. replace all "_" with " " in {_Color}
  242. loop {Team.%loop-value%::*}:
  243. message "{@P} Your Team color is <%{_Color}%>%{_Color}%!" to ("%loop-value-2%" parsed as offlineplayer)
  244. else:
  245. delete {_Colors::*}
  246. set {_Color} to (random element out of {_Other.Colors::*})
  247. set {_Format} to (random element out of {_Format.Codes::*})
  248. remove {_Color} from {_Other.Colors::*}
  249. command "/scoreboard teams option UHC%loop-value% color %{_Color}%"
  250. replace all "_" with " " in {_Color}
  251. loop {Team.%loop-value%::*}:
  252. message "{@P} Your Team color is <%{_Color}%><%{_Format}%>%{_Format}% %{_Color}%!" to ("%loop-value-2%" parsed as offlineplayer)
  253. execute console command "/%{_Format}% UHC%loop-value%"
  254.  
  255. message "{@P} Colored all teams"
  256. loop all players:
  257. loop-player has the permission "teams.color.notify"
  258. loop-player is not command sender
  259. message "{@P} {@N} Colored all teams" to loop-player
  260.  
  261.  
  262.  
  263. else if arg 1 is equal to "uncolor":
  264. if command sender does not have the permission "teams.uncolor":
  265. message "{@P} &ePermission denied. &a(missing ""teams.uncolor"")"
  266. else if arg 2 is set:
  267. message "{@P} {@IS}"
  268. else if {Teams::*} is not set:
  269. message "{@P} No teams to uncolor!"
  270. else:
  271. loop {Teams::*}:
  272. command "/scoreboard teams option UHC%loop-value% color reset"
  273. loop {Team.%loop-value%::*}:
  274. message "{@P} Your Team color was removed." to ("%loop-value-2%" parsed as offlineplayer)
  275.  
  276. message "{@P} Uncolored all teams"
  277. loop all players:
  278. loop-player has the permission "teams.uncolor.notify"
  279. loop-player is not command sender
  280. message "{@P} {@N} Uncolored all teams" to loop-player
  281.  
  282.  
  283.  
  284.  
  285. else if arg 1 is equal to "solos":
  286. if command sender does not have the permission "teams.solos":
  287. message "{@P} &ePermission denied. &r(missing ""teams.solos"")"
  288. else if arg 2 is set:
  289. message "{@P} {@IS}"
  290. else:
  291. loop all players:
  292. {Teams.InTeam::%loop-player%} is not set
  293. add (name of loop-player) to {_Solos::*}
  294.  
  295. if {_Solos::*} is not set:
  296. message "{@P} There are no solos!"
  297. else:
  298. message "{@P} Solos: %{_Solos::*}%"
  299.  
  300.  
  301.  
  302. else if arg 1 is equal to "soloinform":
  303. if command sender does not have the permission "teams.soloinform":
  304. message "{@P} &ePermission denied. &r(missing ""teams.soloinform"")"
  305. else if arg 2 is set:
  306. message "{@P} {@IS}"
  307. else:
  308. loop all players:
  309. loop-player is not command sender
  310. if {Teams.InTeam::%loop-player%} is not set:
  311. command "/playsound note.pling %loop-player%"
  312. message "{@P} &4Warning! &rYou are not yet in a team." to loop-player
  313. message "{@P} If you have a set team, please re-&4/helpop &rit." to loop-player
  314. message "{@P} If you are solo, please ""&4/helpop I am solo&r""." to loop-player
  315. if loop-player has the permission "teams.soloinform.notify":
  316. message "{@P} {@N} Informed Solos" to loop-player
  317. message "{@P} Informed Solos"
  318.  
  319.  
  320. else if arg 1 is equal to "tpbox":
  321. if command sender does not have the permission "teams.tpbox":
  322. message "{@P} &ePermission denied. &r(missing ""teams.tpbox"")"
  323. else if arg 2 is set:
  324. message "{@P} {@IS}"
  325. else if (size of {TeamBoxWarps::*}) is smaller than (size of {Teams::*}):
  326. message "{@P} Too less warps!"
  327. else:
  328. set {_Count} to 0
  329. loop {Teams::*}:
  330. increase {_Count} by 1
  331. loop {Team.%loop-value%::*}:
  332. teleport ("%loop-value-2%" parsed as offlineplayer) to {TeamBoxWarps::%{_Count}%}
  333.  
  334. message "{@P} Teleported Teams in Boxes"
  335. loop all players:
  336. loop-player has the permission "teams.tpbox.notify"
  337. loop-player is not command sender
  338. message "{@P} {@N} Teleported Teams in Boxes" to loop-player
  339.  
  340.  
  341. else if arg 1 is equal to "setboxwarp":
  342. if command sender is console:
  343. message "{@P} {@IS}"
  344. if command sender does not have the permission "teams.setboxwarp":
  345. message "{@P} &ePermission denied. &r(missing ""teams.setboxwarp"")"
  346. else if arg 2 is not set:
  347. message "{@P} {@IS}"
  348. else if arg 3 is set:
  349. message "{@P} {@IS}"
  350. else:
  351. set {_WarpNumber} to ("%arg 2%" parsed as integer)
  352. if {_WarpNumber} is not set:
  353. message "{@P} {@IS}"
  354. else if {_WarpNumber} is smaller than 1:
  355. message "{@P} {@IS}"
  356. else:
  357. if {_WarpNumber} is not equal to 1:
  358. set {_TestWarpNumber} to {_WarpNumber}-1
  359. if {TeamBoxWarps::%{_TestWarpNumber}%} is not set:
  360. message "{@P} The previous warp %{_TestWarpNumber}% is not set!"
  361. stop
  362.  
  363.  
  364. set {TeamBoxWarps::%{_WarpNumber}%} to (location of (block at command sender))
  365. message "{@P} Configured Warp %{_WarpNumber}% to %{TeamBoxWarps::%{_WarpNumber}%}%"
  366.  
  367.  
  368.  
  369. else if arg 1 is equal to "rebuild":
  370. if command sender does not have the permission "teams.rebuild":
  371. message "{@P} &ePermission denied. &r(missing ""teams.rebuild"")"
  372. else if arg 2 is set:
  373. message "{@P} {@IS}"
  374. else:
  375. set {_TeamCount} to 0
  376. delete {Teams.InTeam::*}
  377. loop {Teams::*}:
  378. if (size of {Team.%loop-value%::*}) is not equal to 0:
  379. set {_TeamCount} to {_TeamCount}+1
  380. set {_New.Team.%{_TeamCount}%::*} to {Team.%loop-value%::*}
  381. set {_New.Teams::%{_TeamCount}%} to {_TeamCount}
  382. delete {Team.%loop-value%::*}
  383. command "/scoreboard teams remove UHC%loop-value%"
  384.  
  385. delete {Teams::*}
  386. set {Teams::*} to {_New.Teams::*}
  387. loop {Teams::*}:
  388. command "/scoreboard teams add UHC%loop-value%"
  389. set {Team.%loop-value%::*} to {_New.Team.%loop-value%::*}
  390. loop {Team.%loop-value%::*}:
  391. set {Teams.InTeam::%loop-value-2%} to loop-value-1
  392. command "/scoreboard teams join UHC%loop-value-1% %loop-value-2%"
  393.  
  394. message "{@P} Issued Rebuild"
  395. loop all players:
  396. loop-player has the permission "teams.rebuild.notify"
  397. loop-player is not command sender
  398. message "{@P} {@N} Issued Rebuild" to loop-player
  399.  
  400.  
  401. else if arg 1 is equal to "random":
  402. if command sender does not have the permission "teams.random":
  403. message "{@P} &ePermission denied. &r(missing ""teams.random"")"
  404. else if arg 2 is not set:
  405. message "{@P} {@IS}"
  406. else if arg 3 is not set:
  407. message "{@P} {@IS}"
  408. else:
  409. set {_TeamSize} to ("%arg 2%" parsed as integer)
  410. set {_TeamAmount} to ("%arg 3%" parsed as integer)
  411. if {_TeamSize} is not set:
  412. message "{@P} {@IS}"
  413. else if {_TeamAmount} is not set:
  414. message "{@P} {@IS}"
  415. else if {_TeamSize} is less than 1:
  416. message "{@P} {@IS}"
  417. else if {_TeamAmount} is less than 1:
  418. message "{@P} {@IS}"
  419. else:
  420. loop all players:
  421. {Teams.InTeam::%loop-player%} is not set
  422. add (name of loop-player) to {_Players::*}
  423.  
  424. if ({_TeamSize}*{_TeamAmount}) is not equal to (size of {_Players::*}):
  425. message "{@P} The amount of people does not match."
  426. else:
  427. loop {Teams::*}:
  428. command "/scoreboard teams remove UHC%loop-value%"
  429. delete {Team.%loop-value%::*}
  430. delete {Teams.InTeam::*}
  431. delete {Teams::*}
  432.  
  433. broadcast "{@P} Randomizing &a%arg 3%&r teams of &a%arg 2%&r..."
  434. loop 100 times:
  435. execute console command "/sall note.bass 2"
  436. wait 0.01 seconds
  437. wait 10 ticks
  438.  
  439. loop {_TeamAmount} times:
  440. command "/scoreboard teams add UHC%loop-number%"
  441. set {Teams::%loop-number%} to loop-number
  442. loop {_TeamSize} times:
  443. set {_Player} to (random element out of {_Players::*})
  444. remove {_Player} from {_Players::*}
  445. command "/scoreboard teams join UHC%loop-number-1% %{_Player}%"
  446. add {_Player} to {Team.%loop-number-1%::*}
  447. set {Teams.InTeam::%{_Player}%} to loop-number-1
  448.  
  449. loop {Teams::*}:
  450. loop {Team.%loop-value%::*}:
  451. set {_Player} to ("%loop-value-2%" parsed as offlineplayer)
  452. if {_Player} is online:
  453. message "{@P} &9Your team:" to {_Player}
  454. loop {Team.%loop-value-1%::*}:
  455. loop-value-3 is not equal to loop-value-2
  456. message "{@P} &a&o%loop-value-3%" to {_Player}
  457.  
  458. if arg 4 is set:
  459. if arg 4 is equal to "extend":
  460. set {_Extend} to true
  461.  
  462. if {_Extend} is not set:
  463. broadcast "{@P} Teams are randomized!"
  464. else:
  465. broadcast "{@P} Get into Teamspeak!"
  466. broadcast "{@P} The Teamspeak IP is:"
  467. broadcast "{@P} ts.publicuhc.com"
  468. broadcast "{@P} Use /pm to talk to your team!"
  469. loop all players:
  470. command "/playsound random.explode %loop-player%"
  471.  
  472.  
  473.  
  474.  
  475. else if arg 1 is equal to "reset":
  476. if command sender does not have the permission "teams.reset":
  477. message "{@P} &ePermission denied. &r(missing ""teams.reset"")"
  478. else if arg 2 is set:
  479. message "{@P} {@IS}"
  480. else:
  481. loop {Teams::*}:
  482. command "/scoreboard teams remove UHC%loop-value%"
  483. delete {Team.%loop-value%::*}
  484. delete {Teams::*}
  485. delete {Teams.InTeam::*}
  486.  
  487. message "{@P} Reset!"
  488. loop all players:
  489. loop-player has the permission "teams.reset.notify"
  490. loop-player is not command sender
  491. message "{@P} {@N} Reset all teams" to loop-player
  492.  
  493. else if arg 1 is equal to "death":
  494. if {seeRemove.%command sender%} is not set:
  495. set {seeRemove.%command sender%} to true
  496. message "{@P} Leave notifications enabled!"
  497. stop
  498. if {seeRemove.%command sender%} is true:
  499. set {seeRemove.%command sender%} to false
  500. message "{@P} Leave notifications disabled!"
  501. stop
  502. if {seeRemove.%command sender%} is false:
  503. set {seeRemove.%command sender%} to true
  504. message "{@P} Leave notifications disabled!"
  505. stop
  506.  
  507.  
  508. else if arg 1 is equal to "friendly" or "fire":
  509. if arg-2 is "on":
  510. loop {Teams::*}:
  511. execute console command "/scoreboard teams option %loop-value% friendlyfire true"
  512. broadcast "{@P} Friendly fire enabled!"
  513.  
  514. if arg-2 is "off":
  515. loop {Teams::*}:
  516. execute console command "/scoreboard teams option %loop-value% friendlyfire false"
  517. broadcast "{@P} Friendly fire disabled!"
  518.  
  519. else:
  520. command sender command "/team help"
  521.  
  522.  
  523.  
  524.  
  525.  
  526. command /pm <text>:
  527. executable by: players
  528. trigger:
  529. if {Teams.InTeam::%command sender%} is not set:
  530. message "{@P} You are not in a team!"
  531. else:
  532. set {_Team} to {Teams.InTeam::%command sender%}
  533. loop all players:
  534. if {Teams.InTeam::%loop-player%} is equal to {_Team}:
  535. message "&f[&7&lTEAM&f] &e&o%command sender%&r: %arg 1%" to loop-player
  536. else if {PMSocialSpy::%loop-player%} is true:
  537. message "&f[&7&lPMS&f] &9[&f%{_Team}%&9] &e&o%command sender%&r: %arg 1%" to loop-player
  538.  
  539. command /fpm <text> <text>:
  540. permission: skript.forcepm
  541. usage: /fpm <team number/player> <text>
  542. trigger:
  543. set {_Number} to ("%arg 1%" parsed as integer)
  544. if {_Number} is set:
  545. if {Teams::%arg 1%} is not set:
  546. message "Team %arg 1% not defined."
  547. else:
  548. loop all players:
  549. {Teams.InTeam::%loop-player%} is equal to {_Number}
  550. message "&f[&7&lTEAM&f] &4&o%command sender%&r: %arg 1%" to loop-player
  551. else:
  552. if {Teams.InTeam::%arg 1%} is not set:
  553. message "Player %arg 1% not in a team."
  554. else:
  555. loop all players:
  556. {Teams.InTeam::%loop-player%} is equal to {Teams.InTeam::%arg 1%}
  557. message "&f[&7&lTEAM&f] &4&o%command sender%&r: %arg 1%" to loop-player
  558.  
  559. command /pms:
  560. permission: skript.pm.socialspy
  561. trigger:
  562. if {PMSocialSpy::%command sender%} is not set:
  563. set {PMSocialSpy::%command sender%} to true
  564. message "Team Socialspy now on"
  565. else:
  566. delete {PMSocialSpy::%command sender%}
  567. message "Team Socialspy now off"
  568.  
  569.  
  570.  
  571. command /ct <text> <text> [<text>] [<text>] [<text>] [<text>]:
  572. permission: teams.createteam
  573. usage: /ct <players> [up to 6]
  574. trigger:
  575. add (arg 1) to {_ThisTeam::*}
  576. add (arg 2) to {_ThisTeam::*}
  577. if arg 3 is set:
  578. add (arg 3) to {_ThisTeam::*}
  579. if arg 4 is set:
  580. add (arg 4) to {_ThisTeam::*}
  581. if arg 5 is set:
  582. add (arg 5) to {_ThisTeam::*}
  583. if arg 6 is set:
  584. add (arg 6) to {_ThisTeam::*}
  585.  
  586. loop {_ThisTeam::*}:
  587. {Teams.InTeam::%loop-value%} is set
  588. add loop-value to {_AlreadyOnTeam::*}
  589.  
  590. if {_AlreadyOnTeam::*} is set:
  591. message "{@P} The following players are already on a team."
  592. message "{@P} %join {_AlreadyOnTeam::*} with "", ""%"
  593. else:
  594. set {_TeamNumber} to 1
  595. while {Teams::%{_TeamNumber}%} is set:
  596. set {_TeamNumber} to {_TeamNumber}+1
  597.  
  598. set {Teams::%{_TeamNumber}%} to {_TeamNumber}
  599. command "/scoreboard teams add UHC%{_TeamNumber}%"
  600. loop {_ThisTeam::*}:
  601. set {Teams.InTeam::%loop-value%} to {_TeamNumber}
  602. add "%loop-value%" to {Team.%{_TeamNumber}%::*}
  603. command "/scoreboard teams join UHC%{_TeamNumber}% %loop-value%"
  604.  
  605. set {_Buffer} to ""
  606. loop {_ThisTeam::*}:
  607. set {_Player} to ("%loop-value%" parsed as offlineplayer)
  608. if {_Player} is online:
  609. set {_Buffer} to "%{_Buffer}%&a%loop-value% "
  610. else:
  611. set {_Buffer} to "%{_Buffer}%&c%loop-value% "
  612. command sender command "/wl add %loop-value%"
  613.  
  614. loop {_ThisTeam::*}:
  615. set {_Player} to ("%loop-value%" parsed as offlineplayer)
  616. command "/playsound note.pling %loop-value%"
  617. message "{@P} You have been put on a team with the following people!" to {_Player}
  618. message "{@P} %{_Buffer}%" to {_Player}
  619. message "{@P} Names in &cred &rare offline, but have been whitelisted!" to {_Player}
  620. message "{@P} Mistake? &cImmediately&r ""/helpop WRONG TEAM!""!" to {_Player}
  621.  
  622. message "{@P} Created a team with the following members:"
  623. message "{@P} %{_Buffer}%"
  624. loop all players:
  625. loop-player has the permission "teams.createteam.notify"
  626. loop-player is not command sender
  627. message "{@P} {@N} Created team with members:" to loop-player
  628. message "{@P} %{_Buffer}%" to loop-player
  629.  
  630.  
  631.  
  632. on chat:
  633. {RandomTeams} is true:
  634. cancel the event
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement