Advertisement
Guest User

Untitled

a guest
Aug 30th, 2014
365
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #This is a fairly easy skript to edit, and it is fully customizable to the user. Under the "options" tab, you can change the colours of HighlightColour and ChatColour.
  2. #By WiNtErHaWX9
  3.  
  4.  
  5.  
  6. options:
  7. P : &8[&aAB&8]
  8. Correct: /ab <set/change/reset/enable/disable>
  9. ChatColour: &b
  10. HighlightColour: &e
  11.  
  12. command /ab [<text>]:
  13. permission: skript.ab
  14. trigger:
  15. if arg 1 is not set:
  16. message "{@P} {@ChatColour}{@Correct}" to command sender
  17. execute console command "playsound random.break %command sender%"
  18. if arg 1 is "reset":
  19. #Deletes Previous Settings
  20. delete {Team.Assaulter::*}
  21. delete {Team.Battery::*}
  22. delete {_assaulter}
  23. delete {_battery}
  24. delete {CannotBow::*}
  25. delete {CannotSword::*}
  26. delete {both::*}
  27. delete {assaulters::*}
  28. delete {batteries::*}
  29. loop all players:
  30. delete {class.%loop-player%::*}
  31. broadcast "{@P} {@ChatColour}Assault and Battery reset!"
  32.  
  33.  
  34. if arg 1 is "set":
  35. #Sets the new Assaulter & Battery
  36. if {Teams::*} is not set:
  37. message "{@P} {@ChatColour}No teams are set!"
  38. broadcast "{@P} {@ChatColour}Setting classes!"
  39. loop {Teams::*}:
  40. set {_PlayerPot.%loop-value%::*} to {Team.%loop-value%::*}
  41.  
  42.  
  43. #Set a Random Assaulter
  44. set {_assaulter} to (random element out of {_PlayerPot.%loop-value%::*})
  45. set {Iam.Assaulter::%{_assaulter}%} to loop-value
  46. set {Assaulter.TeamAssaulter::%loop-value%} to {_assaulter}
  47. remove {_assaulter} from {_PlayerPot.%loop-value%::*}
  48. set {CannotBow::%{_assaulter}%} to true
  49. add {_assaulter} to {assaulters::*}
  50.  
  51.  
  52.  
  53. #Set a Random Battery
  54. set {_battery} to (random element out of {_PlayerPot.%loop-value%::*})
  55. set {Team.Battery::%{_battery}%} to loop-value
  56. set {Battery.TeamBattery::%loop-value%} to {_battery}
  57. remove {_battery} from {_PlayerPot.%loop-value%::*}
  58. set {CannotSword::%{_battery}%} to true
  59. add {_battery} to {batteries::*}
  60.  
  61.  
  62. loop {Team.%loop-value%::*}:
  63. set {_Player} to ("%loop-value-2%" parsed as offlineplayer)
  64. if {_Player} is online:
  65. message "{@P} {@ChatColour}Assaulter: {@HighlightColour}%{_assaulter}%" to {_Player}
  66. message "{@P} {@ChatColour}Battery: {@HighlightColour}%{_battery}%" to {_Player}
  67.  
  68. if arg 1 is "enable":
  69. set {ab} to true
  70. broadcast "{@P} {@ChatColour}is now enabled!"
  71. if arg 1 is "disable":
  72. set {ab} to false
  73. broadcast "{@P} {@ChatColour}is now disabled!"
  74.  
  75.  
  76. #Attacking Events
  77.  
  78. on damage of player:
  79. if {ab} is true:
  80. if damage was caused by attack:
  81. if {CannotSword::%attacker%} is true:
  82. cancel the event
  83. if damage was caused by projectile:
  84. if {CannotBow::%attacker%} is true:
  85. cancel the event
  86.  
  87. #Classes
  88.  
  89. command /class:
  90. trigger:
  91. if player is {assaulters::*}:
  92. message "{@P} {@ChatColour}You are the {@HighlightColour}assaulter{@ChatColour}! You can only use your sword!"
  93. if player is {batteries::*}:
  94. message "{@P} {@ChatColour}You are the {@HighlightColour}battery{@ChatColour}! You can only use your bow!"
  95. if player is {both::*}:
  96. message "{@P} {@ChatColour}You are the {@HighlightColour}assaulter {@ChatColour}and {@HighlightColour}battery{@ChatColour}! You can both melee and sword!"
  97.  
  98. command /listclass:
  99. trigger:
  100. loop {assaulters::*}:
  101. message "{@P} &e===={@ChatColour}Assaulters&e===="
  102. message "{@P} {@ChatColour}- {@HighlightColour}%loop-value%"
  103. loop {batteries::*}:
  104. message "{@P} &e===={@ChatColour}Batteries&e===="
  105. message "{@P} {@ChatColour}- {@HighlightColour}%loop-value%"
  106. loop {both::*}:
  107. message "{@P} &e===={@ChatColour}Both&e===="
  108. message "{@P} {@ChatColour}- {@HighlightColour}%loop-value%"
  109.  
  110. #Death Event
  111.  
  112. on death of player:
  113. command "/team leave %victim%"
  114. loop {Teams::*}:
  115. if (size of ({Team.%loop-value%::*})) is 1:
  116. wait 1 second
  117. set {_both} to (first element out of {Team.%loop-value%::*})
  118. delete {CannotBow::%{_both}%}
  119. delete {CannotSword::%{_both}%}
  120. set {CanDo.Both::%loop-value%} to {_both}
  121. add {_both} to {both::*}
  122. remove {_both} from {assaulters::*}
  123. remove {_both} from {batteries::*}
  124. message "{@P} {@ChatColour}You can now bow and sword! Good luck!" to {_both}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement