src/priestSkills.js
// This function contains our logic during resupply runs

This function contains our logic during resupply runs
This function contains our logic during resupply runs
function resupply_potions() {
	var map = parent.character.map
	if (map == "winterland" || map == "winter_inn") {
		var potion_merchant = get_npc("Warlin");
	}
	else {
		var potion_merchant = get_npc("fancypots");
	}
	var distance_to_merchant = null;
	if (potion_merchant != null) {
		distance_to_merchant = distance_to_point(potion_merchant.position[0], potion_merchant.position[1]);
	}
	if (!smart.moving && (distance_to_merchant == null || distance_to_merchant > 250)) {
		smart_move({ to: "potions" });
	}
	if (distance_to_merchant != null && distance_to_merchant < 250) {
		buy_potions();
	}
}
function resupply_potions ( ) { var map = parent . character . map if ( map == "winterland" || map == "winter_inn" ) { var potion_merchant = get_npc ( "Warlin" ) ; } else { var potion_merchant = get_npc ( "fancypots" ) ; } var distance_to_merchant = null ; if ( potion_merchant != null ) { distance_to_merchant = distance_to_point ( potion_merchant . position [ 0 ] , potion_merchant . position [ 1 ] ) ; } if ( ! smart . moving && ( distance_to_merchant == null || distance_to_merchant > 250 ) ) { smart_move ( { to : "potions" } ) ; } if ( distance_to_merchant != null && distance_to_merchant < 250 ) { buy_potions ( ) ; } }
This function contains our logic during resupply runs
This function contains our logic during resupply runs