Advertisement
Winter__

Untitled

Aug 12th, 2014
180
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.96 KB | None | 0 0
  1. command /setkiller [<player>] [<integer>]:
  2. permission: skript.setkiller
  3. description: Sets official killers, replaces old killers
  4. trigger:
  5. if arg 1 is not set:
  6. message "{@P} &e/setkiller <player> <killer ##>"
  7. else if arg 2 is not set:
  8. message "{@P} &e/setkiller <player> <killer ##>"
  9. else if arg 2 is greater than 8:
  10. message "{@P} There are not enough killers!"
  11. else:
  12. # Gets rid of previous captains
  13.  
  14. loop {Captain.%arg 2%::*}:
  15. loop-value is not equal to arg 1
  16. set {_OldCaptain} to loop-value
  17. delete {Captain.%arg 2%::*}
  18. delete {Captain.CaptainOf::%{_OldCaptain}%}
  19. delete {Captains::%arg 2%}
  20. loop {Captains::*}:
  21. loop {Captain.%loop-value-1%::*}:
  22. loop-value-2 is equal to arg 1
  23. delete {Captain.%loop-value-1%::%arg 1%}
  24. if {_OldCaptain} is online:
  25. execute console command "/warp killercaptains %{_OldCaptain}%"
  26. set {_Player} to {_OldCaptain}
  27. set {_Team} to {Teams.InTeam::%{_Player}%}
  28. remove {_Player} from {Team.%{_Team}%::*}
  29. delete {Teams.InTeam::%{_Player}%}
  30. command "/scoreboard teams leave %{_Player}%"
  31.  
  32. # Sets a new captain
  33. set {_CaptainNumber} to arg 2
  34. set {_Captain} to arg 1
  35. set {Captains::%{_CaptainNumber}%} to {_CaptainNumber}
  36. set {Captain.CaptainOf::%arg 1%} to {_CaptainNumber}
  37. add {_Captain} to {Captain.%arg 2%::*}
  38. broadcast "{@P} &e%arg 1% &bis the killer of &eTeam %arg 2%&b!"
  39.  
  40. # Removes them from the team
  41. set {_Player} to arg 1
  42. set {_Team} to {Teams.InTeam::%{_Player}%}
  43. remove {_Player} from {Team.%{_Team}%::*}
  44. delete {Teams.InTeam::%{_Player}%}
  45. command "/scoreboard teams leave %{_Player}%"
  46.  
  47. # Adds them to the team
  48. set {_Player} to arg 1
  49. set {_TeamNumber} to arg 2
  50. set {Teams.InTeam::%{_Player}%} to {_TeamNumber}
  51. add {_Player} to {Team.%{_TeamNumber}%::*}
  52. command "/scoreboard teams join UHC%{_TeamNumber}% %{_Player}%"
  53.  
  54. command /killercaptainsbox:
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement