Advertisement
Guest User

Untitled

a guest
Aug 10th, 2019
154
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.97 KB | None | 0 0
  1. # _ ___ ___
  2. # | | |___
  3. # |_ | |
  4. #
  5.  
  6. options:
  7. pref: &c[CTF]
  8. flag: red wool or blue wool
  9.  
  10. on skript start:
  11. set {redfwand} to stick with name "&cRed Flag"
  12. set {bluefwand} to stick with name "&3Blue Flag"
  13. set {redswand} to stick with name "&cRed Spawn"
  14. set {blueswand} to stick with name "&3Blue Spawn &7(This one last)"
  15. set {lspawnwand} to stick with name "&7Lobby Spawn"
  16.  
  17. on join:
  18. wait 1 tick
  19. set {team.%player%} to "lobby"
  20. teleport player to {ls.loc}
  21. set the player's display name to "&7%name of player%&f"
  22. set the player's tablist name to "&7%name of player%&f"
  23. clear inventory of player
  24.  
  25. command /test <number>:
  26. trigger:
  27. if arg-1 is 1:
  28. if block at {crf.loc} is red wool:
  29. broadcast "yes"
  30. else:
  31. broadcast "no"
  32. if arg-1 is 2:
  33. set block at {crf.loc} to red wool
  34. if arg-1 is 3:
  35. set block at {rf.loc} to red wool
  36.  
  37. command /ctf <text> [<text>]:
  38. trigger:
  39. if arg-1 is "help":
  40. message "{@pref} Here are the options for this command!"
  41. message "{@pref} /ctf help (This command)"
  42. message "{@pref} /ctf setup (To setup the arena)"
  43. message "{@pref} /ctf start (to start the game if it has not done so already)"
  44.  
  45. if arg-1 is "setup":
  46. clear inventory of player
  47. add {redfwand} to player
  48. add {redswand} to player
  49. add {bluefwand} to player
  50. add {blueswand} to player
  51.  
  52. if arg-1 is "join":
  53. if arg-2 is "red":
  54. set {team.%player%} to "red"
  55. set the player's display name to "&c[R] %name of player%&f"
  56. set the player's tablist name to "&c[R] %name of player%&f"
  57. kill player
  58.  
  59. if arg-2 is "blue":
  60. set {team.%player%} to "blue"
  61. set the player's display name to "&9[B] %name of player%&f"
  62. set the player's tablist name to "&9[B] %name of player%&f"
  63. kill player
  64. if arg-1 is "leave":
  65. set {team.%player%} to "lobby"
  66. teleport player to {ls.loc}
  67. set the player's display name to "&7%name of player%&f"
  68. set the player's tablist name to "&7%name of player%&f"
  69. clear inventory of player
  70.  
  71. on respawn:
  72. add a wooden sword to player
  73. set helmet of player to leather helmet
  74. set chestplate of player to leather chestplate
  75. set boots of player to iron boots
  76. set legs of player to iron leggings
  77. add a shears to player
  78. if {team.%player%} is "red":
  79. teleport player to {rs.loc}
  80. dye player's helmet red
  81. dye player's chestplate red
  82. if {team.%player%} is "blue":
  83. teleport player to {bs.loc}
  84. dye player's helmet blue
  85. dye player's chestplate blue
  86.  
  87. on drop:
  88. message "{@pref} You may not drop items!"
  89. cancel event
  90.  
  91. on death:
  92. set {dloc.%player%} to location of player
  93. if drops is {@flag}:
  94. if drops is red wool:
  95. broadcast "{@pref} &1%player%&f has dropped the Red flag!"
  96. set {crf.loc} to {dloc.%player%}
  97. set block at {crf.loc} to red wool
  98. if drops is blue wool:
  99. broadcast "{@pref} &4%player%&f has dropped the Blue flag!"
  100. set {cbf.loc} to {dloc.%player%}
  101. set block at {cbf.loc} to blue wool
  102. clear drops
  103.  
  104. on rightclick:
  105. if player is holding {redfwand}:
  106. set {rf.loc} to location of clicked block
  107. message "{@pref} Red Flag location set"
  108. set clicked block to red wool
  109.  
  110. if player is holding {redswand}:
  111. set {rs.loc} to block above clicked block
  112. message "{@pref} Red spawn location set"
  113.  
  114. if player is holding {bluefwand}:
  115. set {bf.loc} to location of clicked block
  116. message "{@pref} Blue Flag location set"
  117. set clicked block to blue wool
  118.  
  119. if player is holding {blueswand}:
  120. set {bs.loc} to block above clicked block
  121. message "{@pref} Blue spawn location set"
  122. clear inventory of player
  123. add {lspawnwand} to player
  124.  
  125. if player is holding {lspawnwand}:
  126. set {ls.loc} to block above clicked block
  127. message "{@pref} Lobby spawn location set"
  128. clear inventory of player
  129.  
  130. every 40 ticks:
  131. loop players:
  132. if loop-player is holding blue wool:
  133. set {cbf.loc} to loop-player's location
  134. if loop-player is holding red wool:
  135. set {crf.loc} to loop-player's location
  136.  
  137. if block at {rf.loc} is not red wool:
  138. launch ball large coloured red at {crf.loc} with duration 1
  139. if block at {bf.loc} is not blue wool:
  140. launch ball large coloured blue at {cbf.loc} with duration 1
  141.  
  142. on break of red wool or blue wool:
  143. if block is red wool:
  144. if {team.%player%} is "red":
  145. if location is {crf.loc}:
  146. set block at {rf.loc} to red wool
  147. if location is {rf.loc}:
  148. message "{@pref} You cant break your own flag."
  149. cancel event
  150. if {team.%player%} is "blue":
  151. if location is {rf.loc} or {crf.loc}:
  152. clear inventory of player
  153. give player 2304 of block
  154. broadcast "{@pref} %player%&f has the Red flag!"
  155. if block is blue wool:
  156. if {team.%player%} is "red":
  157. clear inventory of player
  158. give player 2304 of block
  159. broadcast "{@pref} %player%&f has the Blue flag!"
  160. if {team.%player%} is "blue":
  161. cancel event
  162. message "{@pref} You cant break your own flag."
  163.  
  164. #on place:
  165. # cancel event
  166. # message "{@pref} You can't place blocks"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement