OK, so heading in the right direction, just needs some work.
If you already have many different creatures that might be sacrificed, you probably want to make one script change that affects them all automatically. That avoids all the work of editing the creature templates and instances.
So, I suggest you change the default OnDeath script nw_c2_default7.
Open the script editor > Open An Existing File > check "All Resources" > select "nw_c2_default7" > OK to the warning.
Replace this line
craft_drop_items(oKiller);
with this:
craft_drop_items(oKiller);
// Custom code
if (GetLocalInt(OBJECT_SELF, "int_sacrifice_tri")!= 1)
return;
object oTarget;
oTarget = GetObjectByTag("sv_barrow_door");
AssignCommand(GetModule(), AssignCommand(oTarget, ActionOpenDoor(oTarget)));
// End custom code
You'll see I've made two changes to your code.
Firstly, OBJECT_SELF is the creature who just died.
Secondly, I've told the module to issue your action to the door. This is a trick to avoid the general rule that orders issued by dead creatures get cancelled.
I can make it a little tidier, if you like.