Ancordia_PRC8/_module/nss/craft_getvalue2.nss
Jaysyn904 102ba7dab6 Initial Commit
Initial Commit
2023-09-21 19:51:32 -04:00

26 lines
801 B
Plaintext

int StartingConditional()
{
object oPC = GetPCSpeaker();
object oItem = GetFirstItemInInventory(oPC);
int nValue;
string sValue;
string sCost;
while (GetIsObjectValid(oItem))
{
if (GetLocalInt(oItem, "Prototype") == TRUE)
{
nValue = GetGoldPieceValue(oItem);
if (GetLocalString(oItem, "Type") == "Ammo") nValue = 99*nValue;
if (GetLocalString(oItem, "Type") == "Throwing" || GetLocalString(oItem, "Type") == "MightyThrowing") nValue = 50*nValue;
sValue = IntToString(nValue);
SetCustomToken(799, sValue);
sCost = IntToString(3*nValue/4);
SetCustomToken(800, sCost);
return TRUE;
}
oItem = GetNextItemInInventory(oPC);
}
return TRUE;
}