on damage:
if attacker is a living entity:
if victim is a player:
if vehicle of victim is a horse:
set damage to (damage - (damage * ({rpgsystem::vehicle::damagereduction::%victim%} / 100)))
set {_x} to damage - (damage * ({rpgsystem::vehicle::damageshare::%victim%} / 100))
add 1 to {rpgsystem::vehicle::xp::%victim%}
if {rpgsystem::vehicle::xp::%victim%} is greater than or equal to {rpgsystem::vehicle::exptolevelup::%victim%}:
leveluphorse(attacker)
if health of vehicle of victim is greater than {_x}:
damage vehicle of victim by {_x}
set damage to damage - {_x}
I wrote a script that will redirect some of the damage hit us to the horse. but we don't take any damage, the horse eats all the damage. where am i doing wrong?