54 lines
1.5 KiB
Plaintext
54 lines
1.5 KiB
Plaintext
#include "bank_util"
|
|
|
|
void main()
|
|
{
|
|
string sTokenValue;
|
|
object oPC = GetPCSpeaker();
|
|
object oItm;
|
|
string sResRef;
|
|
|
|
int i1k = 0;
|
|
int i10k = 0;
|
|
int i100k = 0;
|
|
int i250k = 0;
|
|
int i1Mil = 0;
|
|
int iGold = GetGold(oPC);
|
|
int iTotal;
|
|
|
|
oItm = GetFirstItemInInventory(oPC);
|
|
while (GetIsObjectValid(oItm)) {
|
|
|
|
sResRef = GetResRef(oItm);
|
|
if (sResRef== BANKTOKEN_1K) i1k++;
|
|
if (sResRef == BANKTOKEN_10K) i10k++;
|
|
if (sResRef == BANKTOKEN_100K) i100k++;
|
|
if (sResRef == BANKTOKEN_250K) i250k++;
|
|
if (sResRef== BANKTOKEN_1MILL) i1Mil++;
|
|
|
|
oItm = GetNextItemInInventory(oPC);
|
|
}
|
|
iTotal = iGold;
|
|
iTotal += i1k*1000;
|
|
iTotal += i10k*10000;
|
|
iTotal += i100k*100000;
|
|
iTotal += i250k*250000;
|
|
iTotal += i1Mil*1000000;
|
|
|
|
sTokenValue = "Gold Balance\n";
|
|
sTokenValue += "-----------------------------\n";
|
|
sTokenValue += " 1,000 x "+IntToString(i1k)+"\n";
|
|
sTokenValue += " 10,000 x "+IntToString(i10k)+"\n";
|
|
sTokenValue += " 100,000 x "+IntToString(i100k)+"\n";
|
|
sTokenValue += " 250,000 x "+IntToString(i250k)+"\n";
|
|
sTokenValue += "1,000,000 x "+IntToString(i1Mil)+"\n";
|
|
sTokenValue += "-----------------------------\n";
|
|
sTokenValue += "Gold Coins: "+FormatMoneyString(IntToString(iGold))+" Gold\n";
|
|
sTokenValue += "-----------------------------\n";
|
|
sTokenValue += "Total: "+FormatMoneyString(IntToString(iTotal))+" Gold\n";
|
|
sTokenValue += "-----------------------------\n";
|
|
|
|
SetCustomToken(1000,sTokenValue);
|
|
}
|
|
|
|
|