hello so im working on a wand skript and i've been having issues with my current cooldown script because it basically cancels everything so i would love a new one.
command /wand:
----trigger:
------player has permission "skript.Wand"
------give blaze rod named "&c&lWand" with lore "&kL<reset>" to player
on right click:
--if name of item is "&c&lWand":
----if {%player%.spellselected} is "fireball":
------set {%player%.spellselected} to "thunderbolt"
------send action bar "&aSpell: &bthunderbolt" to player
----else if {%player%.spellselected} is "thunderbolt":
------set {%player%.spellselected} to "spark"
------send action bar "&aSpell: &5spark" to player
----else if {%player%.spellselected} is "spark":
------set {%player%.spellselected} to "heal"
------send action bar "&aSpell: &2heal" to player
----else if {%player%.spellselected} is "heal":
------set {%player%.spellselected} to "fireball"
------send action bar "&aSpell: &cfireball" to player
on left click:
--if name of item is "&c&lWand":
----cancel event
----if {%player%.spellselected} is "fireball":
------spawn fireball at location 1 meter above and 2 meters in front of player
------add "{ExplosionPower:2}" to nbt of last spawned entity
------push last spawned entity in direction of player with force 1
----else if {%player%.spellselected} is "thunderbolt":
------if target of player is an entity:
--------strike lightning at target entity
--------drawDot count 5, particle "cloud", XYZ 0, 0, 0, center {_loc}, visibleRange 32, pulseDelay 0, keepFor 10 ticks
------else:
--------stop
----else if {%player%.spellselected} is "spark":
------if target of player is an entity:
--------damage target by 2
--------set {_loc} to the location 1 meter above target
--------drawSphere style 2, particle "redstone", speed 10, RGB 235, 52, 52, center {_loc}, id "%player%.sphere", rainbowMode false, radius 1, density 5, visibleRange 32, pulseDelay 0
--------drawSphere style 2, particle "redstone", speed 10, RGB 255, 0, 153, center {_loc}, id "%player%.sphere2", rainbowMode false, radius 1, density 5, visibleRange 32, pulseDelay 0
--------drawSphere style 2, particle "redstone", speed 10, RGB 255, 0, 200, center {_loc}, id "%player%.sphere3", rainbowMode false, radius 1, density 5, visibleRange 32, pulseDelay 0
--------wait 0.5 seconds
--------stopEffect "%player%.sphere"
--------stopEffect "%player%.sphere2"
--------stopEffect "%player%.sphere3"
------else:
--------stop
----else if {%player%.spellselected} is "heal":
------add 3 to player's health
command sendhelp:
----trigger:
--------send "help arrived!"
--------set {%player%.spellselected} to "fireball"
command /wand:
----trigger:
------player has permission "skript.Wand"
------give blaze rod named "&c&lWand" with lore "&kL<reset>" to player
on right click:
--if name of item is "&c&lWand":
----if {%player%.spellselected} is "fireball":
------set {%player%.spellselected} to "thunderbolt"
------send action bar "&aSpell: &bthunderbolt" to player
----else if {%player%.spellselected} is "thunderbolt":
------set {%player%.spellselected} to "spark"
------send action bar "&aSpell: &5spark" to player
----else if {%player%.spellselected} is "spark":
------set {%player%.spellselected} to "heal"
------send action bar "&aSpell: &2heal" to player
----else if {%player%.spellselected} is "heal":
------set {%player%.spellselected} to "fireball"
------send action bar "&aSpell: &cfireball" to player
on left click:
--if name of item is "&c&lWand":
----cancel event
----if {%player%.spellselected} is "fireball":
------spawn fireball at location 1 meter above and 2 meters in front of player
------add "{ExplosionPower:2}" to nbt of last spawned entity
------push last spawned entity in direction of player with force 1
----else if {%player%.spellselected} is "thunderbolt":
------if target of player is an entity:
--------strike lightning at target entity
--------drawDot count 5, particle "cloud", XYZ 0, 0, 0, center {_loc}, visibleRange 32, pulseDelay 0, keepFor 10 ticks
------else:
--------stop
----else if {%player%.spellselected} is "spark":
------if target of player is an entity:
--------damage target by 2
--------set {_loc} to the location 1 meter above target
--------drawSphere style 2, particle "redstone", speed 10, RGB 235, 52, 52, center {_loc}, id "%player%.sphere", rainbowMode false, radius 1, density 5, visibleRange 32, pulseDelay 0
--------drawSphere style 2, particle "redstone", speed 10, RGB 255, 0, 153, center {_loc}, id "%player%.sphere2", rainbowMode false, radius 1, density 5, visibleRange 32, pulseDelay 0
--------drawSphere style 2, particle "redstone", speed 10, RGB 255, 0, 200, center {_loc}, id "%player%.sphere3", rainbowMode false, radius 1, density 5, visibleRange 32, pulseDelay 0
--------wait 0.5 seconds
--------stopEffect "%player%.sphere"
--------stopEffect "%player%.sphere2"
--------stopEffect "%player%.sphere3"
------else:
--------stop
----else if {%player%.spellselected} is "heal":
------add 3 to player's health
command sendhelp:
----trigger:
--------send "help arrived!"
--------set {%player%.spellselected} to "fireball"