I'm trying to understand the basic concept of modding and scripting, making a simple test mod just for fun. Unfortunately, I'm stuck with a damn messagebox that repeats again and again. No help found in the wiki nor googling.
The story is short: I've added a spell to a mage who sells spells. When I buy the spell, I should receive a messagebox, and stop there. And indeed so it is. The problem is that this messagebox repeats again and again. This is the script:
scn TestMod
ref PowerSpell
begin gamemode
set PowerSpell to aaPSpell
if ( Player.HasSpell PowerSpell == 1 ) && ( Player.IsInCombat == 0 )
MessageBox "I got a very powerful spell!"
endif
end
ref PowerSpell
begin gamemode
set PowerSpell to aaPSpell
if ( Player.HasSpell PowerSpell == 1 ) && ( Player.IsInCombat == 0 )
MessageBox "I got a very powerful spell!"
endif
end
Please, can someone of you experienced modders suggest how can I solve this problem?
Cheers,