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

43 lines
1.3 KiB
Plaintext

int StartingConditional()
{
object oPC = GetPCSpeaker();
object oItem = GetFirstItemInInventory(oPC);
int nValue;
while (GetIsObjectValid(oItem))
{
if (GetLocalInt(oItem, "Prototype") == TRUE)
{
nValue = GetGoldPieceValue(oItem);
if (GetLocalString(oItem, "Type") == "Melee")
{
if (nValue > 65000)
return TRUE;
}
if (GetLocalString(oItem, "Type") == "Ammo")
{
if (99*nValue > 16000)
return TRUE;
}
if (GetLocalString(oItem, "Type") == "Shooter" && GetItemHasItemProperty(oItem, ITEM_PROPERTY_UNLIMITED_AMMUNITION) == FALSE)
{
if (nValue > 30000)
return TRUE;
}
if (GetLocalString(oItem, "Type") == "Shooter" && GetItemHasItemProperty(oItem, ITEM_PROPERTY_UNLIMITED_AMMUNITION) == TRUE)
{
if (nValue > 65000)
return TRUE;
}
if (GetLocalString(oItem, "Type") == "Throwing" || GetLocalString(oItem, "Type") == "MightyThrowing")
{
if (50*nValue > 12000)
return TRUE;
}
return FALSE;
}
oItem = GetNextItemInInventory(oPC);
}
return FALSE;
}