MMD_PRC8/_module/nss/modifyitem.nss
Jaysyn904 adeff59f82 Initial commit
Initial commit.
2024-08-02 23:18:00 -04:00

22 lines
523 B
Plaintext

#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);
}