/* 1. Script Name = Door And Chest ?

2. What it does: When you place a Special item in a chest, a door will open and Unlocks (if its locked)!
When you place the "special" item in the chest, It will be destroyed.

3. Notes: Place this script in the "OnDisturbed" on the Chest! */




void main()
{
object oItem = GetInventoryDisturbItem();
int nItemBase = GetBaseItemType(oItem);
if(GetLocalInt(OBJECT_SELF,"") == FALSE &&
GetTag(oItem) == "SPECIEL ITEM-TAG" )
{
DestroyObject(oItem);
object oDoor = GetObjectByTag("DOOR-TAG");
AssignCommand(oDoor,ActionOpenDoor(oDoor));
SetLocked(oDoor,FALSE);
}
}





/* "SPECIAL ITEM-TAG" = The TAG of the item that must be inserted into the chest to get the door opened!

"DOOR-TAG" = The Tag of the door that shall be Opened/Unlocked!

As I said before! This script is made by Bioware! But It can be a cool thing to add somewhere on your modul!

Have fun! */