i made a wand that can shoot fireballs and stuff like that but i also want to add a second spell now that strikes lightning but i dont know how to add a spell switcher (i would have the spells switch on right click because the spell is cast on left click) Rn i only have this code but i hope someone can help me with adding it because im fairly new to skript
# permissions: skript.Wand
variables:
{%player%::fireballavalible} = 1
command /wand:
trigger:
player has permission "skript.Wand"
give blaze rod named "&c&lWand" with lore "&kL<reset>" to player
on left click:
if held item is blaze rod:
if lore of item contains "&kL":
if {%player%::fireballavalible} = 1:
shoot fireball
set {%player%::fireballavalible} to 0
wait 3 seconds
set {%player%::fireballavalible} to 1
on projectile collide:
damage entity by 1.5
# permissions: skript.Wand
variables:
{%player%::fireballavalible} = 1
command /wand:
trigger:
player has permission "skript.Wand"
give blaze rod named "&c&lWand" with lore "&kL<reset>" to player
on left click:
if held item is blaze rod:
if lore of item contains "&kL":
if {%player%::fireballavalible} = 1:
shoot fireball
set {%player%::fireballavalible} to 0
wait 3 seconds
set {%player%::fireballavalible} to 1
on projectile collide:
damage entity by 1.5