Advertisement
fleft17

Untitled

Oct 11th, 2014
332
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.43 KB | None | 0 0
  1. options:
  2.  
  3. P: &8[&6Jack&bpot&8]
  4. C: &f
  5. H: &d
  6.  
  7. Scenario: Jackpot
  8. Command: /jackpot
  9. Permission: skript.jackpot
  10. ScenarioCreator: ShutUpBrick
  11. Skripter: Fleft
  12.  
  13. UseScoreboard: true
  14. Name: &8[&bJackpot&8]
  15. ScoreboardGold: &6Gold
  16. ScoreboardDiamond: &bDiamond
  17.  
  18. BroadcastWhenMined: true
  19. BroadcastPlayerNameWhenMined: true
  20.  
  21.  
  22.  
  23. command {@Command} [<text>]:
  24. trigger:
  25. if arg-1 is "on" or "enable":
  26. command sender has permission "{@Permission}":
  27. if {Jackpot::Enabled} is not set:
  28. set {Jackpot::Enabled} to true
  29. set {Jackpot::Count::Diamonds} to 0
  30. set {Jackpot::Count::Gold} to 0
  31. if {@UseScoreboard} is true:
  32. execute console command "/scoreboard objectives add {@Name} dummy"
  33. execute console command "/scoreboard objectives setdisplay sidebar"
  34. wait 1 tick
  35. execute console command "/scoreboard objectives setdisplay sidebar {@Name}"
  36. broadcast "{@P}{@C} Enabled by {@H}%command sender%!"
  37. else:
  38. message "{@P}{@C} Already enabled!" to the command sender
  39. stop trigger
  40. else:
  41. execute console command "/playsound random.break %command sender% ~ ~ ~ 1 1 1"
  42. message "{@P}{@C} You don't have permission for that!" to the command sender
  43.  
  44. else if arg-1 is "off" or "disable":
  45. command sender has permission "{@Permission}":
  46. if {Jackpot::Enabled} is true:
  47. delete {Jackpot::*}
  48. if {@UseScoreboard} is true:
  49. execute console command "/scoreboard objectives remove {@Name}"
  50. wait 1 tick
  51. execute console command "/scoreboard players reset {@ScoreboardDiamond}"
  52. execute console command "/scoreboard players reset {@ScoreboardGold}"
  53. broadcast "{@P}{@C} Disabled by {@H}%command sender%!"
  54. else:
  55. message "{@P}{@C} Already disabled!" to the command sender
  56. stop trigger
  57. else:
  58. execute console command "/playsound random.break %command sender% ~ ~ ~ 1 1 1"
  59. message "{@P}{@C} You don't have permission for that!" to the command sender
  60.  
  61.  
  62. else if arg-1 is "toggle" or "switch":
  63. if {Jackpot::Enabled} is true:
  64. command sender command "/{@Command} off"
  65. stop trigger
  66. if {Jackpot::Enabled} is not set:
  67. command sender command "/{@Command} on"
  68. stop trigger
  69.  
  70. else if arg-1 is "reset":
  71. broadcast "{@P}{@C} %command sender% reset the count!"
  72. set {Jackpot::Count::Diamonds} to 0
  73. set {Jackpot::Count::Gold} to 0
  74. execute console command "/scoreboard players set {@ScoreboardDiamond} {@Name} 0"
  75. execute console command "/scoreboard players set {@ScoreboardGold} {@Name} 0"
  76.  
  77. else if arg-1 is "help" or "?" or "question" or "info" or "information":
  78. message "" to the command sender
  79. if command sender has permission "{@Permission}":
  80. message "{@P}{@C} /{@Command} {@H}on/off/toggle" to the command sender
  81. message "{@P}{@C} Scenario by: {@H}{@ScenarioCreator}"
  82. message "{@P}{@C} Skript: {@H}{@Skripter}" to the command sender
  83.  
  84. else if arg-1 is not set:
  85. command sender command "/{@Command} help"
  86. else:
  87. command sender command "/{@Command} help"
  88.  
  89.  
  90.  
  91.  
  92.  
  93. on death of player:
  94. if {Jackpot::Enabled} is true:
  95. victim is in "world"
  96. if {@UseScoreboard} is true:
  97. execute console command "/scoreboard players set {@ScoreboardDiamond} {@Name} 1"
  98. execute console command "/scoreboard players set {@ScoreboardGold} {@Name} 1"
  99. execute console command "/scoreboard players set {@ScoreboardDiamond} {@Name} 0"
  100. execute console command "/scoreboard players set {@ScoreboardGold} {@Name} 0"
  101.  
  102. attacker is player:
  103. set {_loc} to location of victim
  104. broadcast "{@P}{@C} %attacker% killed %victim%!"
  105. broadcast "{@P}{@C} Jackpot: &b%{Jackpot::Count::Diamonds}% diamonds{@C} and &6%{Jackpot::Count::Gold}% gold!"
  106. loop {Jackpot::Count::Diamonds} times:
  107. drop 1 diamond at {_loc}
  108. loop {Jackpot::Count::Gold} times:
  109. drop 1 gold ingot at {_loc}
  110.  
  111. set {Jackpot::Count::Diamonds} to 0
  112. set {Jackpot::Count::Gold} to 0
  113.  
  114. else:
  115. set {_loc} to location of victim
  116. broadcast "{@P}{@C} %victim% died at %{_loc}%!"
  117. broadcast "{@P}{@C} Jackpot: &b%{Jackpot::Count::Diamonds}% diamonds{@C} and &6%{Jackpot::Count::Gold}% gold!"
  118. loop {Jackpot::Count::Diamonds} times:
  119. drop 1 diamond at {_loc}
  120. loop {Jackpot::Count::Gold} times:
  121. drop 1 gold ingot at {_loc}
  122.  
  123. set {Jackpot::Count::Diamonds} to 0
  124. set {Jackpot::Count::Gold} to 0
  125.  
  126.  
  127. on mine:
  128. {Jackpot::Enabled} is true:
  129. event-block is diamond ore:
  130. if {@BroadcastWhenMined} is true:
  131. if {@BroadcastPlayerNameWhenMined} is true:
  132. broadcast "{@P}{@C} %event-player% mined a &bdiamond!"
  133. else:
  134. broadcast "{@P}{@C} Someone mined a &bdiamond!"
  135. add 1 to {Jackpot::Count::Diamonds}
  136. cancel the event
  137. set the block to air
  138. drop 1 diamond at event-block
  139. loop 7 times:
  140. spawn 1 experience orb at event-block
  141. if {@UseScoreboard} is true:
  142. execute console command "/scoreboard players add {@ScoreboardDiamond} {@Name} 1"
  143. else if event-block is gold ore:
  144. if {@BroadcastWhenMined} is true:
  145. if {@BroadcastPlayerNameWhenMined} is true:
  146. broadcast "{@P}{@C} %event-player% mined &6gold!"
  147. else:
  148. broadcast "{@P}{@C} Someone mined a &6gold!"
  149. add 1 to {Jackpot::Count::Gold}
  150. cancel the event
  151. set the block to air
  152. drop 1 gold ingot at event-block
  153. spawn 1 experience orb at event-block
  154. if {@UseScoreboard} is true:
  155. execute console command "/scoreboard players add {@ScoreboardGold} {@Name} 1"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement