Skript Version: Skript 2.3.5
Skript Author: Bensku
Minecraft Version: 1.13.2
Problem
Hey recently I began trying to make a script that would check the lore of a item the player was holding and if it contained the words "Barrage I" anywhere within the lore then the player could cast a spell.
my problem is that I can get it working if I use the name of the item instead or include the whole lore but it wont work if I just include the words "Barrage I" unless all lore is removed but those words..
Thank you in advance for any help
Skript Author: Bensku
Minecraft Version: 1.13.2
Problem
Hey recently I began trying to make a script that would check the lore of a item the player was holding and if it contained the words "Barrage I" anywhere within the lore then the player could cast a spell.
my problem is that I can get it working if I use the name of the item instead or include the whole lore but it wont work if I just include the words "Barrage I" unless all lore is removed but those words..
Thank you in advance for any help
Code:
On rightclick:
if held item is a diamond sword:
if lore of item contains "&7Barrage I":
if distance between the player and the targeted entity is smaller than 70:
set {_waited} to difference between {barrage.%player%.lastused} and now
if {_waited} is less than 30 seconds:
message "&cYou have to wait %difference between 30 seconds and {_waited}% before you can use this skill again!"
stop
make player player cast skill "Barrage" with trigger player at entity target with delay 0 and repeat 0
set {barrage.%player%.lastused} to now
else:
message "&bYou're too far away from the target"