Initial upload
Initial upload
This commit is contained in:
17
_module/nss/prevent_theft2.nss
Normal file
17
_module/nss/prevent_theft2.nss
Normal file
@@ -0,0 +1,17 @@
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user