niccosaint

ncRAD 1.0 (Skript)

Nov 30th, 2014
316
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.57 KB | None | 0 0
  1. variables:
  2. {radiation.%player%} = 0
  3.  
  4. options:
  5. swiat: "2033"
  6. swiat2: "Survival"
  7. modifier: 1
  8. tag: &3[&6ncRAD&3]
  9. tag.success: &aSUKCES!
  10. tag.warn: &cUWAGA!
  11. tag.error: &4BLAD
  12.  
  13. every minute:
  14. loop all players in {@swiat} or {@swiat2}:
  15. add -0.01 to {radiation.%loop-player%}
  16. if sunlight level at the loop-player is greater than 10:
  17. set {_lvl.%loop-player%} to level of loop-player
  18. set {_rad.%loop-player%} to ({@modifier}/{_lvl.%loop-player%})
  19. if {_lvl.%loop-player%} = 0:
  20. set {_lvl.%loop-player%} to 1
  21. if loop-player is wearing all gold armor:
  22. add {_rad.%loop-player%} to {radiation.%loop-player%}
  23. else:
  24. add {_rad.%loop-player%} to {radiation.%loop-player%}
  25. add {_rad.%loop-player%} to {radiation.%loop-player%}
  26. if {radiation.%loop-player%} >= 5:
  27. if {radiation.%loop-player%} >= 20:
  28. if {radiation.%loop-player%} >= 75:
  29. add -500 to {nccore.blood.%loop-player%}
  30. else:
  31. add -200 to {nccore.blood.%loop-player%}
  32. else:
  33. add -100 to {nccore.blood.%loop-player%}
  34.  
  35. on rightclick:
  36. if player's tool is clock named "&3Licznik Geigera":
  37. send "&7&oPrzykladasz licznik na swoje cialo"
  38. wait 4 ticks
  39. send "&7&oCzekasz na odczyt"
  40. wait 1 second
  41. send "&6ODCZYT: %{radiation.%sender%}% rad"
  42. if {radiation.%player%} >= 5:
  43. if {radiation.%player%} >= 20:
  44. if {radiation.%player%} >= 75:
  45. send "&4-500 HP/min"
  46. else:
  47. send "&c-200 HP/min"
  48. else:
  49. send "&c-100 HP/min"
  50.  
  51. on death:
  52. set {radiation.%player%} to 0
  53.  
  54. command /rad [<text>] [<player>] [<number>]:
  55. trigger:
  56. if arg 1 is not set:
  57. send "&3&m--------------&3[ &6&lncRAD by niccosaint &3]&3&m--------------"
  58. send "&b<> - Wymagane [] - Opcjonalnie"
  59. send "&2Dla wszystkich &6Dla VIP &4Dla adminow &0Tylko Konsola"
  60. send " "
  61. send "&2/rad settings &b- Ustawienia"
  62. send "&2/rad geiger [nick] &b- Sprawdz poziom promieniowania"
  63. send "&4/rad give <nick> &b- Otrzymaj licznik Geigera"
  64. send "&4/rad modify <nick> <ilosc> &b- Zmodyfikuj graczowi poziom promieniowania"
  65. send "&4/rad set <nick> <ilosc> &b- Ustaw graczowi poziom promieniowania"
  66. send "&4/rad reset <nick> &b- Wyzeruj graczowi promieniowanie"
  67. if arg 1 is "geiger":
  68. if sender has clock named "&3Licznik Geigera":
  69. if arg 2 is set:
  70. send "&7&oWyciagasz licznik Geigera"
  71. wait 3 seconds
  72. if distance between the sender and arg 2 is smaller than 5:
  73. send "&7&oPrzykladasz licznik na cialo %arg 2%"
  74. wait 4 ticks
  75. send "&7&oCzekasz na odczyt"
  76. wait 1 second
  77. send "&6ODCZYT: %{radiation.%arg 2%}% rad"
  78. if {radiation.%arg 2%} >= 5:
  79. if {radiation.%arg 2%} >= 20:
  80. if {radiation.%arg 2%} >= 75:
  81. send "&4-500 HP/min"
  82. else:
  83. send "&c-200 HP/min"
  84. else:
  85. send "&c-100 HP/min"
  86. else:
  87. send "&7&oOsoba sie oddalila, nie mozesz przeprowadzic odczytu"
  88. else:
  89. send "&7&oWyciagasz licznik Geigera"
  90. wait 3 seconds
  91. send "&7&oPrzykladasz licznik na swoje cialo"
  92. wait 4 ticks
  93. send "&7&oCzekasz na odczyt"
  94. wait 1 second
  95. send "&6ODCZYT: %{radiation.%sender%}% rad"
  96. if {radiation.%arg 2%} >= 5:
  97. if {radiation.%arg 2%} >= 20:
  98. if {radiation.%arg 2%} >= 75:
  99. send "&4-500 HP/min"
  100. else:
  101. send "&c-200 HP/min"
  102. else:
  103. send "&c-100 HP/min"
  104. else:
  105. send "{@tag} {@tag.warn} Nie masz &3Licznika Geigera &caby wykonac te komende"
  106. if arg 1 is "settings":
  107. set {_lvl.%sender%} to level of sender
  108. set {_rad.%sender%} to ({@modifier}/{_lvl.%sender%})
  109. set {_rad2.%sender%} to ({_rad.%sender%}*2)
  110. send "&2Ustawienia:"
  111. send "&6Wchlanianie promieniowania:"
  112. send "&ez kombinezonem: &6&l%{_rad.%sender%}%/min"
  113. send "&abez kombinezonu: &2&l %{_rad2.%sender%}%/min"
  114. send "&c-100 HP/min, gdy masz >= 5 rad"
  115. send "&c-200 HP/min, gdy masz >= 20 rad"
  116. send "&4-500 HP/min, gdy masz >= 75 rad"
  117.  
  118. if arg 1 is "give":
  119. if sender has permission "rad.admin":
  120. if arg 2 is set:
  121. give 1 clock named "&3Licznik Geigera" to arg 2
  122. else:
  123. send "&4/rad get <nick> &b- Otrzymaj licznik Geigera"
  124. else:
  125. send "{@tag} {@tag.error} Brak dostepu do tej komendy"
  126. if arg 1 is "modify":
  127. if sender has permission "rad.admin":
  128. if arg 2 is set:
  129. if arg 3 is set:
  130. add arg 3 to {radiation.%arg 2%}
  131. else:
  132. send "{@tag} {@tag.error} &6Popraw &3&nzaznaczony &6tekst"
  133. send "&3/rad modify %arg 2% &3&n<ilosc>"
  134. else:
  135. send "{@tag} {@tag.error} &6Popraw &3&nzaznaczony &6tekst"
  136. send "&3/rad modify &3&n<nick> &3<ilosc>"
  137. else:
  138. send "{@tag} {@tag.error} Brak dostepu do tej komendy"
  139. if arg 1 is "set":
  140. if sender has permission "rad.admin":
  141. if arg 2 is set:
  142. if arg 3 is set:
  143. set {radiation.%arg 2%} to arg 3
  144. send "{@tag} {@tag.success} Ustawiono nowy poziom :D"
  145. else:
  146. send "{@tag} {@tag.error} &6Popraw &3&nzaznaczony &6tekst"
  147. send "&3/rad set %arg 2% &3&n<ilosc>"
  148. else:
  149. send "{@tag} {@tag.error} &6Popraw &3&nzaznaczony &6tekst"
  150. send "&3/rad set &3&n<nick> &3<ilosc>"
  151. else:
  152. send "{@tag} {@tag.error} Brak dostepu do tej komendy"
  153. if arg 1 is "reset":
  154. if sender has permission "rad.admin":
  155. if arg 2 is set:
  156. send "{@tag} &1Zerowanie statystyk gracza %arg 2%"
  157. delete {radiation.%arg 2%}
  158. set {radiation.%arg 2%} to 0
  159. send "{@tag} {@tag.success} Wyzerowano!"
  160. else:
  161. send "&7/rad reset <nick> &b- Wyzeruj graczowi statystyki"
  162. else:
  163. send "{@tag} {@tag.error} Brak dostepu do tej komendy"
Advertisement
Add Comment
Please, Sign In to add comment