Scriptname SuH_ie_hxpgen extends activemagiceffect  

GlobalVariable Property SuH_PCSheartXP auto
GlobalVariable Property SuH_PCSheartXPgain auto

Actor Property PlayerRef Auto

int hxpg
int x

Event OnEffectStart(Actor akTarget, Actor akCaster)
	if akTarget == PlayerRef
		RegisterForSingleUpdate(5.0)
	endIf
endEvent

Event OnUpdate()
	hxpg = SuH_PCSheartXPgain.GetValue() as int
	x = Math.Floor(1*hxpg*0.01)
	SuH_PCSheartXP.SetValue(SuH_PCSheartXP.GetValue() + x)
	RegisterForSingleUpdate(5.0)
endEvent