PGCC_PRC8/_module/nss/calcmodvalue1.nss
Jaysyn904 e51634d39b Initial upload
Initial upload.
2024-10-09 14:17:22 -04:00

25 lines
642 B
Plaintext

#include "inc_itemprop002"
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);
int iItemLevel = GetItemLevel(oCopy);
SetLocalInt(oPC, "iItemLevel", iItemLevel);
SetCustomToken(103, IntToString(iItemLevel));
}
else
SendMessageToPC(oPC, "ERROR: Invalid Property");
}