I have some problems maybe you can resolve it. its a noob thing i think, i use this open store script:
void main()
{
object oStore = GetObjectByTag("TAG_OF_STORE_HERE");
object oSpeaker = GetPCSpeaker();
if (!GetIsObjectValid(oStore))
oStore = CreateObject(OBJECT_TYPE_STORE, "RESREF_OF_STORE_HERE", GetLocation(OBJECT_SELF));
if (GetIsObjectValid(oStore))
DelayCommand(0.5, OpenStore(oStore, oSpeaker));
}
Problem: If i open this store it works, but if i close it, it opens store again automatically unlimited times.. Can you help me a bit ? Note: I tried to fire the script both on PC and NPC lines.