/*   Script generated by
Lilac Soul's NWN Script Generator, v. 1.6

For download info, please visit:
http://www.lilacsoul.revility.com    */

//Put this OnUsed
void main()
{

object oPC = GetLastUsedBy();

if (!GetIsPC(oPC)) return;

if (GetItemPossessedBy(oPC, "01StaffKey")== OBJECT_INVALID)
   return;

object oTarget;
oTarget = GetObjectByTag("01SunDoor");

SetLocked(oTarget, FALSE);

FloatingTextStringOnCreature("You insert the sheperds staff from the diorama.  It fits perfectly, you turn it and hear the tumblers of a locking mechanism in the door open.", oPC);

}
