Files
motolov.sk
Code
1 66
motolov.sk
# Motolov — ogień, obrażenia x2 i spowolnienie pobliskich graczy
options:
motolov-name: &cM&4o&ct&4o&cl&4o&cv
slow-duration: 8 seconds
fire-boost-time: 10 seconds
cooldown: 15 seconds
command /motolov:
trigger:
set {_motolov-item} to netherite scrap named "{@motolov-name}"
set custom model data of {_motolov-item} to 1
give {_motolov-item} to player
send "&aOtrzymałeś koktajl Motolova!" to player
on right click:
if clicked block is set:
if player's tool is a netherite scrap:
if name of player's tool is "{@motolov-name}":
if {motolov.cooldown::%player%} is set:
if difference between now and {motolov.cooldown::%player%} is less than {@cooldown}:
send "&cAby użyć kolejnego Motolova trzeba poczekać 15s!" to player
stop
delete {motolov.cooldown::%player%}
cancel event
set {motolov.cooldown::%player%} to now
remove 1 of player's tool from player
set {_motolov-location} to location of clicked block
play sound "entity.generic.explode" with volume 1.5 and pitch 0.8 at {_motolov-location}
play sound "entity.blaze.shoot" with volume 1.2 and pitch 0.7 at {_motolov-location}
execute console command "particle minecraft:flame %x-coordinate of {_motolov-location}% %y-coordinate of {_motolov-location}% %z-coordinate of {_motolov-location}% 1 1 1 0.1 80 force"
execute console command "particle minecraft:smoke %x-coordinate of {_motolov-location}% %y-coordinate of {_motolov-location}% %z-coordinate of {_motolov-location}% 0.8 0.8 0.8 0.05 35 force"
loop blocks in radius 3 around clicked block:
if loop-block is air:
if block below loop-block is solid:
set loop-block to fire
loop all players in radius 3 around clicked block:
if loop-player is not player:
apply slowness 2 to loop-player for {@slow-duration}
if loop-player has potion effect of fire resistance:
damage loop-player by 2
else:
damage loop-player by 4
set loop-player on fire for 5 seconds
play sound "block.fire.ambient" with volume 1 and pitch 1.3 at loop-player
send "&cZostałeś spowolniony przez Motolov!" to loop-player
add 1 to {motolov.boost-id}
set {_boost-id} to {motolov.boost-id}
set {motolov.fire-boost} to true
send "&6Motolov został aktywowany!" to player
wait {@fire-boost-time}
if {motolov.boost-id} is {_boost-id}:
delete {motolov.fire-boost}
on damage:
if {motolov.fire-boost} is true:
if damage cause is fire:
set damage to damage * 2