Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- THIS IS NOT A WORKING SKRIPT IT WILL BREAK DO NOT USE DOESNT EVEN WORK JUST FOR LOOKS
- options:
- P: &8[&bCaptains&8]&r
- command /captains [<text>] [<integer>] [<text>]:
- permission: skript.op
- trigger:
- if arg-1 is "set":
- arg-2 is set:
- command sender is op:
- command sender command "/team reset"
- delete {_PosCaptains::*}
- delete {Captains::*}
- delete {_TempCaptains::*}
- loop all players:
- delete {isCaptain.%loop-player%}
- wait 0.1 seconds
- set {_cTeamAmount} to arg-2
- loop all players:
- add loop-player to {_PosCaptains::*}
- loop {_cTeamAmount} times:
- add (random element out of {_PosCaptains::*}) to {_TempCaptains::*}
- set {Captains::*} to {_TempCaptains::*}
- set {chooseCaptains::*} to {_TempCaptains::*}
- remove {Captains::*} from {_PosCaptains::*}
- set {_TeamCount} to 0
- loop {_cTeamAmount} times:
- add 1 to {_TeamCount}
- command sender command "/team create %{_TeamCount}%"
- set {_Captain} to (random element out of {_TempCaptains::*})
- command sender command "/team join %{_TeamCount}% %{_Captain}%"
- remove {_Captain} from {_TempCaptains::*}
- wait 0.1 seconds
- wait 0.1 second
- loop {Captains::*}:
- broadcast "{@P} Captain of Team &a%{Teams.InTeam::%loop-value%}%&r: &b%loop-value%"
- set {isCaptain.%loop-value%} to true
- if arg-1 is "reset":
- command sender is op:
- delete {_PosCaptains::*}
- delete {Captains::*}
- delete {_CaptainTeam}
- delete {_TeamCount}
- delete {_TempCaptains::*}
- broadcast "{@P} Captains reset!"
- if arg-1 is "newpick":
- command sender is op:
- set {_pickingCaptain} to (random element out of {chooseCaptains::*})
- remove {_pickingCaptain} from {chooseCaptains::*}
- set {isChoosing.%{_pickingCaptain}%} to true
- broadcast "{@P} %{_pickingCaptain}% is picking!"
- if amount of {chooseCaptains::*} is less than 2:
- broadcast "{@P} New round starting after this pick!"
- if arg-1 is "newround":
- command sender is op:
- set {chooseCaptains::*} to {Captains::*}
- broadcast "{@P} New round started!"
- set {_pickingCaptain} to (random element out of {chooseCaptains::*})
- remove {_pickingCaptain} from {chooseCaptains::*}
- set {isChoosing.%{_pickingCaptain}%} to true
- broadcast "{@P} %{_pickingCaptain}% is picking!"
- command /cPick <player>:
- trigger:
- {isChoosing.%command sender%} is true:
- if {isCaptain.%arg%} is not set:
- {Teams.InTeam::%arg%} is not set:
- execute console command "/team join %{Teams.InTeam::%command sender%}% %arg%"
- broadcast "{@P} &a%command sender%&r picked &b%arg%!"
- set {isChoosing.%command sender%} to false
- else if {isCaptain.%arg%} is true:
- message "{@P} That person is a captain!"
- stop trigger
- {isChoosing.%command sender%} is false:
- message "{@P} You are not a captain or have already picked!"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement