Hello all, this is the first time I've worked with tracked stats script and struggling with it. The script itself does what id like it to (Give item on tracked stat "skill increases" change) but I'm unfamiliar with how to check for stat change in single digit increments, besides that I'm new to scripting in general.
Here's the source as is, it current does in fact add gold if the player gets any skill level advancement BUT IT NEVER STOPS ADDING GOLD.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Actor property player auto
MiscObject Property gold001 Auto
Event OnEffectStart(Actor akTarget, Actor akCaster)
RegisterForTrackedStatsEvent()
EndEvent
Event OnTrackedStatsEvent(string asStatFilter, int aiStatValue)
(asStatFilter == "Skill Increases")
if (aiStatValue + 1)
player.additem(Gold001, 500, TRUE)
endif
EndEVENT
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
I would appreciate any help in getting this to fire every time the "Skill Increases" tracked stat value changes but only runs the player.additem once. Thank you dearly in advance.
Edit: Solved with dispelspell and addspell. I'm still curious other options but think the script is good enough for now.