Guest User

Untitled

a guest
Sep 26th, 2015
361
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.81 KB | None | 0 0
  1. options:
  2. P: &8[&7PotionSwap&8]&7
  3.  
  4.  
  5. command /potionswap <text>:
  6. usage: /potionswap <enable/disable>
  7. permission: skript.op
  8. trigger:
  9. if arg-1 is "enable" or "on":
  10. if {potionswap} is true:
  11. send "{@P} PotionSwap is already enabled!"
  12. else:
  13. set {potionswapeffects::*} to "Speed 1", "Strength 1", "Haste 1", "Jump boost 1", "Invisibility 2", "Resistance 1", and "Fire Resistance 1"
  14. set {potionswap} to true
  15. send "{@P} PotionSwap is now enabled!"
  16. set {potionswaptimer} to 300
  17. loop all players:
  18. remove speed from the loop-player
  19. remove strength from the loop-player
  20. remove haste from the loop-player
  21. remove jump boost from the loop-player
  22. remove invisibility from the loop-player
  23. remove resistance from the loop-player
  24. remove fire resistance from the loop-player
  25. set {potionswapplayereffect::%loop-player%} to a random element of {potionswapeffects::*}
  26. if {potionswapplayereffect::%loop-player%} is "Speed 1":
  27. apply speed 1 to loop-player for 999 days
  28. else if {potionswapplayereffect::%loop-player%} is "Strength 1":
  29. apply strength 1 to loop-player for 999 days
  30. else if {potionswapplayereffect::%loop-player%} is "Haste 1":
  31. apply haste 1 to loop-player for 999 days
  32. else if {potionswapplayereffect::%loop-player%} is "Jump Boost 1":
  33. apply jump boost 1 to loop-player for 999 days
  34. else if {potionswapplayereffect::%loop-player%} is "Invisibility 2":
  35. apply invisibility 2 to loop-player for 999 days
  36. else if {potionswapplayereffect::%loop-player%} is "Resistance 1":
  37. apply resistance 1 to loop-player for 999 days
  38. else if {potionswapplayereffect::%loop-player%} is "Fire Resistance 1":
  39. apply fire resistance 1 to loop-player for 999 days
  40. set {potionswap.haseffect::%loop-player%} to true
  41. message "{@P} Your potion effect is now &8%{potionswapplayereffect::%loop-player%}%&7!" to loop-player
  42. else if arg-1 is "disable" or "off":
  43. if {potionswap} is false:
  44. send "{@P} PotionSwap is already disabled!"
  45. else:
  46. send "{@P} PotionSwap is now disabled!"
  47. set {potionswap} to false
  48. set {potionswapfallprevent} to true
  49. loop all players:
  50. remove speed from the loop-player
  51. remove strength from the loop-player
  52. remove haste from the loop-player
  53. remove jump boost from the loop-player
  54. remove invisibility from the loop-player
  55. remove resistance from the loop-player
  56. remove fire resistance from the loop-player
  57. delete {potionswap.haseffect::%loop-player%}
  58. wait 3 seconds
  59. set {potionswapfallprevent} to false
  60. delete {potionswappreviouseffect::*}
  61.  
  62.  
  63.  
  64.  
  65. every 30 seconds:
  66. {potionswap} is true
  67. remove 30 from {potionswaptimer}
  68. if {potionswaptimer} is 0:
  69. set {potionswaptimer} to 300
  70. delete {potionswap.haseffect::*}
  71. set {potionswapfallprevent} to true
  72. loop all players:
  73. remove speed from the loop-player
  74. remove strength from the loop-player
  75. remove haste from the loop-player
  76. remove jump boost from the loop-player
  77. remove invisibility from the loop-player
  78. remove resistance from the loop-player
  79. remove fire resistance from the loop-player
  80. set {potionswappreviouseffect::%loop-player%} to {potionswapplayereffect::%loop-player%}
  81. set {potionswapplayereffect::%loop-player%} to a random element of {potionswapeffects::*}
  82. if {potionswapplayereffect::%loop-player%} is "Speed 1":
  83. apply speed 1 to loop-player for 999 days
  84. else if {potionswapplayereffect::%loop-player%} is "Strength 1":
  85. apply strength 1 to loop-player for 999 days
  86. else if {potionswapplayereffect::%loop-player%} is "Haste 1":
  87. apply haste 1 to loop-player for 999 days
  88. else if {potionswapplayereffect::%loop-player%} is "Jump Boost 1":
  89. apply jump boost 1 to loop-player for 999 days
  90. else if {potionswapplayereffect::%loop-player%} is "Invisibility 2":
  91. apply invisibility 2 to loop-player for 999 days
  92. else if {potionswapplayereffect::%loop-player%} is "Resistance 1":
  93. apply resistance 1 to loop-player for 999 days
  94. else if {potionswapplayereffect::%loop-player%} is "Fire Resistance 1":
  95. apply fire resistance 1 to loop-player for 999 days
  96. set {potionswap.haseffect::%loop-player%} to true
  97. message "{@P} Your potion effect is now &8%{potionswapplayereffect::%loop-player%}%&7!" to loop-player
  98. wait 3 seconds
  99. set {potionswapfallprevent} to false
  100. delete {potionswappreviouseffect::*}
  101.  
  102.  
  103.  
  104. on join:
  105. if {potionswap.haseffect::%player%} is true:
  106. remove speed from the player
  107. remove strength from the player
  108. remove haste from the player
  109. remove jump boost from the player
  110. remove invisibility from the player
  111. remove resistance from the player
  112. remove fire resistance from the player
  113. {potionswap} is true
  114. if {potionswapplayereffect::%player%} is "Speed 1":
  115. apply speed 1 to player for 999 days
  116. else if {potionswapplayereffect::%player%} is "Strength 1":
  117. apply strength 1 to player for 999 days
  118. else if {potionswapplayereffect::%player%} is "Haste 1":
  119. apply haste 1 to player for 999 days
  120. else if {potionswapplayereffect::%player%} is "Jump Boost 1":
  121. apply jump boost 1 to player for 999 days
  122. else if {potionswapplayereffect::%player%} is "Invisibility 2":
  123. apply invisibility 2 to player for 999 days
  124. else if {potionswapplayereffect::%player%} is "Resistance 1":
  125. apply resistance 1 to player for 999 days
  126. else if {potionswapplayereffect::%player%} is "Fire Resistance 1":
  127. apply fire resistance 1 to player for 999 days
  128. else:
  129. {potionswap} is true
  130. set {potionswapplayereffect::%player%} to a random element of {potionswapeffects::*}
  131. if {potionswapplayereffect::%player%} is "Speed 1":
  132. apply speed 1 to player for 999 days
  133. else if {potionswapplayereffect::%player%} is "Strength 1":
  134. apply strength 1 to player for 999 days
  135. else if {potionswapplayereffect::%player%} is "Haste 1":
  136. apply haste 1 to player for 999 days
  137. else if {potionswapplayereffect::%player%} is "Jump Boost 1":
  138. apply jump boost 1 to player for 999 days
  139. else if {potionswapplayereffect::%player%} is "Invisibility 2":
  140. apply invisibility 2 to player for 999 days
  141. else if {potionswapplayereffect::%player%} is "Resistance 1":
  142. apply resistance 1 to player for 999 days
  143. else if {potionswapplayereffect::%player%} is "Fire Resistance 1":
  144. apply fire resistance 1 to player for 999 days
  145. set {potionswap.haseffect::%player%} to true
  146. message "{@P} Your potion effect is now &8%{potionswapplayereffect::%player%}%&7!" to player
  147.  
  148.  
  149. on damage:
  150. damage was caused by fall
  151. {potionswap} is true
  152. if {potionswapplayereffect::%victim%} is "Jump Boost 1":
  153. cancel the event
  154. if {potionswappreviouseffect::%victim%} is "Jump Boost 1":
  155. {potionswapfallprevent} is true
  156. cancel the event
Advertisement
Add Comment
Please, Sign In to add comment