Guest User

Untitled

a guest
May 9th, 2015
360
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.35 KB | None | 0 0
  1. options:
  2. p: &8[&c&lVolcanoUHC&8]&7
  3. c: &7
  4. h: &a&l
  5. IS: &8[&c&lVolcanoUHC&8] &4INCRORRECT USAGE
  6. prefix: &8[&2Thirst&8]&7
  7.  
  8. command /thirst [<text>] [<text>] [<text>]:
  9. permission: UHC.WHITELIST
  10. trigger:
  11. if arg-1 is "on" or "enable":
  12. set {thirst} to true
  13. broadcast "{@p} {@prefix} {@c}has been &eenabled {@c}by &8[&a%player%&8] {@c}and created by &8&l[&c&lDarkPaladinUHC&8&l]"
  14. loop all players:
  15. command "/playsound random.pop %loop-player% ~ ~ ~ 1 2 1"
  16. set {thirst::%loop-player%} to 100
  17. give loop-player 2 bottles
  18. set loop-player's level to {thirst::%loop-player%}
  19.  
  20. if arg-1 is "off" or "disable":
  21. set {thirst} to false
  22. broadcast "{@p} {@prefix} {@c}has been &edisabled {@c}by &8[&a%player%&8] {@c}and created by &8&l[&c&lDarkPaladinUHC&8&l]"
  23. loop all players:
  24. command "/playsound random.pop %loop-player% ~ ~ ~ 1 2 1"
  25. set loop-player's level to 0
  26.  
  27. if arg-1 is "bottles" or "bottle":
  28. if arg-2 is "on" or "enable":
  29. set {thirst.bottles} to true
  30. broadcast "{@prefix} You may now craft bottles!"
  31. loop all players:
  32. command "/playsound random.pop %loop-player% ~ ~ ~ 1 2 1"
  33. else:
  34. set {thirst.bottles} to false
  35. broadcast "{@prefix} From now on you can't craft bottles!"
  36. loop all players:
  37. command "/playsound random.pop %loop-player% ~ ~ ~ 1 2 1"
  38.  
  39. if arg-1 is "buckets" or "bucket":
  40. if arg-2 is "on" or "enable":
  41. set {thirst.buckets} to true
  42. broadcast "{@prefix} You may now craft buckets!"
  43. loop all players:
  44. command "/playsound random.pop %loop-player% ~ ~ ~ 1 2 1"
  45. else:
  46. set {thirst.buckets} to false
  47. broadcast "{@prefix} From now on you can't craft buckets!"
  48. loop all players:
  49. command "/playsound random.pop %loop-player% ~ ~ ~ 1 2 1"
  50. if arg-1 is "random":
  51. if arg-2 is "craft":
  52. if arg-3 is "on" or "enable":
  53. set {thirst.random.craft} to true
  54. broadcast "{@prefix} You will now be given time to craft bottles"
  55. loop all players:
  56. command "/playsound random.pop %loop-player% ~ ~ ~ 1 2 1"
  57. else:
  58. set {thirst.random.craft} to false
  59. broadcast "{@prefix} You will now not be given time to craft bottles"
  60. loop all players:
  61. command "/playsound random.pop %loop-player% ~ ~ ~ 1 2 1"
  62. if arg-2 is "give":
  63. if arg-3 is "on" or "enable":
  64. set {thirst.random.give} to true
  65. broadcast "{@prefix} You will now be given bottles every 10 minutes"
  66. loop all players:
  67. command "/playsound random.pop %loop-player% ~ ~ ~ 1 2 1"
  68. else:
  69. set {thirst.random.give} to false
  70. broadcast "{@prefix} You will now not be given bottles every 10 minutes"
  71. loop all players:
  72. command "/playsound random.pop %loop-player% ~ ~ ~ 1 2 1"
  73. if arg-1 is not set:
  74. send "&eCommands:"
  75. send "{@h}/thirst <on:off> &2- {@c}enable and disable {@prefix}"
  76. send "{@h}/thirst &2- {@c}for help"
  77. send "{@h}/thirst buckets <on:off> &2- {@c}turn craftable buckets on or off"
  78. send "{@h}/thirst bottles <on:off> &2- {@c}turn craftable bottles on or off"
  79. send "{@h}/thirst random craft <on:off> &2- {@c}Every 10 minutes everyone will have 10 seconds to craft botttles"
  80. send "{@h}/thirst random give <on:off> &2- {@c}Every 10 minutes everyone will be given a bottle"
  81.  
  82. every 5 seconds:
  83. {thirst} is true
  84. loop all players:
  85. if biome at loop-player is desert:
  86. remove 2 from {thirst::%loop-player%}
  87. else if biome at loop-player is hell:
  88. remove 3 from {thirst::%loop-player%}
  89. else:
  90. remove 1 from {thirst::%loop-player%}
  91. set loop-player's level to {thirst::%loop-player%}
  92. if {thirst::%loop-player%} < 0:
  93. send "{@prefix} You are %{thirst::%loop-player%}%%% hydrated!" to loop-player
  94. command "/playsound random.pop %loop-player% ~ ~ ~ 1 2 1"
  95. damage loop-player by 1 heart
  96.  
  97. on consume of water bottle:
  98. {thirst} is true
  99. set {_waited} to difference between {drink.%player%.lastused} and now
  100. if {_waited} is less than 10 seconds:
  101. cancel event
  102. message "{@prefix} You're not thirsty, wait %difference between 10 seconds and {_waited}% before you drink again!"
  103. stop
  104. else:
  105. if {thirst::%player%} < 90:
  106. add 10 to {thirst::%player%}
  107. set player's level to {thirst::%player%}
  108. set {drink.%player%.lastused} to now
  109. else:
  110. set {thirst::%player%} to 100
  111. set player's level to {thirst::%player%}
  112. set {drink.%player%.lastused} to now
  113.  
  114. on spawn of a xp:
  115. {thirst} is true
  116. cancel event
  117.  
  118. on death of player:
  119. {thirst} is true
  120. set {thirst::%player%} to 100
  121.  
  122. on craft of enchantment table:
  123. {thirst} is true
  124. cancel event
  125. send "{@prefix} Enchanting is disabled!"
  126. command "/playsound random.pop %player% ~ ~ ~ 1 2 1"
  127.  
  128. on craft of bottle:
  129. {thirst} is true
  130. {thirst.bottles} is false
  131. cancel event
  132. send "{@prefix} Extra bottles are disabled!"
  133. command "/playsound random.pop %player% ~ ~ ~ 1 2 1"
  134.  
  135. on craft of bucket:
  136. {thirst} is true
  137. {thirst.buckets} is false
  138. cancel event
  139. send "{@prefix} Buckets are disabled!"
  140.  
  141.  
  142. every 10 minutes:
  143. {thirst} is true
  144. if {thirst.random.craft} is true:
  145. command "/thirst random craft on"
  146. wait 10 seconds
  147. command "/thirst random craft off"
  148. if {thirst.random.give} is true:
  149. loop all players:
  150. give loop-player bottle
  151. command "/playsound random.pop %loop-player% ~ ~ ~ 1 2 1"
  152. broadcast "{@prefix} You have been given a bottle!"
Advertisement
Add Comment
Please, Sign In to add comment