BaneOfSmite

Radiation [Radius Glowing]

Dec 23rd, 2017
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.62 KB | None | 0 0
  1. # Done :
  2. # Glowing at 0,0
  3. # - All food does regular amount of hunger but with a 1 in 5 chance when eating to give Hunger 2 for 1 minute
  4. # - Spiders & Silverfish give poison when damage you
  5. # - Creepers give blindness when blow up and damage you
  6. # - Zombies give nausea when damage you
  7. # - Skeletons give hunger when shoot you
  8. # - Water poisons after 4 seconds in it
  9. # - Added eating while glowing = nausea 5 sec
  10.  
  11. # To-Do:
  12. # - Test
  13.  
  14. command /radiation [<text>]:
  15. permission: skript.op
  16. trigger:
  17. if arg-1 is "enable":
  18. set {radiation} to true
  19. delete {radiation::*}
  20. delete {radiationwater::*}
  21. message "Radiation is enabledz"
  22. if arg-1 is "disable":
  23. set {radiation} to false
  24. delete {radiation::*}
  25. delete {radiationwater::*}
  26. message "radiation is disabledz"
  27.  
  28. every 2 seconds:
  29. loop all players:
  30. if {radiation} is true:
  31. if {radiation::%loop-player%} is set:
  32. subtract 2 from {radiation::%loop-player%}
  33. else if {radiation::%loop-player%} is not set:
  34. set {radiation::%loop-player%} to 0
  35. if loop-player's x-coordinates is smaller than 1:
  36. if loop-player's z-coordinates is smaller than 1:
  37. if loop-player's x-coordinates is greater than -1:
  38. if loop-player's z-coordinates is greater than -1:
  39. if {radiation::%loop-player%} is smaller than 150:
  40. apply glowing 1 to loop-player for 999 days
  41. set {radiation::%loop-player%} to 30000000000
  42. if loop-player's x-coordinates is smaller than 51:
  43. if loop-player's z-coordinates is smaller than 51:
  44. if loop-player's x-coordinates is greater than -51:
  45. if loop-player's z-coordinates is greater than -51:
  46. if {radiation::%loop-player%} is smaller than 300:
  47. remove glowing from loop-player
  48. apply glowing 1 to loop-player for 10 minutes
  49. set {radiation::%loop-player%} to 300
  50. if loop-player's x-coordinates is smaller than 101:
  51. if loop-player's z-coordinates is smaller than 101:
  52. if loop-player's x-coordinates is greater than -101:
  53. if loop-player's z-coordinates is greater than -101:
  54. if {radiation::%loop-player%} is smaller than 150:
  55. remove glowing from loop-player
  56. apply glowing 1 to loop-player for 5 minutes
  57. set {radiation::%loop-player%} to 150
  58.  
  59. on consume:
  60. if {radiation} is true:
  61. if {radiation::%loop-player%} is greater than 1:
  62. apply potion of nausea of tier 2 to the player for 5 seconds
  63. chance of 20%:
  64. apply potion of hunger of tier 2 to the player for 1 minute
  65.  
  66. on damage of player:
  67. if {radiation} is true:
  68. if attacker is a creeper:
  69. apply potion of blindness of tier 2 to the player for 10 seconds
  70. if attacker is a spider or silverfish:
  71. apply potion of poison of tier 2 to the player for 10 seconds
  72. if attacker is a skeleton:
  73. apply potion of hunger of tier 2 to the player for 10 seconds
  74. if attacker is a zombie:
  75. apply potion of nausea of tier 2 to the player for 10 seconds
  76.  
  77. every 2 second:
  78. if {radiation} is true:
  79. loop all players:
  80. set {_dlo} to location of loop-player
  81. if block at {_dlo} is water:
  82. add 2 to {radiationwater::%loop-player%}
  83. if {radiationwater::%loop-player%} is equal to 4:
  84. set {radiationwater::%loop-player%} to 0
  85. remove poison from loop-player
  86. apply poison 2 to loop-player for 5 seconds
  87. else if block above {_dlo} is water:
  88. add 2 to {radiationwater::%loop-player%}
  89. if {radiationwater::%loop-player%} is equal to 4:
  90. set {radiationwater::%loop-player%} to 0
  91. remove poison from loop-player
  92. apply poison 2 to loop-player for 5 seconds
  93. else:
  94. set {radiationwater::%loop-player%} to 0
Add Comment
Please, Sign In to add comment