#include "spawner" void main() { object oPC = GetLastOpenedBy(); object oMod = GetModule(); object oItem = GetFirstItemInInventory(OBJECT_SELF); int oCount2 = GetLocalInt(oPC, "ch_count"); int oCountdown = GetLocalInt(oMod, "countdown"); int oChest1 = GetLocalInt(oMod, "chest1"); int oChest2 = GetLocalInt(oMod, "chest2"); int oChest3 = GetLocalInt(oMod, "chest3"); int oChest4 = GetLocalInt(oMod, "chest4"); int oComplete2 = GetLocalInt(oMod, "d2_complete"); int oComplete2a = GetLocalInt(oMod, "d2a_complete"); int oComplete5 = GetLocalInt(oMod, "d5_complete"); string oTag; location iLocation = GetLocation(OBJECT_SELF); ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_MYSTICAL_EXPLOSION), GetLocation(OBJECT_SELF)); DestroyObject(OBJECT_SELF, 0.0); SetLocalInt(oMod, "chest1", 1); if (oComplete2==1) {SetLocalInt(oMod, "chest2", 1);} if (oComplete2a==1) {SetLocalInt(oMod, "chest3", 1);} if (oComplete5==1) {SetLocalInt(oMod, "chest4", 1);} SetLocalInt(oMod, "chest_here", 0); }