18 lines
488 B
Plaintext
18 lines
488 B
Plaintext
void main()
|
|
{
|
|
object o = OBJECT_SELF;
|
|
object oPC = GetLastOpenedBy();
|
|
int n = GetLocalInt(o, "IN_USE");
|
|
//If the device is in use, then prevent anyone from using it other than
|
|
//the original person with the item in there!
|
|
if(n==1)
|
|
{
|
|
if(GetLocalInt(oPC, "ITEM_USER")!=1)
|
|
{
|
|
AssignCommand(oPC, ClearAllActions());
|
|
AssignCommand(oPC, ActionMoveAwayFromObject(o, TRUE, 10.0f));
|
|
FloatingTextStringOnCreature("You may not use this device at this time!", oPC, TRUE);
|
|
}
|
|
}
|
|
}
|