13 lines
376 B
Plaintext
13 lines
376 B
Plaintext
void main()
|
|
{
|
|
object oPC=GetLastUsedBy();
|
|
object oMe=OBJECT_SELF;
|
|
object oOwner=GetLocalObject(oMe,"oOwner");
|
|
if (oPC!=oOwner)
|
|
{ // not allowed to open
|
|
SendMessageToPC(oPC,"You do not own this magical chest and cannot open it!");
|
|
AssignCommand(oPC,ClearAllActions(TRUE));
|
|
AssignCommand(oPC,ActionCloseDoor(oMe));
|
|
} // not allowed to open
|
|
}
|