void main() { object oPC = GetEnteringObject(); if(!GetLocalInt(oPC,"DeTrapped") == 1) { if(GetIsPC(oPC) == TRUE) { AssignCommand(GetObjectByTag("px_portc_1"),ActionCloseDoor(GetObjectByTag("px_portc_1"))); AssignCommand(GetObjectByTag("px_portc_2"),ActionCloseDoor(GetObjectByTag("px_portc_2"))); AssignCommand(GetObjectByTag("px_trapbones"),ActionCastSpellAtObject(SPELL_ACID_FOG,GetObjectByTag("px_trapbones"),METAMAGIC_EXTEND,TRUE,0,PROJECTILE_PATH_TYPE_DEFAULT,TRUE)); AssignCommand(GetObjectByTag("px_barghestdoor"),ActionOpenDoor(GetObjectByTag("px_barghestdoor"))); SetLocalInt(oPC,"DeTrapped",1); } } }