<?xml version="1.0" encoding="utf-8"?><waypoints>
<onload>
	-- I was making a series of waypoint files for leveling up through Coast of Opportunity.
	-- Each wayppoint file was contained inside the Waypoints/30-50CoO folder.
	-- This 30-50.xml file was the file I would run for any bot I'm leveling in this area.
	-- This file would check to see if a logfile exists for that bot and if it does, 
	-- it reads the file which will tell it what waypoint file it left off on, and what waypoint tag it left off at.
	-- If this is the first time a bot is run in this area, it would see there is no logfile for that bot and create one, 
	-- and start the bot off on the first waypoint in the series.
	--
	-- I was making each waypoint file for each level of the bot. I made it up to level 33 before getting sidetracked.
	-- I will include another file which showed how this  information was passed to the waypoint file and how the waypoints kept track of the bot.
	
	if 30 > player.Level then
		error("not high enough level")
	else
		local filename = getExecutionPath() .. "/logs/questing_"..player.Name..".log"
		local file, err = io.open(filename, "r");
		if( not file ) then
			error(err, 0);
		end
		local raw=file:read()
		file:close()
		local wpfile,wptag,traveltype = string.match(raw,"(.*);(.*);(.*)")
		__WPL:setForcedWaypointType(traveltype);
		if wpfile == nil then
			wpfile = "30" -- insert first waypoint file to run new character on such as "EI_01_InTheValley".
		end
		
		-- the 30-50CoO below was the directory I had my waypoint files in for the Coast of Opportunity waypoints I was making.
		-- if your waypoints to use are in the main Waypoints folder instead of subfolders, then the following line should be removed.
		filepath = "30-50CoO/"..wpfile..".xml" 
		printf("path is %s\n", filepath); -- this line can be commented. was using for troubleshooting.
		loadPaths(filepath); -- if not using subfolders, change this line to: loadPaths(wpfile)
	end
</onload>

</waypoints>