Advertisement
70sOn7

Custom PvP

Nov 30th, 2017
157
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.57 KB | None | 0 0
  1. on load:
  2. broadcast " "
  3. broadcast "&6[Custom PvP]"
  4. broadcast " &7Status: &aEnabled"
  5. broadcast " "
  6. broadcast "&6Use '/cp help' to get help!"
  7. broadcast " "
  8. broadcast "&6Made By:"
  9. broadcast " &770sOn7"
  10.  
  11. command /cp [<text>] [<text>]:
  12. permission: cp.*
  13. permission message: &cYou cannot do this!
  14. trigger:
  15. if arg-1 is not set:
  16. send "&6/cp Help"
  17. if arg-1 is set:
  18. if arg-1 is "help":
  19. send "&6[CustomPvP]"
  20. send " &7* Commands:"
  21. send " &7* /cp setspawn (cp.*)"
  22. send " &7* /cp setprefix (cp.*)"
  23. send " &7* /cp help (cp.*)"
  24. send " &7* /cp reload (cp.*)"
  25. send " &7* /cp tpspawn (cp.*)"
  26. send " &7* /setstats (cp.setstats)"
  27. if arg-1 is "reload":
  28. broadcast "&6[CustomPvP]"
  29. broadcast " &7Reloading..."
  30. wait 5 seconds
  31. broadcast "&7 Reloaded!"
  32. if arg-1 is "setprefix":
  33. if arg-2 is not set:
  34. send "&c/cp SetPrefix (Prefix)"
  35. if arg-2 is set:
  36. set {prefix} to "%arg-2%"
  37. send "&6[CustomPvP]"
  38. send " &7You have set your new prefix!"
  39. send " &7Prefix:"
  40. send " %{prefix}%"
  41. if arg-1 is "setspawn":
  42. send "&6[CustomPvP]"
  43. send " &7Set spawn to %player's location%"
  44. set {spawn} to player's location
  45. if arg-1 is "tpspawn":
  46. if {spawn} is not set:
  47. send "&6[CustomPvP]"
  48. send "&7 You need to set the spawn using '/cp setspawn'"
  49. if {spawn} is set:
  50. send "&6[CustomPvP]"
  51. send " &7Teleported to spawn!"
  52. teleport player at {spawn}
  53.  
  54. on first join:
  55. set {elo.%player%} to 100
  56. set player's gamemode to adventure
  57. set {kills.%player%} to 0
  58. set {deaths.%player%} to 0
  59.  
  60. on join:
  61. clear player's inventory
  62. teleport player at {spawn}
  63. delete {ac.%player%}
  64. wait 1 second
  65. loop 300 times:
  66. send " " to player
  67. send " "
  68. send " &cWelcome back! "
  69. send " "
  70. send " &aElo:"
  71. send " &7%{elo.%player%}%"
  72. send " &aDeaths:"
  73. send " &7%{deaths.%player%}%"
  74. send " &aKills:"
  75. send " &7%{kills.%player%}%"
  76. send " &7&oGet these stats using /stats"
  77. set player's gamemode to adventure
  78.  
  79.  
  80. on death of player:
  81. if attacker is player:
  82. broadcast "&c%victim% &7has been killed by &c%attacker%"
  83. remove 7 from {elo.%victim%}
  84. add 7 to {elo.%attacker%}
  85. send "&7 +7 Elo" to attacker
  86. send "&7 -7 Elo" to victim
  87. add 1 to {kills.%attacker%}
  88. add 1 to {deaths.%victim%}
  89. teleport victim at {spawn}
  90. set {ac.%attacker%} to true
  91. wait 10 seconds
  92. if {ac.%attacker%} is true:
  93. delete {ac.%attacker%}
  94. send "&cYour Anti-Clean protection has been disabled!" to attacker
  95.  
  96. every second:
  97. loop all players:
  98. set loop-player's suffix to "&7 [%{elo.%loop-player%}%]"
  99.  
  100. on damage:
  101. if {ac.%victim%} is true:
  102. send "&c%victim% has Anti-Clean protection activated!" to attacker
  103. cancel event
  104. if {ac.%attacker%} is true:
  105. send "&cYour Anti-Clean protection has been disabled!" to attacker
  106. delete {ac.%attacker%}
  107.  
  108. command /stats [<offlineplayer>]:
  109. trigger:
  110. if arg-1 is not set:
  111. send " "
  112. send " &cStats of %player% "
  113. send " "
  114. send " &aElo:"
  115. send " &7%{elo.%player%}%"
  116. send " &aDeaths:"
  117. send " &7%{deaths.%player%}%"
  118. send " &aKills:"
  119. send " &7%{kills.%player%}%"
  120. if arg-1 is set:
  121. send " "
  122. send " &cStats of %arg-1% "
  123. send " "
  124. send " &aElo:"
  125. send " &7%{elo.%arg-1%}%"
  126. send " &aDeaths:"
  127. send " &7%{deaths.%arg-1%}%"
  128. send " &aKills:"
  129. send " &7%{kills.%arg-1%}%"
  130.  
  131. command /setstats [<offlineplayer>] [<text>] [<text>]:
  132. permission: cp.setstats
  133. permission message: &cYou cannot do this!
  134. trigger:
  135. if arg-1 is not set:
  136. send "&9Stats > &7/setstats (Player) (Stat Type) (Amount)"
  137. stop
  138. if arg-2 is not set:
  139. send "&9Stats > &7/setstats %arg-1% (Stat Type) (Amount)"
  140. stop
  141. if arg-2 is set:
  142. if arg-2 is not "elo":
  143. if arg-2 is not "kills":
  144. if arg-2 is not "deaths":
  145. send "&9Stats > &7The Stat Types are (Elo/Kills/Deaths)"
  146. stop
  147. if arg-3 is not set:
  148. send "&9Stats > &7/setstats %arg-1% %arg-3% (Amount)"
  149. stop
  150. if arg-1 is set:
  151. if arg-2 is set:
  152. if arg-3 is set:
  153. if arg-2 is "elo":
  154. set {elo.%arg-1%} to arg 3
  155. send "&9Stats > &7You have set &9%arg-1%'s &7Elo to %arg-3%!"
  156. stop
  157. if arg-2 is "kills":
  158. set {kills.%arg-1%} to arg 3
  159. send "&9Stats > &7You have set &9%arg-1%'s &7Kills to %arg-3%!"
  160. stop
  161. if arg-2 is "deaths":
  162. set {deaths.%arg-1%} to arg 3
  163. send "&9Stats > &7You have set &9%arg-1%'s &7Deaths to %arg-3%!"
  164. stop
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement