Making bot do town chores

So I have a script where sorc gets xp shrine, how do I make it so after he tp’s shrine he does chores that way I don’t have to wait in the next game for him to buy town portals?

function EsSearch() {
Pather.useWaypoint(4);
Precast.doPrecast(true);

for (i = 4; i > 1; i -= 1) {
	if (Misc.getShrinesInArea(i, 15, false)) {
		say("");
		return;
	}
}

Town.goToTown();
Pather.useWaypoint(5);
Precast.doPrecast(true);

for (i = 5; i < 8; i += 1) {
	if (Misc.getShrinesInArea(i, 15, false)) {
		say("");
		return;
	}
}	

}

you should add Town.doChores(); inside your function at the end, so it will look like:

function EsSearch() {
...
 Town.doChores();
}