I am trying to make a script where if you attack the player wearing the armor, you get lit on fire. I keep getting so many errors, not even sure if it's possible. Can anyone help?
Code:
options:
lighterLore: "&7Lighter %amount%"
command /loe add lighter <number>:
trigger:
if player's tool is a piece of armor:
set {_amount} to argument 1 parsed as integer
add "{@lighterLore.replace("%amount%", "%{_amount}%")}" to lore of player's tool
send "Lore added: &7Lighter %{_amount}%" to player
else:
send "You must hold an armor piece to add lore." to player
command /leeifsotherenchants add lighter <number>:
trigger:
if player's tool is a piece of armor:
set {_amount} to argument 1 parsed as integer
add "{@lighterLore.replace("%amount%", "%{_amount}%")}" to lore of player's tool
send "Lore added: &7Lighter %{_amount}%" to player
else:
send "You must hold an armor piece to add lore." to player
on damage:
attacker is a player
victim is a player
victim is wearing any armor:
set {_lore} to lore of victim's helmet
{_lore} is not set
loop {_lore::*}:
if loop-value contains "Lighter":
set {_level} to last 1 character of loop-value
if {_level} is "I":
set {_duration} to 3
else if {_level} is "II":
set {_duration} to 4
else if {_level} is "III":
set {_duration} to 5
else if {_level} is "IV":
set {_duration} to 6
else if {_level} is "V":
set {_duration} to 7
apply fire to attacker for {_duration} seconds
stop