Hi!
I'm trying to see which enchantments I can recreate with skript but I feel like my current sharpness skript could be optimized. Basically, I want to know if there is a way to detect the sharpness level without checking every variation of the lore so then I can scale this to any level of sharpness. Keep in mind I do not want to use actual enchants. If this is not possible I understand.
Versions and addons:
Skript for Paper 2.6.1
SkDragon
skript-reflect
SkBee
SkriptGUI
SkRayfall
my current code:
I'm trying to see which enchantments I can recreate with skript but I feel like my current sharpness skript could be optimized. Basically, I want to know if there is a way to detect the sharpness level without checking every variation of the lore so then I can scale this to any level of sharpness. Keep in mind I do not want to use actual enchants. If this is not possible I understand.
Versions and addons:
Skript for Paper 2.6.1
SkDragon
skript-reflect
SkBee
SkriptGUI
SkRayfall
my current code:
Code:
on damage:
if lore of attacker's tool contains "sharptest 1":
add 1 to damage
send damage to attacker
else if lore of attacker's tool contains "sharptest 2":
add 1.5 to damage
send damage to attacker
else if lore of attacker's tool contains "sharptest 3":
add 2 to damage
send damage to attacker
else if lore of attacker's tool contains "sharptest 4":
add 2.5 to damage
send damage to attacker
else if lore of attacker's tool contains "sharptest 5":
add 3 to damage
send damage to attacker