// OBSOLETE AS OF RDG 9.
#include "inc_mod_constant"
void main()
    {
    int iPot,iGold,iSplit;
    int i,j;
    object oPC = GetFirstFactionMember(GetPCSpeaker());
    while (GetIsObjectValid(oPC))
        {
        j += 1;
        iGold = GetGold(oPC);
        iPot += iGold;
        TakeGoldFromCreature(iGold,oPC,TRUE);
        oPC = GetNextFactionMember(GetPCSpeaker());
        }
    iSplit = iPot/j;
    oPC = GetFirstFactionMember(GetPCSpeaker());
    while (GetIsObjectValid(oPC))
        {
        GiveGoldToCreature(oPC,iSplit);
        oPC = GetNextFactionMember(GetPCSpeaker());
        }
    if (EXPORT_CHARACTERS)
        ExportAllCharacters();
    }


