Oxalist

Untitled

Jan 6th, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.67 KB | None | 0 0
  1. on right click holding a gold horse armor:
  2. cancel the event
  3. "%name of player's tool%" is "&ePaintball Gun"
  4. if sql var "cooldown::paintball::%player%" exists is true:
  5. set {_time} to value of sql var "cooldown::paintball::%player%"
  6. set {_time} to convert unix ({_time} parsed as number) to date
  7. difference between {_time} and now is less than 5 seconds
  8. set {_cooldown} to difference between {_time} and now
  9. set {_cooldown} to "%difference between {_cooldown} and 6 second%"
  10. set {_cooldown::*} to {_cooldown} split at " "
  11. if {_cooldown::4} is not set:
  12. set {_cooldown} to "%{_cooldown::1}%&es"
  13. else:
  14. set {_cooldown} to "%{_cooldown::1}%m %{_cooldown::4}%&es"
  15. if {_cooldown} contains ".":
  16. set {_cooldown::*} to {_cooldown} split at "."
  17. set {_cooldown} to "%{_cooldown::1}%&es"
  18. send "&7You can't use &ePaintball Gun&7 for another &e%{_cooldown}%"
  19. stop trigger
  20. set sql var "cooldown::paintball::%player%" to "%unix time%"
  21. set {_amt} to value of sql var "gadgets::paintball::%player%" parsed as integer
  22. set sql var "gadgets::paintball::%player%" to "%{_amt} - 1%"
  23. make player shoot a snowball at speed 2.0
  24.  
  25. on projectile hit:
  26. projectile is a snowball
  27. set {_block} to "159:%a random integer between 0 and 15%" parsed as item
  28. set {_blocks::*} to 0, 44, 53, 67, 114, 109, 108, 126, 128, 156, 134, 135, 136, 139, 164, 163, 180, 182, 6, 30, 31, 32, 37, 38, 50, 39, 40, 78, 54, 65, 78, 81, 85, 101, 102, 106, 111, 113, 116, 120, 130, 145, 146, 160, 171, 175, 188, 189, 190, 192, 191, 321, 323, 355, 389, 390, 397, 425, 69, 70, 72, 76, 77, 96, 107, 131, 143, 147, 148, 151, 167, 183, 184, 185, 186, 187, 324, 330, 356, 331, 404, 427, 428, 429, 430, 431, 27, 28, 66, 83, 8, 9, 10, 11 and 157
  29. loop blocks in radius 2 around projectile:
  30. delete {_noplace}
  31. loop-block is not air
  32. loop {_blocks::*}:
  33. id of loop-block is loop-value-2
  34. set {_noplace} to true
  35. {_noplace} is not set
  36. metadata "Painted" of block at loop-block is not set
  37. set {_restoreblocks::%{_place}%} to type of loop-block
  38. set {_restore::%{_place}%} to location at loop-block
  39. add 1 to {_place}
  40. @noupdate::set block at loop-block to {_block}
  41. set metadata "Painted" of block at loop-block to "true"
  42. play raw sound "mob.horse.armor" at loop-block with pitch 2 volume 0.35
  43. set {_dv} to data value of {_block}
  44. 1.8 spawn 7 of particle block break at location of loop-block with data 159 and secondary data {_dv}
  45. wait 1 tick
  46. wait 3 seconds
  47. loop {_restore::*}:
  48. delete metadata "Painted" of block at location at loop-value
  49. set block at location at loop-value to {_restoreblocks::%loop-index%}
  50. wait 1 tick
  51. on projectile hit:
  52. projectile is a snowball
  53. kill victim
Advertisement
Add Comment
Please, Sign In to add comment