HoS_PRC8/_mod/_module/nss/cv_grth_armed.nss
Jaysyn904 04165202c0 Initial upload
Initial upload
2024-11-25 19:36:07 -05:00

31 lines
1.3 KiB
Plaintext

// Check to see if Grubbin's thief thinks you are armed to the teeth
int StartingConditional()
{
object oPC=GetPCSpeaker();
object oItem;
int nGold;
oItem=GetItemInSlot(INVENTORY_SLOT_CHEST,oPC);
if (GetIsObjectValid(oItem)) nGold=nGold+GetGoldPieceValue(oItem);
oItem=GetItemInSlot(INVENTORY_SLOT_HEAD,oPC);
if (GetIsObjectValid(oItem)) nGold=nGold+GetGoldPieceValue(oItem);
oItem=GetItemInSlot(INVENTORY_SLOT_LEFTHAND,oPC);
if (GetIsObjectValid(oItem)) nGold=nGold+GetGoldPieceValue(oItem);
oItem=GetItemInSlot(INVENTORY_SLOT_RIGHTHAND,oPC);
if (GetIsObjectValid(oItem)) nGold=nGold+GetGoldPieceValue(oItem);
int nLevel=GetLevelByPosition(1,oPC)+GetLevelByPosition(2,oPC)+GetLevelByPosition(3,oPC);
nGold=nGold+(nLevel*100);
oItem=GetAssociate(ASSOCIATE_TYPE_FAMILIAR,oPC);
if (GetIsObjectValid(oItem)) nGold=nGold+100;
oItem=GetAssociate(ASSOCIATE_TYPE_ANIMALCOMPANION,oPC);
if (GetIsObjectValid(oItem)) nGold=nGold+100;
oItem=GetAssociate(ASSOCIATE_TYPE_DOMINATED,oPC);
if (GetIsObjectValid(oItem)) nGold=nGold+100;
oItem=GetAssociate(ASSOCIATE_TYPE_HENCHMAN,oPC);
if (GetIsObjectValid(oItem)) nGold=nGold+100;
oItem=GetAssociate(ASSOCIATE_TYPE_SUMMONED,oPC);
if (GetIsObjectValid(oItem)) nGold=nGold+100;
if (nGold>999) return TRUE;
return FALSE;
}