Files
explosive_wither_mace.sk
Code
1 56
explosive_wither_mace.sk
# Requires Skript and SkBee for shaped recipe registration.
options:
dash-cooldown: 3 seconds
dash-window: 10 seconds
on load:
set {_wither_shard} to amethyst shard named "&5&lWither Shard"
set line 1 of lore of {_wither_shard} to "&7A dark, pulsating crystal."
set line 2 of lore of {_wither_shard} to "&7Used to craft volatile weapons."
register new shaped recipe for {_wither_shard} using amethyst shard, wither skeleton skull, amethyst shard, wither skeleton skull, air, wither skeleton skull, amethyst shard, wither skeleton skull, amethyst shard with id "wither_shard_recipe"
set {_mace} to mace named "&d&lExplosive Wither Mace"
set line 1 of lore of {_mace} to "&7Right-click to launch an explosive dash."
set line 2 of lore of {_mace} to "&7Fall impact creates a massive explosion."
register new shaped recipe for {_mace} using {_wither_shard}, heavy core, {_wither_shard}, {_wither_shard}, breeze rod, {_wither_shard}, air, air, air with id "explosive_mace_recipe"
on right click:
if name of player's tool is not "&d&lExplosive Wither Mace":
stop
if {mace_cooldown::%uuid of player%} is set:
set {_elapsed} to difference between now and {mace_cooldown::%uuid of player%}
if {_elapsed} is less than {@dash-cooldown}:
set {_remaining} to {@dash-cooldown} - {_elapsed}
send "&cDash on cooldown! Wait %{_remaining}%." to player
stop
set {mace_cooldown::%uuid of player%} to now
set {mace_dash::%uuid of player%} to now
push player in direction of player at speed 2.5
push player upwards at speed 1.2
play sound "entity.wind_charge.wind_burst" with volume 1.5 and pitch 0.8 at player
play sound "entity.wither.shoot" with volume 0.8 and pitch 1.2 at player
play effect explosion at location of player
on damage of player:
if damage cause is not fall:
stop
if {mace_dash::%uuid of victim%} is not set:
stop
if difference between now and {mace_dash::%uuid of victim%} is greater than {@dash-window}:
delete {mace_dash::%uuid of victim%}
stop
cancel event
delete {mace_dash::%uuid of victim%}
create an explosion of force 2.5 at location of victim
play sound "entity.generic.explode" with volume 1.5 and pitch 0.9 at location of victim
play sound "entity.wither.break_block" with volume 1.0 and pitch 0.8 at location of victim