Scriptname __LALLThrowTomatoPassiveEffect extends activemagiceffect  

Actor Property PlayerRef Auto
Potion Property Tomato Auto
Spell Property ThrowTomato1 Auto
Spell Property ThrowTomato2 Auto

Event OnEffectStart(actor akTarget, actor akCaster)
RegisterForActorAction(2)
EndEvent

Event OnEffectFinish(actor akTarget, actor akCaster)
UnRegisterForActorAction(2)
EndEvent


Event OnActorAction(int actionType, Actor akActor, Form source, 	int slot)
if (actionType == 2) && (source == ThrowTomato1 || source == ThrowTomato2)
If PlayerRef.GetItemCount(Tomato) > 0
PlayerRef.RemoveItem(Tomato,1)
endif
endif
EndEvent