Well we can try this, but Ob XP's scripts don't run on the normal frame cycle. It sets the fQuestDelayTime to 0.1 for the script in question. I'm guessing that the script would have gone through several cycles before it detects that the PCMiscStat 10 has been decrementented again. It's even possible that setting a variable won't help - that would be too late as well.
Use two variables, one for the real value, and one for what you read last time the script ran. If reading a new value larger than real, and larger than last read, just store it in the last read variable without doing anything more. Then, next time the script runs, if the read value remain larger than real, update real to this and give XP. If however read value has gone back, it was a false warning, so just reset the last read variable.
This should work - provided that PCMiscStat 10 is not updated by the engine before the soulgem registers that it gets filled. I know for a fact that a soulgem isn't registered as filled until half a second or so after the kill, so if the PCMiscStat 10 is updated immediately, you must have a counter that checks this for 10 conscutive runs of your script, or something like that...
Or you may not care that much, and apply the XP for PCMiscStat 10 increase from say 100 to 101, even though SM will reduce the stat back to 100 just after, but then you will not give a new xp until it increase up to 102. If doing this, you will give one XP too many, but not for each time SM add/empties soulgems. That may be the best solution
:lol: I just knew you were going to say that! But there's only one of "me" and there's tons of "you guys"

No seriously, very true and I was thinking of adding the exception in. It's just with the high frequency of these scripts, I'm looking to optimize them as much as possible and to make such exceptions generic. I was even thinking of introducing variables like the InterOp variables that are used for the points for this. Basically a series of exception variables that would be set by several mods - it wouldn't matter what the exception was, just the fact that I didn't want to tally the experience points for some reason.
Hm, I don't really think this is a very good idea. One of two conflicting mods must do something specifically for the other mod in cases like this, and in the cases we discuss here, it is Oblvion XP that needs things to be done, not the other mod. So it is natural to do the fix in Oblivion XP unless it is substantially easier to do it in the other mod.
Alright, so how do you want to proceed? I might be able to put a delay in before checking the PCMiscStat, so did you want to try decrementing it?
I think it makes sense to decement the PCMiscStat, so that it effectively only counts number of soulgems filled. Without Soulgem Magic soulgems filled == souls captured, but with Soulgem Magic, souls captured can get substantially higher, which doesn't really make sense. If you capture 21 petty souls into a common soulgem, that should probably count as 1, not 21. So I'll try decrementing it for the next version.