I don't know how but i want to make a shockwave animation function. That function would make a shockwave from the blocks that im standing on. It would be something similar to this video:
I would only want it to do the thing when i used an orb with an ability i have code for that already but i just can't figure out how i can do that.
Code:
command /orb [text>]:
aliases: pets
trigger:
set {_text::*} to "eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvMTZhMThmOWQxYWU1YWIwNDQ2MTEyN2UzMWM1MTkwYzc2YjQ0MmRhNTAyODc3YWE2NDdmZDAzNDA1MDdiMzNhNSJ9fX0=", "eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvZGM2OTk5YzFmNTk2NDZmZTAxMjFhOTlkOWIwZmVmMzk5NmVkNzhjNmRjNTU1MzFkYWJjY2E3MDhjMWRjZjkxNiJ9fX0=" and "eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvNGM4MjNjOGU1M2QzYWU3NTNjMTkxYzUxZmU2Njc5MTE1MjczMzA2NDFhMDE2YTEzMzI1MDIzYTM5OWYwMTcyYSJ9fX0="
set {_names::*} to "<##9b7653>&lStomp Mk.1", "<##f9d71c>&lStomp Mk.2" and "<##e25822>&lStomp Mk.3"
set {_lores::*} to "&7||&7Knock away all players in||&7radius of 5 blocks of you.||&7For 5 blocks.||&7Ignores all knockback resistance.||&8Cooldown: &a120s", "&7||&7Knock away all players in||&7radius of 5 blocks of you.||&7For 8 blocks.||&7Ignores all knockback resistance.||&8Cooldown: &a60s", "&7||&7Knock away all players in||&7radius of 5 blocks of you.||&7For 10 blocks.||&7Ignores all knockback resistance.||&8Cooldown: &a30s"
loop {_text::*}:
set {_skull} to player skull with nbt "{display:{Name:""Globe""},SkullOwner:{Id:""0ceac85e-159d-4f9d-a1c2-c8acde792f23"",Properties:{textures:[{Value:""%loop-value%""}]}}}"
set {_lore::*} to coloured {_lores::%loop-index%} split at "||"
add {_skull} named "%{_names::%loop-index%}%" with lore {_lore::*} to player's inventory
on join:
loop 3 times:
add 1 to {_i}
set {cooldownMk%{_i}%::%player's uuid%} to now
remove 10 minute from {cooldownMk%{_i}%::%player's uuid%}
on death:
loop 3 times:
add 1 to {_i}
set {cooldownMk%{_i}%::%victim's uuid%} to now
remove 10 minute from {cooldownMk%{_i}%::%victim's uuid%}
function StompAblity(p: player, tier: integer, cooldown: integer, force: number):
if {cooldownMk%{_tier}%::%{_p}'s uuid%} is not set:
set {cooldownMk%{_tier}%::%{_p}'s uuid%} to now
if difference between now and {cooldownMk%{_tier}%::%{_p}'s uuid%} is more than 30 seconds:
set {cooldownMk%{_tier}%::%{_p}'s uuid%} to now
message "&eYou used Stomp Mk.%{_tier}%&e." to {_p}
loop all players in radius 5 around {_p}:
if loop-player is not {_p}:
push loop-player up with force {_force}
push loop-player vector from {_p} to loop-player with speed {_force}
set {lastAttackedBy::%loop-player's uuid%} to {_p}
message "&e%{_p}% used Stomp Mk.%{_tier}% on you&e." to loop-player
else:
set {_a} to difference between now and {cooldownMk%{_tier}%::%{_p}'s uuid%}
set {_n} to "%{_cooldown}% seconds" parsed as timespan
message "&eYou can use Stomp Mk.%{_tier}% again in &6%difference between {_a} and {_n}%&e." to {_p}
on right click:
if name of player's held item is "<##9b7653>&lStomp Mk.1":
cancel event
StompAblity(player, 1, 120, 1)
if name of player's held item is "<##f9d71c>&lStomp Mk.2":
cancel event
StompAblity(player, 2, 60, 1.2)
if name of player's held item is "<##e25822>&lStomp Mk.3":
cancel event
StompAblity(player, 3, 30, 1.4)
Last edited: