18 lines
609 B
Plaintext
18 lines
609 B
Plaintext
////////////////////////////////////////////////////////////////////////////////
|
|
// rh_pl_bagopen - not owner check
|
|
// By Deva B. Winblood. November 12th, 2008
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
|
|
void main()
|
|
{
|
|
object oMe=OBJECT_SELF;
|
|
object oPC=GetLastOpenedBy();
|
|
object oOwner=GetLocalObject(oMe,"oOwner");
|
|
if (oPC!=oOwner)
|
|
{ // abort
|
|
SendMessageToPC(oPC,"You are not allowed to open this container.");
|
|
AssignCommand(oPC,ClearAllActions(TRUE));
|
|
AssignCommand(oPC,ActionMoveAwayFromObject(oMe,TRUE));
|
|
} // abort
|
|
}
|