JavaWinter__

UHC Essentials

Dec 14th, 2014
2,387
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.20 KB | None | 0 0
  1. #Winters lol uhc skript
  2. #by weenturhaksnein
  3.  
  4. options:
  5. #- Main Options -#
  6. P : &8[&9Ultra Hardcore&8]&f
  7. C : &f
  8. H : &b
  9.  
  10. #- Other Options -#
  11. Error : &8[&4ERROR&8]&f
  12. Killboard : &8[&9Killboard&8]&f
  13. KillboardName: &9Winter's &3UHC
  14.  
  15. #- Skript Options -#
  16. Permission: skript.op
  17. PermissionDeny: &cYou don't have the required permission.
  18.  
  19. command /uhc [<text>] [<integer>] [<integer>]:
  20. permission: {@Permission}
  21. permission message: {@PermissionDeny}
  22. trigger:
  23. if arg-1 is not set:
  24. message "{@Error} Invalid syntax."
  25. else:
  26. if arg-1 is "start":
  27. if {UHC.Started} is not set:
  28.  
  29. #- Timer Check -#
  30. if arg-2 is less than 0:
  31. message "{@Error} Must enter positive integer!"
  32. message "{@Error} You entered [{@H}%arg-2%]{@C}!"
  33. message "{@Error} Set [{@H}%arg-2%] {@C}to a positive number!"
  34. if arg-3 is less than 0:
  35. message "{@Error} Must enter positive integer!"
  36. message "{@Error} You entered [{@H}%arg-3%]{@C}!"
  37. message "{@Error} Set [{@H}%arg-3%] {@C}to a positive number!"
  38.  
  39. #- Variable Declarations -#
  40. set {UHC.Started} to true
  41. set {UHC.Countdown} to true
  42. delete {PermaDay}
  43.  
  44. #- Essentials -#
  45. heal all players
  46. loop all players:
  47. set loop-player's hunger to 20
  48. set loop-player's max health to 10
  49. clear loop-player's inventory
  50.  
  51. #- Resetting/Commands -#
  52. set time to 6:00
  53. loop all players:
  54. execute console command "xp -25000L %loop-player%"
  55. loop-player's gamemode is not survival:
  56. set loop-player's gamemode to survival
  57.  
  58. #- PreGame Commands -#
  59. command sender command "/killboard off"
  60. command sender command "/killboard on"
  61. command sender command "/pvp global off"
  62. command sender command "/specinfo reset"
  63. command sender command "/boxremove %world of command sender%"
  64. command sender command "/motdset Game in Progress!"
  65.  
  66. #- Countdown(!) -#
  67. set {_Count} to 5
  68. loop {_Count} times:
  69. broadcast "{@P} In %{_Count}%.."
  70. command "/aps note.bass"
  71. subtract 1 from {_Count}
  72. wait 1 second
  73.  
  74. broadcast "{@P} GO GO GO!"
  75.  
  76. #- Sounds -#
  77. loop 10 times:
  78. loop 3 times:
  79. command "/aps note.harp %loop-number-1*0.2%"
  80. wait 1 tick
  81. loop 10 times:
  82. loop 3 times:
  83. command "/aps note.harp %loop-number-1/0.2%"
  84. wait 1 tick
  85.  
  86. #- UnFreeze -#
  87. command "/freeze"
  88. loop all players:
  89. execute console command "effect %loop-player% clear"
  90.  
  91. #- Cleanup/Final Things -#
  92. wait 10 seconds
  93. heal all players
  94. loop all players:
  95. set loop-player's hunger to 20
  96. broadcast "&bFinal Heal/Feed given!"
  97.  
  98. #- Timer -#
  99. set {_pvpseconds} to arg 3*60
  100. set {_meetup} to (arg 2-arg 3)*60
  101. execute console command "/timer %{_pvpseconds}% §7PvP In:§8"
  102. loop ({_pvpseconds}+1)*20 times:
  103. wait 1 tick
  104. broadcast "&bPvP Enabled!"
  105. execute console command "/aps mob.wither.shoot 2"
  106. make command sender execute command "/pvp global on"
  107. if arg 2 is not 0:
  108. execute console command "/timer %{_meetup}% §7Meetup In:§8"
  109. loop ({_meetup}+1)*20 times:
  110. wait 1 tick
  111. broadcast "{@P} Meetup is {@H}&lnow!{@C} Go to {@H}0,0 {@C}immediately! Only stop for a fight!"
  112. execute console command "/aps mob.wither.shoot 2"
  113. else:
  114. message "{@P} Game already in progress!"
  115.  
  116. else if arg-1 is "end":
  117. if {UHC.Started} is set:
  118.  
  119. #- Variable Declarations -#
  120. delete {UHC.Started}
  121. delete {UHC.Countdown}
  122. delete {PermaDay}
  123. delete {MuteAll}
  124.  
  125. #- Essentials -#
  126. command sender command "/spawn"
  127. command sender command "/moveall"
  128. heal all players
  129. loop all players:
  130. set hunger of loop-player to 20
  131. clear loop-player's inventory
  132.  
  133. #- Reset/Commands -#
  134. command sender command "/timer cancel"
  135. loop all players:
  136. execute console command "xp -25000L %loop-player%"
  137. execute console command "effect %loop-player% clear"
  138. command "/motdset Open PvP!"
  139.  
  140. else:
  141. message "{@P} There isn't a game in progress!"
  142.  
  143.  
  144.  
  145.  
  146.  
  147.  
  148. #- Game Commands -#
  149.  
  150. command /megabutcher:
  151. permission: {@Permission}
  152. permission message: {@PermissionDeny}
  153. trigger:
  154. loop 5 times:
  155. make command sender execute command "/butcher"
  156. wait 1 second
  157. wait 3 seconds
  158. make command sender execute command "/butcher"
  159.  
  160. command /killboard <text>:
  161. permission: {@Permission}
  162. permission message: {@PermissionDeny}
  163. trigger:
  164. if arg 1 is "on":
  165. execute console command "/scoreboard objectives add kills playerKillCount {@KillboardName}"
  166. execute console command "/scoreboard objectives setdisplay sidebar kills"
  167. message "{@Killboard} Killboard enabled!"
  168. else if arg 1 is "off":
  169. execute console command "/scoreboard objectives remove kills"
  170. message "{@Killboard} Killboard disabled!"
  171.  
  172. command /permaday [<text>]:
  173. aliases: /perma, /pe
  174. permission: {@Permission}
  175. permission message: {@PermissionDeny}
  176. trigger:
  177. if arg-1 is not set:
  178. message "{@Error} Invalid syntax."
  179. else if arg-1 is "on":
  180. set time to 12:00
  181. set {PermaDay} to true
  182. broadcast "{@P} Perma-Day Enabled!"
  183. else if arg-1 is "off":
  184. delete {PermaDay}
  185. broadcast "{@P} Perma-Day Disabled!"
  186.  
  187. #- Other Commands -#
  188. command /aps [<text>] [<number>]:
  189. permission: skript.fleftscatter
  190. trigger:
  191. if arg-2 is not set:
  192. set {_pitch} to 1
  193. if arg-2 is set:
  194. set {_pitch} to arg-2
  195. loop all players:
  196. execute console command "/playsound %arg-1% %loop-player% ~ ~ ~ 1 %{_pitch}% 1"
  197.  
  198. command /motdset [<text>]:
  199. permission: skript.op
  200. trigger:
  201. loop 5 times:
  202. execute console command "motd remove %loop-num%"
  203. execute console command "motd add {@P} {@H}- {@C}%arg-1%"
  204.  
  205.  
  206. # Events #
  207.  
  208. #- UHC Events -#
  209.  
  210. on death of player:
  211. if {UHC.Started} is true:
  212. if victim is op:
  213. make victim execute command "/specinfo on"
  214. make victim execute command "/van"
  215. make victim execute command "/vanflag +chat"
  216. execute console command "/whitelist remove %victim%"
  217. execute console command "/scoreboard players reset %victim%"
  218. message "{@P} Sorry to see you have died! Please leave after saying your goodbyes." to victim
  219.  
  220. on death of player:
  221. attacker is a player:
  222. stop trigger
  223. else:
  224. execute console command "scoreboard players add &c&lPvE {@KillboardName} 1"
  225.  
  226. every 3 seconds:
  227. if {PermaDay} is true:
  228. set time to 12:00
  229.  
  230. on damage of player:
  231. {FirstDamage} is true
  232. delete {FirstDamage}
  233. broadcast "{@P}{@H} %victim%{@C} took the first damage!"
  234.  
  235. #- On Events -#
  236. on chat:
  237. if {MuteAll} is true:
  238. if player does not have permission "skript.op":
  239. cancel the event
  240.  
  241. on projectile hit:
  242. if event-entity is in "spawn":
  243. delete the arrow
  244.  
  245. on join:
  246. set join message to "&7[&a&l>&7] &8%event-player%"
  247.  
  248. on quit:
  249. set quit message to "&7[&c&l<&7] &8%event-player%"
  250.  
  251. #- Spawn Events -#
  252. on spawn of zombie pigmen:
  253. cancel the event
  254. chance of 5%:
  255. spawn 1 ghast
  256.  
  257. on spawn of sheep:
  258. cancel the event
  259. chance of 35%:
  260. spawn 1 chicken
Advertisement
Add Comment
Please, Sign In to add comment