Nizax

Niszczenie obsydianu tnt i blokow za woda

Jan 2nd, 2015
249
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.11 KB | None | 0 0
  1. options:
  2. 1szansa: 1% #gdy w poblizu jest 1 gracz (gdy ktoś chce ukratkiem rozwalic komus baze)
  3. 2szansa: 10% #gdy w poblizu wybuchu jest 1 gracz z tnt i 1 bez tnt (małe starcia)
  4. 3szansa: 30% #gdy w poblizu wybuchu jest wiecej niz 5 graczy (czyli wojny itd.)
  5. swiat: pvp #na jakim swiecie ma dzialac skrypt
  6.  
  7. on explode:
  8. event-world is "{@swiat}"
  9. {tnt-obsydian.amountofexplodesinlast5seconds} >= 10:
  10. stop
  11. add 1 to {tnt-obsydian.amountofexplodesinlast5seconds}
  12. loop all players in radius 50 around event-location:
  13. add 1 to {_plrs}
  14. loop all blocks in radius 4 around event-location:
  15. loop-block is obsidian
  16. {_done} is "1":
  17. chance of {@3szansa}
  18. add location of loop-block to {_dmged-blcks::*}
  19. {_done} is "2":
  20. chance of {@2szansa}
  21. add location of loop-block to {_dmged-blcks::*}
  22. {_done} is "3":
  23. chance of {@1szansa}
  24. add location of loop-block to {_dmged-blcks::*}
  25. {_done} is not set
  26. {_plrs} >= 5:
  27. chance of {@3szansa}
  28. add location of loop-block to {_dmged-blcks::*}
  29. set {_done} to "1"
  30. loop-player has tnt:
  31. set {_plhstnt} to location of loop-player
  32. loop-player doesn't have tnt:
  33. {_plhstnt} is set
  34. distance between location of loop-player and {_plhstnt} > 10
  35. chance of {@2szansa}
  36. add location of loop-block to {_dmged-blcks::*}
  37. set {_done} to "2"
  38. chance of {@1szansa}
  39. add location of loop-block to {_dmged-blcks::*}
  40. set {_done} to "3"
  41. chance of 50%:
  42. loop {_dmged-blcks::*}:
  43. set block at loop-value to black stained clay
  44. wait 5 seconds
  45. remove 1 from {tnt-obsydian.amountofexplodesinlast5seconds}
  46. stop
  47. on explode:
  48. event-world is "{@swiat}"
  49. {tnt-obsydian.amountofexplodesinlast5seconds} < 10
  50. loop all blocks in radius 3 around event-location:
  51. loop-block is not air or obsidian
  52. {_true} is set:
  53. distance between event-location and loop-block is 5:
  54. chance of 50%
  55. loop-block is not water or lava
  56. set loop-block to air
  57. set loop-block to air
  58. {_true} is not set
  59. loop-block is water or lava:
  60. distance between event-location and loop-block <= 2
  61. set {_true} to true
  62. stop
Advertisement
Add Comment
Please, Sign In to add comment