Initial commit
Initial commit.
This commit is contained in:
21
_module/nss/modifyitem.nss
Normal file
21
_module/nss/modifyitem.nss
Normal file
@@ -0,0 +1,21 @@
|
||||
#include "itemprocs"
|
||||
|
||||
void main()
|
||||
{
|
||||
object oPC = GetPCSpeaker();
|
||||
|
||||
//Transfer gold
|
||||
int iValue = GetLocalInt(oPC, "MODIFY_VALUE");
|
||||
int iDiff = GetLocalInt(oPC, "MODIFY_DIFF");
|
||||
if (iDiff == 1)
|
||||
TakeGoldFromCreature(iValue, oPC, TRUE);
|
||||
else if (iDiff == -1)
|
||||
GiveGoldToCreature(oPC, iValue);
|
||||
|
||||
//Modify item
|
||||
object oItem = GetLocalObject(oPC, "MODIFY_ITEM");
|
||||
itemproperty ip = GetNewProperty(oItem);
|
||||
|
||||
if ( GetIsItemPropertyValid(ip))
|
||||
CustomAddProperty(oItem, ip);
|
||||
}
|
||||
Reference in New Issue
Block a user