Advertisement
Guest User

Dan's Best PvE by: Bitlington

a guest
Jun 7th, 2014
1,790
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.67 KB | None | 0 0
  1. #Best PvE: A scenario by: Terribuilder/Dans1988 - Skripted by: Bitlington/Codes97
  2.  
  3. #The Configurations
  4. options:
  5. name: &f[&cBestPvE&f]&b
  6.  
  7. variables:
  8. {join.%player%}="offline"
  9.  
  10.  
  11.  
  12. #Commands
  13. command /bestpve <text>:
  14. description: Switches the state of the Best PvE scenario.
  15. usage: /bestpve <on/off/toggle>
  16. permission: bestpve.skript
  17. executable by: players and console
  18. aliases: /bpve
  19. trigger:
  20. if arg 1 is "on":
  21. if {pve} is "on":
  22. message "{@name} Sorry cannot do. This is already enabled."
  23. stop
  24. else:
  25. loop all players:
  26. set {bestpve.%loop-player%} to "list"
  27. execute console command "/playsound note.pling %loop-player% ~ ~ ~ 1 1 1"
  28. set {join.%loop-player%} to "online"
  29. broadcast "{@name} is enabled"
  30. set {pve} to "on"
  31. set {currenthearts} to 10
  32. if arg 1 is "off":
  33. if {pve} is "off":
  34. message "{@name} Sorry cannot do. This is already disabled."
  35. stop
  36. else:
  37. loop all players:
  38. set {bestpve.%loop-player%} to "off"
  39. execute console command "/playsound mob.wolf.howl %loop-player% ~ ~ ~ 1 1 1"
  40. broadcast "{@name} is disabled"
  41. set {pve} to "off"
  42. if arg 1 is "toggle":
  43. if {pve} is "off":
  44. loop all players:
  45. set {bestpve.%loop-player%} to "list"
  46. execute console command "/playsound note.pling %loop-player% ~ ~ ~ 1 1 1"
  47. set {join.%loop-player%} to "online"
  48. broadcast "{@name} is enabled"
  49. set {pve} to "on"
  50. stop
  51. if {pve} is "on":
  52. loop all players:
  53. set {bestpve.%loop-player%} to "off"
  54. execute console command "/playsound mob.wolf.howl %loop-player% ~ ~ ~ 1 1 1"
  55. broadcast "{@name} is disabled"
  56. set {pve} to "off"
  57. set {currenthearts} to 10
  58. set {round} to 0
  59. stop
  60.  
  61. command /iambestpve:
  62. description: Tells the player if they on the Best PvE list.
  63. trigger:
  64. if {bestpve.%command sender%} is "list":
  65. message "{@name} Yes, you are on the Best PvE list."
  66. execute console command "/playsound note.pling %player% ~ ~ ~ 1 1 1"
  67. else:
  68. message "{@name} No, you are off the Best PvE list."
  69. execute console command "/playsound note.pling %player% ~ ~ ~ 1 1 1"
  70.  
  71. command /isbestpveon:
  72. description: Tells the player if the Best PvE scenario is on.
  73. trigger:
  74. if {pve} is "on":
  75. message "{@name} Yes, Best PvE is on."
  76. execute console command "/playsound note.pling %player% ~ ~ ~ 1 1 1"
  77. else:
  78. message "{@name} No, Best PvE is off."
  79. execute console command "/playsound note.pling %player% ~ ~ ~ 1 1 1"
  80.  
  81. command /addbestpve <player>:
  82. description: Adds the player to the best PvE list.
  83. usage: /addbestpve <player>
  84. permission: bestpve.skript
  85. trigger:
  86. set {bestpve.%arg 1%} to "list"
  87. broadcast "{@name} %arg 1% is now on the Best PvE list."
  88. execute console command "/playsound note.pling %arg 1% ~ ~ ~ 1 1 1"
  89.  
  90. command /normalhealth <player>:
  91. description: Sets the player to normal health
  92. usage: /normalhealth <player>
  93. permission: bestpve.skript
  94. aliases: /nh
  95. trigger:
  96. set {_player} to arg 1
  97. set {_player}'s max health to 10
  98. broadcast "{@name} %arg 1% is now at normal health."
  99. execute console command "/playsound note.pling %arg 1% ~ ~ ~ 1 1 1"
  100. heal {_player}
  101.  
  102.  
  103. command /removebestpve <player>:
  104. description: Removes the player to the best PvE list.
  105. usage: /removebestpve <player>
  106. permission: bestpve.skript
  107. trigger:
  108. set {bestpve.%arg 1%} to "off"
  109. broadcast "{@name} %arg 1% is off on the Best PvE list."
  110. execute console command "/playsound note.pling %arg 1% ~ ~ ~ 1 1 1"
  111.  
  112. command /healthreset:
  113. description: Resets everyone's health.
  114. permission: bestpve.skript
  115. trigger:
  116. loop all players:
  117. set loop-player's health to 10
  118. set loop-player's max health to 10
  119. execute console command "/playsound note.pling %arg 1% ~ ~ ~ 1 1 1"
  120. broadcast "{@name} All player's health have had a global reset by %command sender%!"
  121.  
  122.  
  123. command /bestpvehelp:
  124. description: Teaches you about the Best PvE scenario.
  125. aliases: /bph, /bphelp,
  126. trigger:
  127. execute console command "/playsound note.pling %player% ~ ~ ~ 1 1 1"
  128. message "{@name} This is the Best PvE scenario. Created by: /u/Dans1988 and skripted by /u/Bitlington"
  129. wait 0.1 seconds
  130. message "{@name} At the beginning of the game, all players are added to a ""best PvE"" list. Every 10 minutes, they are healed by 1 heart and get 1 potential heart."
  131. wait 0.1 seconds
  132. message "{@name} When you take damage you are removed from this list. When you kill someone, you are on the list."
  133. wait 0.1 seconds
  134. message "{@name} Some useful commands are /iambestpve and /isbestpveon - Thanks for Reading - Bit!"
  135. if player is an op:
  136. message "{@name} Mister.Op here is the commands to help you run this scenario."
  137. wait 0.1 seconds
  138. message "{@name} /removebestpve , /normalhealth, /bestpve <on/off/toggle> , /addbestpve , /healthreset . - Bit!"
  139.  
  140.  
  141. #The Real Deal
  142.  
  143. on damage of player:
  144. if {pve} is "on":
  145. if damage was caused by a projectile:
  146. projectile is not a snowball:
  147. if {bestpve.%victim%} is "list":
  148. set {bestpve.%victim%} to "off"
  149. message "{@name} You are no longer on the BestPvE list." to the victim
  150. execute console command "/playsound mob.wolf.howl %victim% ~ ~ ~ 1 1 1"
  151.  
  152. else:
  153. if {bestpve.%victim%} is "list":
  154. set {bestpve.%victim%} to "off"
  155. message "{@name} You are no longer on the BestPvE list." to the victim
  156. execute console command "/playsound mob.wolf.howl %victim% ~ ~ ~ 1 1 1"
  157.  
  158. on death of player:
  159. if {pve} is "on":
  160. if {bestpve.%attacker%} is "off":
  161. set {bestpve.%attacker%} to "list"
  162. message "{@name} You are now on the BestPvE list." to the attacker
  163. execute console command "/playsound note.pling %attacker% ~ ~ ~ 1 1 1"
  164.  
  165. every 10 minutes:
  166. if {pve} is "on":
  167. set {currenthearts} to {currenthearts} + 1
  168. set {round} to {round} + 1
  169. loop all players:
  170. if {bestpve.%loop-player%} is "list":
  171. set loop-player's max health to loop-player's max health + 1
  172. add 1 to loop-player's health
  173. execute console command "/playsound mob.wolf.howl %loop-player% ~ ~ ~ 1 1 1"
  174. broadcast "{@name} Best PvE players gained a heart."
  175. #Login System
  176.  
  177.  
  178. on login:
  179. {pve} is "on":
  180. if {bestpve.%player%} is "list":
  181. player's max health is not {currenthearts}:
  182. wait 0.5 seconds
  183. set player's max health to {currenthearts}
  184. add {left.%player%} to player's health
  185. message "{@name} Your health is fixed."
  186. execute console command "/playsound note.pling %player% ~ ~ ~ 1 1 1"
  187.  
  188. on disconnect:
  189. {pve} is "on":
  190. if {bestpve.%player%} is "list":
  191. set {left.%player%} to {round}
  192.  
  193. on login:
  194. {pve} is "on":
  195. if {join.%player%} is "offline":
  196. set {join.%player%} to "online"
  197. player's max health is not {currenthearts}
  198. heal player
  199. add {round} to player's health
  200. message "{@name} Your health is fixed."
  201. execute console command "/playsound note.pling %player% ~ ~ ~ 1 1 1"
  202.  
  203. on login:
  204. {pve} is "off":
  205. {bestpve.%player%} is "list":
  206. player's max health is more than 10:
  207. {left.%player%} is more than 0:
  208. execute player command "/normalhealth %player%"
  209. execute player command "/removebestpve %player%"
  210.  
  211. on login:
  212. {pve} is "off":
  213. player's max health is more than 10:
  214. {left.%player%} is more than 0:
  215. execute player command "/normalhealth %player%"
  216. execute player command "/removebestpve %player%"
  217.  
  218. #Reset System
  219.  
  220. on respawn:
  221. {pve} is "on":
  222. set the player's health to 10
  223. message "{@name} Thanks for playing"
  224. set the player's max health to 10
  225.  
  226. #Makes Sure Best PvE is off when reloaded on turned on
  227.  
  228. on skript start:
  229. set {pve} to "off"
  230.  
  231. on skript load:
  232. set {pve} to "off"
  233.  
  234. #End of Transmission
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement