Initial upload
Initial upload
This commit is contained in:
21
_module/nss/replicate_invent.nss
Normal file
21
_module/nss/replicate_invent.nss
Normal file
@@ -0,0 +1,21 @@
|
||||
//Script Name: replicate_invent
|
||||
/////////////////////////////////////
|
||||
//Created by Genisys / Guile 4/12/09
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
//This script goes in the OnDisturbed of any placeable object w/an inventory.
|
||||
//This script will replicate an item placed into it's inventory
|
||||
void main()
|
||||
{
|
||||
object oPC = GetLastDisturbed();
|
||||
object oItem = GetInventoryDisturbItem();
|
||||
int nCopy = GetLocalInt(oItem, "COPIED_ITEM");
|
||||
|
||||
//Only allow them to copy the item 1 time EVER!
|
||||
if(nCopy !=1)
|
||||
{
|
||||
SetLocalInt(oItem, "COPIED_ITEM", 1);
|
||||
CopyItem(oItem, oPC, TRUE);
|
||||
//NOTE The variable on the old item is on the new too!
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user