Update battle.js

//if you switch add the new pokemon to a list of pokemon to divide the exp into of it dies
vars.me.expDivision[activeMonKey] = true;
//if opponent switches clear the list of pokemon to divide the exp into and just add your active pokemon
vars.me.expDivision = new Object();
vars.me.expDivision[activeMonKey] = true;
//if opponent's pokemon faints divide the exp gained into all pokemon that were used on the last switch of their pokemon
vars.me.gainExp();
//on winning the battle (room battle events) gain money, on losing lose money
var plusorminus = -1;
if (win) plusorminus = 1;
vars.me.money += 100 * plusorminus;