Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- on right click holding a gold horse armor:
- cancel the event
- "%name of player's tool%" is "&ePaintball Gun"
- if sql var "cooldown::paintball::%player%" exists is true:
- set {_time} to value of sql var "cooldown::paintball::%player%"
- set {_time} to convert unix ({_time} parsed as number) to date
- difference between {_time} and now is less than 5 seconds
- set {_cooldown} to difference between {_time} and now
- set {_cooldown} to "%difference between {_cooldown} and 6 second%"
- set {_cooldown::*} to {_cooldown} split at " "
- if {_cooldown::4} is not set:
- set {_cooldown} to "%{_cooldown::1}%&es"
- else:
- set {_cooldown} to "%{_cooldown::1}%m %{_cooldown::4}%&es"
- if {_cooldown} contains ".":
- set {_cooldown::*} to {_cooldown} split at "."
- set {_cooldown} to "%{_cooldown::1}%&es"
- send "&7You can't use &ePaintball Gun&7 for another &e%{_cooldown}%"
- stop trigger
- set sql var "cooldown::paintball::%player%" to "%unix time%"
- set {_amt} to value of sql var "gadgets::paintball::%player%" parsed as integer
- set sql var "gadgets::paintball::%player%" to "%{_amt} - 1%"
- make player shoot a snowball at speed 2.0
- on projectile hit:
- projectile is a snowball
- set {_block} to "159:%a random integer between 0 and 15%" parsed as item
- 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
- loop blocks in radius 2 around projectile:
- delete {_noplace}
- loop-block is not air
- loop {_blocks::*}:
- id of loop-block is loop-value-2
- set {_noplace} to true
- {_noplace} is not set
- metadata "Painted" of block at loop-block is not set
- set {_restoreblocks::%{_place}%} to type of loop-block
- set {_restore::%{_place}%} to location at loop-block
- add 1 to {_place}
- @noupdate::set block at loop-block to {_block}
- set metadata "Painted" of block at loop-block to "true"
- play raw sound "mob.horse.armor" at loop-block with pitch 2 volume 0.35
- set {_dv} to data value of {_block}
- 1.8 spawn 7 of particle block break at location of loop-block with data 159 and secondary data {_dv}
- wait 1 tick
- wait 3 seconds
- loop {_restore::*}:
- delete metadata "Painted" of block at location at loop-value
- set block at location at loop-value to {_restoreblocks::%loop-index%}
- wait 1 tick
- on projectile hit:
- projectile is a snowball
- kill victim
Advertisement
Add Comment
Please, Sign In to add comment