UW2_PRC8/_module/nss/prevent_theft2.nss

18 lines
488 B
Plaintext
Raw Permalink Normal View History

2023-09-25 20:24:01 -04:00
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);
}
}
}