#include "mn_checkinv"

void main()
{
   int amount = 1000000; // Amount to deposit
   object bankToken = findItem( GetPCSpeaker(), "MN_MISC_BANKTOK" );
   int balance = GetLocalInt( bankToken, "BALANCE" );
   int gold = GetGold( GetPCSpeaker() );

   if (gold >= amount)
   {
      balance = balance + amount;
      TakeGoldFromCreature( amount, GetPCSpeaker(), TRUE );
      SetLocalInt( bankToken, "BALANCE", balance );
      SetCustomToken(100, IntToString( gold-amount ) );
   }
}