Advertisement
fleft17

Untitled

Jul 4th, 2014
282
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.94 KB | None | 0 0
  1. THIS IS NOT A WORKING SKRIPT IT WILL BREAK DO NOT USE DOESNT EVEN WORK JUST FOR LOOKS
  2.  
  3.  
  4. options:
  5. P: &8[&bCaptains&8]&r
  6.  
  7.  
  8. command /captains [<text>] [<integer>] [<text>]:
  9. permission: skript.op
  10. trigger:
  11. if arg-1 is "set":
  12. arg-2 is set:
  13. command sender is op:
  14. command sender command "/team reset"
  15. delete {_PosCaptains::*}
  16. delete {Captains::*}
  17. delete {_TempCaptains::*}
  18. loop all players:
  19. delete {isCaptain.%loop-player%}
  20. wait 0.1 seconds
  21. set {_cTeamAmount} to arg-2
  22. loop all players:
  23. add loop-player to {_PosCaptains::*}
  24. loop {_cTeamAmount} times:
  25. add (random element out of {_PosCaptains::*}) to {_TempCaptains::*}
  26. set {Captains::*} to {_TempCaptains::*}
  27. set {chooseCaptains::*} to {_TempCaptains::*}
  28. remove {Captains::*} from {_PosCaptains::*}
  29. set {_TeamCount} to 0
  30. loop {_cTeamAmount} times:
  31. add 1 to {_TeamCount}
  32. command sender command "/team create %{_TeamCount}%"
  33. set {_Captain} to (random element out of {_TempCaptains::*})
  34. command sender command "/team join %{_TeamCount}% %{_Captain}%"
  35. remove {_Captain} from {_TempCaptains::*}
  36. wait 0.1 seconds
  37.  
  38. wait 0.1 second
  39. loop {Captains::*}:
  40. broadcast "{@P} Captain of Team &a%{Teams.InTeam::%loop-value%}%&r: &b%loop-value%"
  41. set {isCaptain.%loop-value%} to true
  42.  
  43.  
  44. if arg-1 is "reset":
  45. command sender is op:
  46. delete {_PosCaptains::*}
  47. delete {Captains::*}
  48. delete {_CaptainTeam}
  49. delete {_TeamCount}
  50. delete {_TempCaptains::*}
  51. broadcast "{@P} Captains reset!"
  52.  
  53.  
  54. if arg-1 is "newpick":
  55. command sender is op:
  56. set {_pickingCaptain} to (random element out of {chooseCaptains::*})
  57. remove {_pickingCaptain} from {chooseCaptains::*}
  58. set {isChoosing.%{_pickingCaptain}%} to true
  59. broadcast "{@P} %{_pickingCaptain}% is picking!"
  60. if amount of {chooseCaptains::*} is less than 2:
  61. broadcast "{@P} New round starting after this pick!"
  62.  
  63. if arg-1 is "newround":
  64. command sender is op:
  65. set {chooseCaptains::*} to {Captains::*}
  66. broadcast "{@P} New round started!"
  67. set {_pickingCaptain} to (random element out of {chooseCaptains::*})
  68. remove {_pickingCaptain} from {chooseCaptains::*}
  69. set {isChoosing.%{_pickingCaptain}%} to true
  70. broadcast "{@P} %{_pickingCaptain}% is picking!"
  71.  
  72.  
  73.  
  74.  
  75.  
  76. command /cPick <player>:
  77. trigger:
  78. {isChoosing.%command sender%} is true:
  79. if {isCaptain.%arg%} is not set:
  80. {Teams.InTeam::%arg%} is not set:
  81. execute console command "/team join %{Teams.InTeam::%command sender%}% %arg%"
  82. broadcast "{@P} &a%command sender%&r picked &b%arg%!"
  83. set {isChoosing.%command sender%} to false
  84. else if {isCaptain.%arg%} is true:
  85. message "{@P} That person is a captain!"
  86. stop trigger
  87. {isChoosing.%command sender%} is false:
  88. message "{@P} You are not a captain or have already picked!"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement