Initial commit
Initial commit.
This commit is contained in:
21
_module/nss/calcmodvalue1.nss
Normal file
21
_module/nss/calcmodvalue1.nss
Normal file
@@ -0,0 +1,21 @@
|
||||
#include "inc_itemprop001"
|
||||
|
||||
void main()
|
||||
{
|
||||
object oPC = GetPCSpeaker();
|
||||
object oItem = GetLocalObject(oPC, "MODIFY_ITEM");
|
||||
|
||||
itemproperty ip = GetNewProperty(oItem);
|
||||
|
||||
//Copy item and modify to get new value
|
||||
if ( GetIsItemPropertyValid(ip))
|
||||
{
|
||||
object oCopy = CopyItem(oItem, OBJECT_SELF);
|
||||
CustomAddProperty(oCopy, ip);
|
||||
SetLocalObject(oPC, "MODIFY_COPY", oCopy);
|
||||
}
|
||||
else
|
||||
SendMessageToPC(oPC, "ERROR: Invalid Property");
|
||||
|
||||
|
||||
}
|
Reference in New Issue
Block a user