ArtzifyHD

BountyCPS

Aug 23rd, 2017
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.92 KB | None | 0 0
  1. #--------------------------------------------------------------------------------------------------
  2. #SC Bounty
  3. #Created by Sephiroth976
  4. #Version 1.2
  5. #--------------------------------------------------------------------------------------------------
  6. #OPTIONS
  7. Options:
  8. #This is what item will be used when setting a bounty on players, default is diamond.
  9. Item: diamond
  10. #Show bounty list on server join?
  11. JoinList: false
  12. #--------------------------------------------------------------------------------------------------
  13. #CREATE VARIABLES
  14. Variables:
  15. {bounty.%player%} = 0
  16. {bounty.onjoin.%player%} = true
  17. #--------------------------------------------------------------------------------------------------
  18. #SHOW LIST ON JOIN
  19. on join:
  20. {@JoinList} is true:
  21. {bounty.onjoin.%player%} is true:
  22. wait 3 ticks
  23. execute player command "/listbounty"
  24. #--------------------------------------------------------------------------------------------------
  25. #KILLING PLAYER FOR BOUNTY
  26. on death:
  27. attacker is a player
  28. attacker's name is not "%player%"
  29. {bounty.%player%} is more than 0:
  30. give {bounty.%player%} of {@Item} to attacker's inventory
  31. broadcast "<lime>%attacker% just collected the bounty on %player%'s head! <white>(<yellow>%{bounty.%player%}% {@Item}s<white>)"
  32. set {bounty.%player%} to 0
  33. #--------------------------------------------------------------------------------------------------
  34. #COMMANDS
  35. command /setbounty <player> <number>:
  36. executable by: player
  37. permission: bounty.set
  38. trigger:
  39. set {_item} to amount of {@Item} in the player's inventory
  40. set {_amount} to arg 2
  41. set {_amountitem} to "%arg 2% {@Item}"
  42. {_item} is greater than {_amount} - 1:
  43. {_amount} is greater than 0:
  44. remove {_amount} of {@Item} from player's inventory
  45. add {_amount} to {bounty.%arg 1%}
  46. broadcast "%player% just added %arg 2% {@Item}s to %arg 1%'s bounty!"
  47. broadcast "%arg 1%'s total bounty is now <yellow>%{bounty.%arg 1%}% {@Item}s"
  48. stop
  49. else:
  50. message "&dnicetry.jpg"
  51. else:
  52. message "<red>You dont have enough {@Item}s"
  53. command /bounty <player=%player%>:
  54. executable by: player
  55. permission: bounty.check
  56. trigger:
  57. message "Current bounty for %arg 1% is %{bounty.%arg 1%}% {@Item}s"
  58. command /listbounty:
  59. executable by: player
  60. permission: bounty.list
  61. trigger:
  62. set {_number} to 0
  63. message "<red>ONLINE PLAYERS WITH BOUNTIES:"
  64. loop all players:
  65. {bounty.%loop-player%} is more than 0:
  66. message "<lime>%loop-player% <white>(<yellow>%{bounty.%loop-player%}% {@Item}s<white>)"
  67. add 1 to {_number}
  68. {_number} is 0:
  69. message "<red>NONE!"
  70. command /clearbounty <player=%player%>:
  71. executable by: player
  72. permission: bounty.clear
  73. trigger:
  74. set {bounty.%arg 1%} to 0
  75. broadcast "<red>%arg 1%'s bounty was cleared by an admin"
  76. command /togglebounty:
  77. executable by: player
  78. permission: bounty.toggle
  79. trigger:
  80. {@JoinList} is true:
  81. {bounty.onjoin.%player%} is true:
  82. set {bounty.onjoin.%player%} to false
  83. message "<red>Toggled showing bounty list on join to OFF"
  84. stop
  85. {bounty.onjoin.%player%} is false:
  86. set {bounty.onjoin.%player%} to true
  87. message "<lime>Toggled showing bounty list on join to ON"
  88. stop
  89. message "<red>Showing list on login is disabled."
  90. #--------------------------------------------------------------------------------------------------
  91. command /cps [<player>]:
  92. usage: /cps <player>
  93. trigger:
  94. if arg 1 is set:
  95. if player have permission "pro.cps.other":
  96. if {autoclick.%arg 1%} is false:
  97. set {autoclick.%arg 1%} to true
  98. wait 1 second
  99. send "&4%arg 1% clicked %{sec.click.%arg 1%}% times this second"
  100. clear {sec.click.%arg 1%}
  101. wait 1 second
  102. send "&4%arg 1% clicked %{sec.click.%arg 1%}% times this second"
  103. clear {sec.click.%arg 1%}
  104. wait 1 second
  105. send "&4%arg 1% clicked %{sec.click.%arg 1%}% times this second"
  106. clear {sec.click.%arg 1%}
  107. wait 1 second
  108. send "&4%arg 1% clicked %{sec.click.%arg 1%}% times this second"
  109. clear {sec.click.%arg 1%}
  110. wait 1 second
  111. send "&4%arg 1% clicked %{sec.click.%arg 1%}% times this second"
  112. clear {sec.click.%arg 1%}
  113. wait 1 second
  114. send "&4%arg 1% clicked %{sec.click.%arg 1%}% times this second"
  115. clear {sec.click.%arg 1%}
  116. wait 1 second
  117. send "&4%arg 1% clicked %{sec.click.%arg 1%}% times this second"
  118. clear {sec.click.%arg 1%}
  119. wait 1 second
  120. send "&4%arg 1% clicked %{sec.click.%arg 1%}% times this second"
  121. clear {sec.click.%arg 1%}
  122. wait 1 second
  123. send "&4%arg 1% clicked %{sec.click.%arg 1%}% times this second"
  124. clear {sec.click.%arg 1%}
  125. wait 1 second
  126. send "&4%arg 1% clicked %{sec.click.%arg 1%}% times this second"
  127. send "&c%arg 1% &7has &c%{player.click.%arg 1%}/10% cps &7( &c%{player.click.%arg 1%}% clicks in 10 seconds )" to player
  128. clear {player.click.%arg 1%}
  129. clear {sec.click.%arg 1%}
  130. set {autoclick.%arg 1%} to false
  131. else:
  132. send "&4%arg 1% already have a cps checking him"
  133. else:
  134. send "&6You don't have permission to check cps of other players"
  135. if arg 1 is not set:
  136. if player have permission "pro.cps.me":
  137. if {autoclick.%player%} is false:
  138. set {autoclick.%player%} to true
  139. wait 1 second
  140. send "&6You clicked %{sec.click.%player%}% times this second"
  141. clear {sec.click.%player%}
  142. wait 1 second
  143. send "&6You clicked %{sec.click.%player%}% times this second"
  144. clear {sec.click.%player%}
  145. wait 1 second
  146. send "&6You clicked %{sec.click.%player%}% times this second"
  147. clear {sec.click.%player%}
  148. wait 1 second
  149. send "&6You clicked %{sec.click.%player%}% times this second"
  150. clear {sec.click.%player%}
  151. wait 1 second
  152. send "&6You clicked %{sec.click.%player%}% times this second"
  153. clear {sec.click.%player%}
  154. wait 1 second
  155. send "&6You clicked %{sec.click.%player%}% times this second"
  156. clear {sec.click.%player%}
  157. wait 1 second
  158. send "&6You clicked %{sec.click.%player%}% times this second"
  159. clear {sec.click.%player%}
  160. wait 1 second
  161. send "&6You clicked %{sec.click.%player%}% times this second"
  162. clear {sec.click.%player%}
  163. wait 1 second
  164. send "&6You clicked %{sec.click.%player%}% times this second"
  165. clear {sec.click.%player%}
  166. wait 1 second
  167. send "&6You clicked %{sec.click.%player%}% times this second"
  168. clear {sec.click.%player%}
  169. broadcast "&c%player% &7has &c%{player.click.%player%}/10% cps &7( &c%{player.click.%player%}% &7clicks in 10 seconds )"
  170. clear {player.click.%player%}
  171. clear {sec.click.%player%}
  172. set {autoclick.%player%} to false
  173. else:
  174. send "&4there is already a cps check running on you"
  175. else:
  176. send "&6You don't have permission to check your cps"
  177. on join:
  178. set {autoclick.%player%} to false
  179. on left click:
  180. {autoclick.%player%} is true
  181. add 1 to {player.click.%player%}
  182. add 1 to {sec.click.%player%}
Add Comment
Please, Sign In to add comment