Shell_Guy_

ptp

Apr 25th, 2015
239
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.84 KB | None | 0 0
  1. Options:
  2. PP:<dark gray>[<gray>PotentialPerma<dark gray>]
  3. CC:&3
  4. S:&7
  5.  
  6. command /potentialpermanent [<text>]:
  7. description: Enables/Disabled 'PotPerma' scenario
  8. aliases: /potperma, /potentialperma, /potp, /ptp
  9. permission: potperma.skript
  10. trigger:
  11. if arg-1 is set:
  12. if arg-1 is equal to "on" or "enable" or "start":
  13. if {potp} is not set:
  14. set {potp} to true
  15. loop all players:
  16. set {potp::%loop-player%} to true
  17. set {potpHealth::%loop-player%} to 10
  18. delete {potpPlayer::%loop-player%}
  19. set loop-player's max health to 10
  20. apply absorption 5 to loop-player for 1 day
  21. broadcast "{@PP}{@S} PotentialPerma {@CC}has been &aenabled{@CC}."
  22. execute player command "/feature off PotionNerfs"
  23. else if {potp} is set:
  24. message "{@PP}{@CC}Currently is already &aenabled{@CC}."
  25. else if arg-1 is equal to "off" or "disable" or "end":
  26. if {potp} is not set:
  27. message "{@PP}{@CC}Currently is already &cdisabled{@CC}."
  28. else if {potp} is set:
  29. delete {potp}
  30. loop all players:
  31. remove absorption from loop-player
  32. set loop-player's max health to 10
  33. delete {potp::%loop-player%}
  34. delete {potpHealth::%loop-player%}
  35. delete {potpApple::%loop-player%}
  36. delete {potpPlayer::%loop-player%}
  37. broadcast "{@PP}{@S} PotentialPerma {@CC}has been &cdisabled{@CC}."
  38. if arg-1 is not set:
  39. if {potp} is not set:
  40. message "{@PP}{@CC}Currently is currently &cdisabled{@CC}."
  41. else if {potp} is set:
  42. message "{@PP}{@CC}Currently is currently &aenabled{@CC}."
  43.  
  44.  
  45. on death of player:
  46. if {potp} is set:
  47. if {potp::%victim%} is set:
  48. remove absorption from the player
  49. set victim's max health to 10
  50. delete {potp::%victim%}
  51. delete {potpPlayer::%victim%}
  52. delete {potpHealth::%victim%}
  53. delete {potpApple::%player%}
  54.  
  55. on consume:
  56. if {potp} is set:
  57. if {potp::%player%} is set:
  58. if event-item is golden apple:
  59. if {potpApple::%player%} is not set:
  60. if name of event-item is "<gold>Golden Head":
  61. cancel event
  62. remove 1 of the player's tool from the player
  63. apply saturation 4 to the player for 1 tick
  64. set {potpApple::%player%} to true
  65. if player's health is less than {potpHealth::%player%}:
  66. remove absorption from the player
  67. set {potpPlayer::%player%} to true
  68. delete {potp::%player%}
  69. delete {potpHealth::%player%}
  70. delete {potpApple::%player%}
  71. if {potpPlayer::%player%} is not set:
  72. if {potpHealth::%player%} is not set:
  73. set {potpHealth::%player%} to player's health
  74. set {potpHealth::%player%} to {potpHealth::%player%}+4
  75. set player's max health to {potpHealth::%player%}
  76. damage the player by 4 hearts
  77. delete {potpApple::%player%}
  78. else if {potpHealth::%player%} is set:
  79. damage the player by 4 hearts
  80. player's health is equal to {potpHealth::%player%}-4:
  81. heal player by 4 hearts
  82. remove absorption from the player
  83. set {potpPlayer::%player%} to true
  84. delete {potp::%player%}
  85. delete {potpHealth::%player%}
  86. delete {potpApple::%player%}
  87. stop
  88. set {potpHealth::%player%} to {potpHealth::%player%}+4
  89. set player's max health to {potpHealth::%player%}
  90. player's health is less than {potpHealth::%player%}-4:
  91. set player's max health to player's health+4
  92. remove absorption from the player
  93. set {potpPlayer::%player%} to true
  94. delete {potp::%player%}
  95. delete {potpHealth::%player%}
  96. delete {potpApple::%player%}
  97. stop
  98. wait 10 seconds
  99. delete {potpApple::%player%}
  100. else:
  101. cancel event
  102. remove 1 of the player's tool from the player
  103. apply regeneration 2 to the player for 5 seconds
  104. apply saturation 4 to the player for 1 tick
  105. set {potpApple::%player%} to true
  106. if player's health is less than {potpHealth::%player%}:
  107. remove absorption from the player
  108. set {potpPlayer::%player%} to true
  109. delete {potp::%player%}
  110. delete {potpHealth::%player%}
  111. delete {potpApple::%player%}
  112. if {potpPlayer::%player%} is not set:
  113. if {potpHealth::%player%} is not set:
  114. set {potpHealth::%player%} to player's health
  115. damage the player by 2 hearts
  116. set {potpHealth::%player%} to {potpHealth::%player%}+2
  117. set player's max health to {potpHealth::%player%}
  118. delete {potpApple::%player%}
  119. else if {potpHealth::%player%} is set:
  120. damage the player by 2 hearts
  121. player's health is equal to {potpHealth::%player%}-2:
  122. heal player by 2 hearts
  123. remove absorption from the player
  124. set {potpPlayer::%player%} to true
  125. delete {potp::%player%}
  126. delete {potpHealth::%player%}
  127. delete {potpApple::%player%}
  128. stop
  129. set {potpHealth::%player%} to {potpHealth::%player%}+2
  130. set player's max health to {potpHealth::%player%}
  131. player's health is less than {potpHealth::%player%}-2:
  132. set player's max health to player's health+2
  133. remove absorption from the player
  134. set {potpPlayer::%player%} to true
  135. delete {potp::%player%}
  136. delete {potpHealth::%player%}
  137. stop
  138. wait 5 seconds
  139. delete {potpApple::%player%}
  140.  
  141. else if {potpApple::%player%} is set:
  142. cancel event
  143. message "&cCan't eat 2 gapples at once."
  144. wait 10 seconds
  145. delete {potpApple::%player%}
  146. else:
  147. if event-item is golden apple:
  148. if {potpApple::%player%} is not set:
  149. wait 1 tick
  150. remove absorption from the player
  151. if {potpApple::%player%} is set:
  152. cancel event
  153. message "&cCan't eat 2 gapples at once."
  154. wait 10 seconds
  155. delete {potpApple::%player%}
Advertisement
Add Comment
Please, Sign In to add comment