Code:
on armor change:
if event-item is enchanted with protection 4:
loop enchantments of event-item:
if loop-value is protection 4:
set {_i} to loop-value
else:
add loop-value to {_enchants::*}
disenchant event-item
loop {_enchants::*}:
enchant event-item with loop-value
enchant event-item with protection 3
getting error that the event item cannot be changed
the idea is if armor on equip is with protection 4, enchant it with protection 3 instead