Added PnP Dire Rat.

Added PnP Dire Rat.
This commit is contained in:
Jaysyn904
2021-07-21 17:48:43 -04:00
parent 552f1686c8
commit b01c5cc7db
10849 changed files with 171143 additions and 1 deletions

View File

@@ -0,0 +1,42 @@
int GetTotalPlayerItemCost(object oPlayer);
void main()
{
object oPlayer;
int nTotalPlayerCost;
oPlayer = GetPCSpeaker();
nTotalPlayerCost = GetTotalPlayerItemCost(oPlayer);
SetCustomToken(500,IntToString(nTotalPlayerCost));
}
int GetTotalPlayerItemCost( object oPlayer )
{
int nCount, nTotalCost = 0;
object oItem;
// Calculate the total cost of items in the creature's
// repository
oItem = GetFirstItemInInventory(oPlayer);
while ( GetIsObjectValid(oItem) == TRUE )
{
nTotalCost += GetGoldPieceValue(oItem);
oItem = GetNextItemInInventory(oPlayer);
}
// Now iterate through each inventory slot and compute
// the cost of the item (if one exists in that slot)
// - BKH - Jun/09/02
for ( nCount = 0; nCount < NUM_INVENTORY_SLOTS; nCount++ )
{
oItem = GetItemInSlot(nCount,oPlayer);
if ( GetIsObjectValid(oItem) )
{
nTotalCost += GetGoldPieceValue(oItem);
}
}
return nTotalCost;
}