Advertisement
Guest User

Untitled

a guest
Apr 25th, 2015
237
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 27.75 KB | None | 0 0
  1. options:
  2. P: &8&l[&7Teams&8&l]&7
  3.  
  4. command /team [<text>] [<player>] [<integer>] [<player>]:
  5. trigger:
  6. if arg-1 is "invite":
  7. if {teamsLocked} is not true:
  8. if arg-2 is a player:
  9. if {Teams.InTeam::%arg-2%} is not set:
  10. if {Teams.InTeam::%player%} is true:
  11. if {pendingteam::%player%::%arg-2%} is not set:
  12. set {pendingteam::%player%::%arg-2%} to true
  13. message "&8-----------------------------------------------------------" to player
  14. message "{@P} You have now invited &8%arg-2% &7to join your team!" to player
  15. message "&8-----------------------------------------------------------" to player
  16. message "&8-----------------------------------------------------------" to arg-2
  17. message "{@P} %player% has invited you to his/her team." to arg-2
  18. message "{@P} Type &8/team accept %player% &7to join!" to arg-2
  19. message "&8-----------------------------------------------------------" to arg-2
  20. else if {Teams.InTeam::%arg-2%} is not set:
  21. if {pendingteam::%player%::%arg-2%} is not set:
  22. set {pendingteam::%player%::%arg-2%} to true
  23. message "&8-----------------------------------------------------------" to player
  24. message "{@P} You have now invited &8%arg-2% &7to join your team!" to player
  25. message "&8-----------------------------------------------------------" to player
  26. message "&8-----------------------------------------------------------" to arg-2
  27. message "{@P} %player% has invited you to his/her team." to arg-2
  28. message "{@P} Type &8/team accept %player% &7to join!" to arg-2
  29. message "&8-----------------------------------------------------------" to arg-2
  30. else:
  31. message "&8-----------------------------------------------------------" to player
  32. message "{@P} You already invited that player to your team." to player
  33. message "{@P} Tell them to do &8/team accept %player%&7." to player
  34. message "&8-----------------------------------------------------------" to player
  35. else:
  36. message "&8-----------------------------------------------------------" to player
  37. message "{@P} That player is already on a team." to player
  38. message "&8-----------------------------------------------------------" to player
  39. else:
  40. message "&8-----------------------------------------------------------" to player
  41. message "{@P} Teams are locked. You cannot invite anyone!" to player
  42. message "&8-----------------------------------------------------------" to player
  43. else if arg-1 is "accept":
  44. if {teamsLocked} is not true:
  45. if {Teams.InTeam::%player%} is true:
  46. message "&8-----------------------------------------------------------" to player
  47. message "{@P} You are already on a team." to player
  48. message "{@P} Do &8/team leave &7to leave." to player
  49. message "&8-----------------------------------------------------------" to player
  50. else:
  51. if (size of {Team.%{teamleader::%arg-2%}%::*}) is less than {teamsize}:
  52. if {pendingteam::%arg-2%::%player%} is true:
  53. delete {pendingteam::%player%::*}
  54. #if {Teams::*} contains player:
  55.  
  56. #set {Team.%arg-2%::%player%} to player
  57. #set {Team.%arg-2%::%arg-2%} to arg-2
  58. #execute console command "/scoreboard teams join %arg-2% %player%"
  59. #execute console command "/scoreboard teams join %arg-2% %arg-2%"
  60. #set {teamleader::%player%} to arg-2
  61. if {Teams.InTeam::%arg-2%} is true:
  62. add player to {Team.%{teamleader::%arg-2%}%::*}
  63. set {teamleader::%player%} to {teamleader::%arg-2%}
  64. add player to {Teams.InTeam::*}
  65. execute console command "/scoreboard teams join %{teamleader::%arg-2%}% %player%"
  66. message "&8-----------------------------------------------------------" to player
  67. message "{@P} You have joined &8%{teamleader::%arg-2%}%&7's team!" to player
  68. message "&8-----------------------------------------------------------" to player
  69.  
  70. else:
  71. set {Teams::%arg-2%} to arg-2
  72. add player to {Team.%arg-2%::*}
  73. add arg-2 to {Team.%arg-2%::*}
  74. set {teamleader::%player%} to arg-2
  75. set {teamleader::%arg-2%} to arg-2
  76. execute console command "/scoreboard teams add %arg-2%"
  77. execute console command "/scoreboard teams join %arg-2% %player%"
  78. execute console command "/scoreboard teams join %arg-2% %arg-2%"
  79.  
  80. loop {Team.%{teamleader::%arg-2%}%::*}:
  81. if loop-value is not player:
  82. message "&8-----------------------------------------------------------" to loop-value
  83. message "{@P} &8%player% &7has joined your team." to loop-value
  84. message "&8-----------------------------------------------------------" to loop-value
  85. if {allTheColors} is not set:
  86. set {allTheColors} to true
  87. set {allColors::*} to "aqua", "black", "blue", "dark_aqua", "dark_blue", "dark_gray", "dark_green", "dark_purple", "dark_red", "gold", "gray", "green", "light_purple", "red" and "yellow"
  88. set {allColorsBold::*} to "aqua", "black", "blue", "dark_aqua", "dark_blue", "dark_gray", "dark_green", "dark_purple", "dark_red", "gold", "gray", "green", "light_purple", "red", "white" and "yellow"
  89. set {allColorsUnderline::*} to "aqua", "black", "blue", "dark_aqua", "dark_blue", "dark_gray", "dark_green", "dark_purple", "dark_red", "gold", "gray", "green", "light_purple", "red", "white" and "yellow"
  90. set {allColorsStrikethrough::*} to "aqua", "black", "blue", "dark_aqua", "dark_blue", "dark_gray", "dark_green", "dark_purple", "dark_red", "gold", "gray", "green", "light_purple", "red", "white" and "yellow"
  91. set {allColorsItalic::*} to "aqua", "black", "blue", "dark_aqua", "dark_blue", "dark_gray", "dark_green", "dark_purple", "dark_red", "gold", "gray", "green", "light_purple", "red", "white" and "yellow"
  92. set {allColorsBoldUnderline::*} to "aqua", "black", "blue", "dark_aqua", "dark_blue", "dark_gray", "dark_green", "dark_purple", "dark_red", "gold", "gray", "green", "light_purple", "red", "white" and "yellow"
  93. set {allColorsBoldStrikethrough::*} to "aqua", "black", "blue", "dark_aqua", "dark_blue", "dark_gray", "dark_green", "dark_purple", "dark_red", "gold", "gray", "green", "light_purple", "red", "white" and "yellow"
  94. set {allColorsBoldItalic::*} to "aqua", "black", "blue", "dark_aqua", "dark_blue", "dark_gray", "dark_green", "dark_purple", "dark_red", "gold", "gray", "green", "light_purple", "red", "white" and "yellow"
  95. set {allColorsUnderlineStrikethrough::*} to "aqua", "black", "blue", "dark_aqua", "dark_blue", "dark_gray", "dark_green", "dark_purple", "dark_red", "gold", "gray", "green", "light_purple", "red", "white" and "yellow"
  96. set {allColorsUnderlineItalic::*} to "aqua", "black", "blue", "dark_aqua", "dark_blue", "dark_gray", "dark_green", "dark_purple", "dark_red", "gold", "gray", "green", "light_purple", "red", "white" and "yellow"
  97. set {allColorsStrikethroughItalic::*} to "aqua", "black", "blue", "dark_aqua", "dark_blue", "dark_gray", "dark_green", "dark_purple", "dark_red", "gold", "gray", "green", "light_purple", "red", "white" and "yellow"
  98. set {allColorsBoldUnderlineStrikethrough::*} to "aqua", "black", "blue", "dark_aqua", "dark_blue", "dark_gray", "dark_green", "dark_purple", "dark_red", "gold", "gray", "green", "light_purple", "red", "white" and "yellow"
  99. set {allColorsBoldUnderlineItalic::*} to "aqua", "black", "blue", "dark_aqua", "dark_blue", "dark_gray", "dark_green", "dark_purple", "dark_red", "gold", "gray", "green", "light_purple", "red", "white" and "yellow"
  100. set {allColorsBoldStrikethroughItalic::*} to "aqua", "black", "blue", "dark_aqua", "dark_blue", "dark_gray", "dark_green", "dark_purple", "dark_red", "gold", "gray", "green", "light_purple", "red", "white" and "yellow"
  101. set {allColorsBoldUnderlineStrikethroughItalic::*} to "aqua", "black", "blue", "dark_aqua", "dark_blue", "dark_gray", "dark_green", "dark_purple", "dark_red", "gold", "gray", "green", "light_purple", "red", "white" and "yellow"
  102. set {allColorsRandom::*} to "aqua", "black", "blue", "dark_aqua", "dark_blue", "dark_gray", "dark_green", "dark_purple", "dark_red", "gold", "gray", "green", "light_purple", "red", "white" and "yellow"
  103. if {teamColor::%{teamleader::%arg-2%}%::Color} is not set:
  104. if (size of {allColors::*}) is greater than 0:
  105. set {_chosenColor} to (random element of {allColors::*})
  106. remove "%{_chosenColor}%" from {allColors::*}
  107. else if (size of {allColorsBold::*}) is greater than 0:
  108. set {_chosenColor} to (random element of {allColorsBold::*})
  109. remove {_chosenColor} from {allColorsBold::*}
  110. set {teamColor::%{teamleader::%arg-2%}%::Bold} to true
  111. else if (size of {allColorsUnderline::*}) is greater than 0:
  112. set {_chosenColor} to (random element of {allColorsUnderline::*})
  113. remove {_chosenColor} from {allColorsUnderline::*}
  114. set {teamColor::%{teamleader::%arg-2%}%::Underline} to true
  115. else if (size of {allColorsStrikethrough::*}) is greater than 0:
  116. set {_chosenColor} to (random element of {allColorsStrikethrough::*})
  117. remove {_chosenColor} from {allColorsStrikethrough::*}
  118. set {teamColor::%{teamleader::%arg-2%}%::Strikethrough} to true
  119. else if (size of {allColorsItalic::*}) is greater than 0:
  120. set {_chosenColor} to (random element of {allColorsItalic::*})
  121. remove {_chosenColor} from {allColorsItalic::*}
  122. set {teamColor::%{teamleader::%arg-2%}%::Italic} to true
  123. else if (size of {allColorsBoldUnderline::*}) is greater than 0:
  124. set {_chosenColor} to (random element of {allColorsBoldUnderline::*})
  125. remove {_chosenColor} from {allColorsBoldUnderline::*}
  126. set {teamColor::%{teamleader::%arg-2%}%::Bold} to true
  127. set {teamColor::%{teamleader::%arg-2%}%::Underline} to true
  128. else if (size of {allColorsBoldStrikethrough::*}) is greater than 0:
  129. set {_chosenColor} to (random element of {allColorsBoldStrikethrough::*})
  130. remove {_chosenColor} from {allColorsBoldStrikethrough::*}
  131. set {teamColor::%{teamleader::%arg-2%}%::Bold} to true
  132. set {teamColor::%{teamleader::%arg-2%}%::Strikethrough} to true
  133. else if (size of {allColorsBoldItalic::*}) is greater than 0:
  134. set {_chosenColor} to (random element of {allColorsBoldItalic::*})
  135. remove {_chosenColor} from {allColorsBoldItalic::*}
  136. set {teamColor::%{teamleader::%arg-2%}%::Bold} to true
  137. set {teamColor::%{teamleader::%arg-2%}%::Italic} to true
  138. else if (size of {allColorsUnderlineStrikethrough::*}) is greater than 0:
  139. set {_chosenColor} to (random element of {allColorsUnderlineStrikethrough::*})
  140. remove {_chosenColor} from {allColorsUnderlineStrikethrough::*}
  141. set {teamColor::%{teamleader::%arg-2%}%::Underline} to true
  142. set {teamColor::%{teamleader::%arg-2%}%::Strikethrough} to true
  143. else if (size of {allColorsUnderlineItalic::*}) is greater than 0:
  144. set {_chosenColor} to (random element of {allColorsUnderlineItalic::*})
  145. remove {_chosenColor} from {allColorsUnderlineItalic::*}
  146. set {teamColor::%{teamleader::%arg-2%}%::Underline} to true
  147. set {teamColor::%{teamleader::%arg-2%}%::Italic} to true
  148. else if (size of {allColorsStrikethroughItalic::*}) is greater than 0:
  149. set {_chosenColor} to (random element of {allColorsStrikethroughItalic::*})
  150. remove {_chosenColor} from {allColorsStrikethroughItalic::*}
  151. set {teamColor::%{teamleader::%arg-2%}%::Strikethrough} to true
  152. set {teamColor::%{teamleader::%arg-2%}%::Italic} to true
  153. else if (size of {allColorsBoldUnderlineStrikethrough::*}) is greater than 0:
  154. set {_chosenColor} to (random element of {allColorsBoldUnderlineStrikethrough::*})
  155. remove {_chosenColor} from {allColorsBoldUnderlineStrikethrough::*}
  156. set {teamColor::%{teamleader::%arg-2%}%::Bold} to true
  157. set {teamColor::%{teamleader::%arg-2%}%::Underline} to true
  158. set {teamColor::%{teamleader::%arg-2%}%::Strikethrough} to true
  159. else if (size of {allColorsBoldUnderlineItalic::*}) is greater than 0:
  160. set {_chosenColor} to (random element of {allColorsBoldUnderlineItalic::*})
  161. remove {_chosenColor} from {allColorsBoldUnderlineItalic::*}
  162. set {teamColor::%{teamleader::%arg-2%}%::Bold} to true
  163. set {teamColor::%{teamleader::%arg-2%}%::Underline} to true
  164. set {teamColor::%{teamleader::%arg-2%}%::Italic} to true
  165. else if (size of {allColorsBoldStrikethroughItalic::*}) is greater than 0:
  166. set {_chosenColor} to (random element of {allColorsBoldStrikethroughItalic::*})
  167. remove {_chosenColor} from {allColorsBoldStrikethroughItalic::*}
  168. set {teamColor::%{teamleader::%arg-2%}%::Bold} to true
  169. set {teamColor::%{teamleader::%arg-2%}%::Strikethrough} to true
  170. set {teamColor::%{teamleader::%arg-2%}%::Italic} to true
  171. else if (size of {allColorsBoldUnderlineStrikethroughItalic::*}) is greater than 0:
  172. set {_chosenColor} to (random element of {allColorsBoldStrikethroughItalic::*})
  173. remove {_chosenColor} from {allColorsBoldUnderlineStrikethroughItalic::*}
  174. set {teamColor::%{teamleader::%arg-2%}%::Bold} to true
  175. set {teamColor::%{teamleader::%arg-2%}%::Underline} to true
  176. set {teamColor::%{teamleader::%arg-2%}%::Strikethrough} to true
  177. set {teamColor::%{teamleader::%arg-2%}%::Italic} to true
  178. else if (size of {allColorsRandom::*}) is greater than 0:
  179. set {_chosenColor} to (random element of {allColorsRandom::*})
  180. set {teamColor::%{teamleader::%arg-2%}%::Color} to {_chosenColor}
  181. execute console command "/scoreboard teams option %{teamleader::%arg-2%}% color %{_chosenColor}%"
  182. message "&8-----------------------------------------------------------" to player
  183. message "{@P} You have joined &8%arg-2%&7's team!" to player
  184. message "&8-----------------------------------------------------------" to player
  185. delete {pendingteam::%arg-2%::%player%}
  186. execute console command "/scoreboard teams option %arg-2% color %{_chosenColor}%"
  187. if {teamColor::%{teamleader::%arg-2%}%::Bold} is true:
  188. execute console command "/bold %{teamleader::%arg-2%}%"
  189. if {teamColor::%{teamleader::%arg-2%}%::Underline} is true:
  190. execute console command "/underline %{teamleader::%arg-2%}%"
  191. if {teamColor::%{teamleader::%arg-2%}%::Strikethrough} is true:
  192. execute console command "/strikethrough %{teamleader::%arg-2%}%"
  193. if {teamColor::%{teamleader::%arg-2%}%::Italic} is true:
  194. execute console command "/italic %{teamleader::%arg-2%}%"
  195. set {Teams.InTeam::%player%} to true
  196. set {Teams.InTeam::%arg-2%} to true
  197.  
  198. else:
  199. message "&8-----------------------------------------------------------" to player
  200. message "{@P} This player did not send you a request!" to player
  201. message "&8-----------------------------------------------------------" to player
  202. else:
  203. message "&8-----------------------------------------------------------" to player
  204. message "{@P} That team is full!." to player
  205. message "&8-----------------------------------------------------------" to player
  206. else:
  207. message "&8-----------------------------------------------------------" to player
  208. message "{@P} Teams are locked. You cannot join that team!" to player
  209. message "&8-----------------------------------------------------------" to player
  210.  
  211. else if arg-1 is "lock":
  212. if player has permission "skript.op":
  213. set {teamsLocked} to true
  214. message "&8-----------------------------------------------------------" to player
  215. message "{@P} You have successfully locked teams!" to player
  216. message "&8-----------------------------------------------------------" to player
  217. else if arg-1 is "unlock":
  218. if player has permission "skript.op":
  219. set {teamsLocked} to false
  220. message "&8-----------------------------------------------------------" to player
  221. message "{@P} You have successfully unlocked teams!" to player
  222. message "&8-----------------------------------------------------------" to player
  223. else if arg-1 is "leave":
  224. if {teamsLocked} is not true:
  225. delete {Teams.InTeam::%player%}
  226. if {Teams::*} contains player:
  227. command "/scoreboard teams remove %player%"
  228. message "&8-----------------------------------------------------------" to player
  229. message "{@P} You have successfully left the team." to player
  230. message "&8-----------------------------------------------------------" to player
  231. delete {pendingteam::%player%::*}
  232. execute console command "/scoreboard teams leave %player%"
  233. remove player from {Team.InTeam::*}
  234. if (size of {Teams.%player%::*}) is less than 3:
  235. remove {teamleader::%player%} from {Teams::*}
  236. delete {Team.%player%::*}
  237. delete {Teams.InTeam::%player%}
  238. if {teamColor::%player%::Bold} and {teamColor::%player%::Underline} and {teamColor::%player%::Strikethrough} and {teamColor::%player%::Italic} is true:
  239. add "%{teamColor::%player%::Color}%" to {allColorsBoldUnderlineStrikethroughItalic::*}
  240. else if {teamColor::%player%::Bold} and {teamColor::%player%::Strikethrough} and {teamColor::%player%::Italic} is true:
  241. add "%{teamColor::%player%::Color}%" to {allColorsBoldStrikethroughItalic::*}
  242. else if {teamColor::%player%::Bold} and {teamColor::%player%::Underline} and {teamColor::%player%::Italic} is true:
  243. add "%{teamColor::%player%::Color}%" to {allColorsBoldUnderlineItalic::*}
  244. else if {teamColor::%player%::Bold} and {teamColor::%player%::Underline} and {teamColor::%player%::Strikethrough} is true:
  245. add "%{teamColor::%player%::Color}%" to {allColorsBoldUnderlineStrikethrough::*}
  246. else if {teamColor::%player%::Strikethrough} and {teamColor::%player%::Italic} is true:
  247. add "%{teamColor::%player%::Color}%" to {allColorsStrikethroughItalic::*}
  248. else if {teamColor::%player%::Underline} and {teamColor::%player%::Italic} is true:
  249. add "%{teamColor::%player%::Color}%" to {allColorsUnderlineItalic::*}
  250. else if {teamColor::%player%::Underline} and {teamColor::%player%::Strikethrough} is true:
  251. add "%{teamColor::%player%::Color}%" to {allColorsUnderlineStrikethrough::*}
  252. else if {teamColor::%player%::Bold} and {teamColor::%player%::Italic} is true:
  253. add "%{teamColor::%player%::Color}%" to {allColorsBoldItalic::*}
  254. else if {teamColor::%player%::Bold} and {teamColor::%player%::Strikethrough} is true:
  255. add "%{teamColor::%player%::Color}%" to {allColorsBoldStrikethrough::*}
  256. else if {teamColor::%player%::Bold} and {teamColor::%player%::Underline} is true:
  257. add "%{teamColor::%player%::Color}%" to {allColorsBoldUnderline::*}
  258. else if {teamColor::%player%::Italic} is true:
  259. add "%{teamColor::%player%::Color}%" to {allColorsItalic::*}
  260. else if {teamColor::%player%::Strikethrough} is true:
  261. add "%{teamColor::%player%::Color}%" to {allColorsStrikethrough::*}
  262. else if {teamColor::%player%::Underline} is true:
  263. add "%{teamColor::%player%::Color}%" to {allColorsUnderline::*}
  264. else if {teamColor::%player%::Bold} is true:
  265. add "%{teamColor::%player%::Color}%" to {allColorsBold::*}
  266. else:
  267. add "%{teamColor::%player%::Color}%" to {allColors::*}
  268. delete {teamColor::%player%::*}
  269.  
  270. else if (size of {Team.%player%::*}) is more than 0:
  271. remove player from {Team.%player%::*}
  272. set {_newTeam} to (random element of {Team.%player%::*})
  273. set {Teams::%{_newTeam}%} to {_newTeam}
  274. command "/scoreboard teams add %{_newTeam}%"
  275. set {teamColor::%{_newTeam}%::Color} to {teamColor::%player%::Color}
  276. command "/scoreboard teams join %{_newTeam}% %{_newTeam}%"
  277. loop {Team.%player%::*}:
  278. command "/scoreboard teams join %{_newTeam}% %loop-value%"
  279. set {teamleader::%loop-value%} to {_newTeam}
  280. set {Team.%{_newTeam}%::%loop-value%} to loop-value
  281. message "&8-----------------------------------------------------------" to loop-value
  282. message "{@P} Your team leader has left the team." to loop-value
  283. message "{@P} &8%{_newTeam}% &7is now your team leader." to loop-value
  284. message "&8-----------------------------------------------------------" to loop-value
  285. delete {teamleader::%player%}
  286. delete {Team.%player%::*}
  287. remove player from {Teams::*}
  288. remove player from {Teams.InTeam::*}
  289. if {teamColor::%player%::Bold} is true:
  290. command "/bold %{_newTeam}%"
  291. set {teamColor::%{_newTeam}%::Bold} to true
  292. if {teamColor::%player%::Underline} is true:
  293. command "/underline %{_newTeam}%"
  294. set {teamColor::%{_newTeam}%::Underline} to true
  295. if {teamColor::%player%::Strikethrough} is true:
  296. command "/strikethrough %{_newTeam}%"
  297. set {teamColor::%{_newTeam}%::Strikethrough} to true
  298. if {teamColor::%player%::Italic} is true:
  299. command "/italic %{_newTeam}%"
  300. set {teamColor::%{_newTeam}%::Italic} to true
  301. execute console command "/scoreboard teams option %{_newTeam}% color %{teamColor::%player%::Color}%"
  302. else:
  303. message "&8-----------------------------------------------------------" to player
  304. message "{@P} You are not on a team!" to player
  305. message "&8-----------------------------------------------------------" to player
  306. else:
  307. execute console command "/scoreboard teams leave %player%"
  308. remove player from {Team.%{teamleader::%player%}%::*}
  309. remove player from {Teams.InTeam::*}
  310. loop {Team.%{teamleader::%player%}%::*}:
  311. message "&8-----------------------------------------------------------" to loop-value
  312. message "{@P} %player% &7has left your team." to loop-value-1
  313. message "&8-----------------------------------------------------------" to loop-value
  314. message "&8-----------------------------------------------------------" to player
  315. message "{@P} You have successfully left the team." to player
  316. message "&8-----------------------------------------------------------" to player
  317. delete {Teams::%player%}
  318. delete {Team.%{teamleader::%player%}%::%player%}
  319. remove player from {Teams.InTeam::*}
  320. else:
  321. message "&8-----------------------------------------------------------" to player
  322. message "{@P} Teams are locked. You cannot leave that team!" to player
  323. message "&8-----------------------------------------------------------" to player
  324. else if arg-1 is "kick":
  325. if {teamsLocked} is not true:
  326. if {teamleader::%arg-2%} is player:
  327. #make arg-2 execute command "/team leave"
  328. if player is not arg-2:
  329. loop {Teams::*}:
  330. delete {Team.%loop-value%::%arg-2%}
  331. delete {Teams.InTeam::%arg-2%}
  332. delete {teamleader::%arg-2%}
  333. remove arg-2 from {Team.%player%::*}
  334. message "&8-----------------------------------------------------------" to arg-2
  335. message "{@P} You have been kicked from &8%player%&7's team." to arg-2
  336. message "&8-----------------------------------------------------------" to arg-2
  337. message "&8-----------------------------------------------------------" to player
  338. message "{@P} You have kicked &8%arg-2%&7 from your team." to player
  339. message "&8-----------------------------------------------------------" to player
  340. execute console command "/scoreboard teams leave %arg-2%"
  341. else:
  342. message "&8-----------------------------------------------------------" to player
  343. message "{@P} You cannot kick yourself!" to player
  344. message "&8-----------------------------------------------------------" to player
  345. else:
  346. message "&8-----------------------------------------------------------" to player
  347. message "{@P} You are not the team leader of that player's team." to player
  348. message "{@P} You should ask %{teamleader::%arg-2%}% to kick him." to player
  349. message "&8-----------------------------------------------------------" to player
  350. else:
  351. message "&8-----------------------------------------------------------" to player
  352. message "{@P} Teams are locked. You cannot kick that player!" to player
  353. message "&8-----------------------------------------------------------" to player
  354. else if arg-1 is "reset":
  355. if player has permission "skript.op":
  356. message "&8-----------------------------------------------------------" to player
  357. message "{@P} All teams reset!" to player
  358. message "&8-----------------------------------------------------------" to player
  359. delete {allColors::*}
  360. loop {Teams::*}:
  361. command "/scoreboard teams remove %loop-value%"
  362. delete {Team.%loop-value%::*}
  363. delete {Teams.InTeam::*}
  364. delete {Teams::*}
  365. delete {pendingteam::*}
  366. delete {teamColor::*}
  367. delete {allTheColors}
  368. delete {teamleader::*}
  369. else if arg-1 is "list":
  370. if {Teams::*} is set:
  371. message "&8-----------------------------------------------------------" to player
  372. message "{@P} -=[Teams]=-" to player
  373. loop {Teams::*}:
  374. message "{@P} &8%loop-value% -> %{Team.%loop-value%::*}%" to player
  375. message "&8-----------------------------------------------------------" to player
  376. else:
  377. message "&8-----------------------------------------------------------" to player
  378. message "{@P} No teams are set!" to player
  379. message "&8-----------------------------------------------------------" to player
  380. else if arg-1 is "set":
  381. if arg-2 is a player:
  382. if arg-4 is a player:
  383. make arg-2 execute command "/team leave"
  384. wait 2 ticks
  385. make arg-4 execute command "/team invite %arg-2%"
  386. wait 2 ticks
  387. make arg-2 execute command "/team accept %arg-4%"
  388. message "&8-----------------------------------------------------------" to player
  389. message "{@P} You have successfully added &8%arg-2%&7 to &8%arg-4%&7's team!" to player
  390. message "&8-----------------------------------------------------------" to player
  391. else if arg-1 is "leader":
  392. if arg-2 is a player:
  393. message "&8-----------------------------------------------------------" to player
  394. message "{@P} &8%arg-2%&7's team leader is &8%{teamleader::%arg-2%}%&7." to player
  395. message "&8-----------------------------------------------------------" to player
  396.  
  397.  
  398. else:
  399. message "-----------------------------------------------" to player
  400. message "{@P} &lTeam Commands"
  401. message "{@P} /team invite <player>" to player
  402. message "{@P} /team accept <player>" to player
  403. message "{@P} /team leave" to player
  404. message "{@P} /team kick <player>" to player
  405. message "{@P} /team list" to player
  406. message "{@P} /team leader <player>" to player
  407. message "{@P} /pm <message>" to player
  408. message "{@P} /pmcoords" to player
  409. message "-----------------------------------------------" to player
  410. if player has permission "skript.op":
  411. message "{@P} /team set <player> <team leader>" to player
  412. message "{@P} /team lock/unlock" to player
  413. message "{@P} /team reset" to player
  414. message "{@P} /setteamsize <integer>" to player
  415. message "-----------------------------------------------" to player
  416. command /setteamsize [<integer>]:
  417. trigger:
  418. set {teamsize} to arg-1
  419. message "{@P} Team size set to &8%arg-1%&7!" to player
  420. command /pm <text>:
  421. trigger:
  422. loop {Team.%player%::*}:
  423. if loop-value is not player:
  424. message "&8[TeamChat] &7%player% - %arg-1%" to loop-value
  425. command /pmcoords:
  426. trigger:
  427. loop {Team.%player%::*}:
  428. if loop-value is not player:
  429. message "{@P} &8%player%&7 is at %(player's location)%" to loop-value
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement