#include "inc_mod_constant"
void main()
    {
    object oPC = GetPCSpeaker();
    int iGold = GetGold(oPC);
    int iBank;
    if (iGold)
        {
        AssignCommand(oPC,TakeGoldFromCreature(iGold,oPC,TRUE));
        iBank = GetCampaignInt(CAMPAIGN,"Bank"+GetName(oPC),oPC);
        if (iBank)
            iGold += iBank;
        SetCampaignInt(CAMPAIGN,"Bank"+GetName(oPC),iGold,oPC);
        SendMessageToPC(oPC,IntToString(iGold) + " gold stored in bank.");
        if (EXPORT_CHARACTERS)
            ExportSingleCharacter(oPC);
        }
    }
