I think you could do it with common events. Whenever you go to a different map (after the Transfer Player command, but in the same event), activate a switch. Make that switch the trigger for a Autorun Common Event. Then, in that Common Event, increase the gold, set the variable used to 0, and turn off the switch. That should work.