<?xml version="1.0" encoding="utf-8"?><waypoints>
<onload>
	-- the following function would update the player log for where the bot is at.
	function CoO_updatelog()
		wptag = __WPL:getNextWaypoint(-1).Tag <!-- or whatever name of tag is -->
		local file, err = io.open(filename, "w+");
		if( not file ) then
		   error(err, 0);
		end
		file:write(wpname..";"..wptag..";"..traveltype)
		file:close()
	end
	
	-- I also saved the method of travel in the log using this function:
	function CoO_settravel(method)
		__WPL:setForcedWaypointType(method);
		traveltype = method;
	end
	
	-this is where code first runs in onload section:
	charname = player.Name
	traveltype = "TRAVEL"
	filename = getExecutionPath() .. "/logs/questing_"..charname..".log"
	settings.profile.options.AUTO_ELITE_FACTOR=5;
	startGMDetect()
	settings.COMBAT_DISTANCE = 150;
	wpname="30"
	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);
	printf("next waypoint should be: %s.\n", wptag);
	if wptag == nil then
		wptag = "start"; -- if no waypoint pulled from a logfile, then start at the beginning
	end
	printf("next waypoint will be: %s.\n", wptag);
	__WPL:setWaypointIndex(__WPL:findWaypointTag(wptag))
	
</onload>

	<!-- #  1 --><waypoint x="-119" z="-1243" y="167" tag="start">	
		-- when changing my travel type, I use this function to assign the travel method to my variable used in the updatelog function.
		CoO_settravel("RUN"); -- "NORMAL", "RUN", or "TRAVEL"
		
		-- I simply run CoO_updatelog() at any waypoint I want to save my location at (usually after turning in a quest or before accepting a quest)
		CoO_updatelog();
		
		-- Starting requirements for my waypoint was be at Lvl 30 with 90,000 XP.
		-- If didn't have 90,000 XP this would send bot to kill mobs until he has 90,000 XP.
		if 90000 > player.Xp then
			__WPL:setWaypointIndex(__WPL:findWaypointTag("killmobs"))
		end
	</waypoint>
	<!-- #  100 --><waypoint x="55" z="-1115" y="152" tag="30_done">
		-- after running through the waypoints I had in this file, if bot started with 90,000 XP at lvl 30, he should be leveled up to 31 by now.
		CoO_settravel("TRAVEL");
		CoO_updatelog();
		if player.Level == 31 then
			wpname = "31";
			wptag = "start"; -- or whatever name of tag is
			local filename = getExecutionPath() .. "/logs/questing_"..charname..".log"
			local file, err = io.open(filename, "w+");
			if( not file ) then
			   error(err, 0);
			end
			file:write(wpname..";"..wptag..";"..traveltype)
			file:close()
			loadPaths("30-50CoO/31.xml");
			-- 31.xml was the WP file to run from lvl 31 to reach lvl 32.
			-- worked the same way as 30.xml except in the onload, it set wpname="31" instead of 30.
			-- and at end it checked for lvl 32 and then loaded 32.xml, so on, and so forth.
		else
			error("need to finish leveling up"); --or direct bot to a mob killing section until level attained
		end
	</waypoint>
	<!-- # 19 --><waypoint x="36" z="-1119" y="153" tag="killmobs">
		CoO_settravel("NORMAL");
		settings.COMBAT_DISTANCE = 100;
		CoO_updatelog();
	</waypoint>
	<!-- #161 --><waypoint x="43" z="-1116" y="137">	</waypoint>
	<!-- #  1 --><waypoint x="3" z="-1083" y="153">	</waypoint>
	<!-- #  2 --><waypoint x="-101" z="-947" y="157">	</waypoint>
	<!-- #  3 --><waypoint x="-178" z="-849" y="148">	</waypoint>
	<!-- #  4 --><waypoint x="-315" z="-845" y="134">	</waypoint>
	<!-- #100 --><waypoint x="-12" z="-37" y="117">	</waypoint>
	<!-- #101 --><waypoint x="95" z="-94" y="118">	</waypoint>
	<!-- #102 --><waypoint x="212" z="-143" y="118">	</waypoint>
	<!-- #103 --><waypoint x="272" z="-84" y="118">	</waypoint>
	<!-- #104 --><waypoint x="381" z="-20" y="118">	</waypoint>
	<!-- #105 --><waypoint x="475" z="97" y="118">	</waypoint>
	<!-- #106 --><waypoint x="569" z="66" y="118">	</waypoint>
	<!-- #107 --><waypoint x="815" z="-9" y="124">	</waypoint>
	<!-- #108 --><waypoint x="886" z="-2" y="119">	</waypoint>
	<!-- #109 --><waypoint x="946" z="89" y="118">	</waypoint>
	<!-- #110 --><waypoint x="1087" z="245" y="118">	</waypoint>
	<!-- #111 --><waypoint x="1145" z="408" y="118">	</waypoint>
	<!-- #112 --><waypoint x="1326" z="527" y="118">	</waypoint>
	<!-- #113 --><waypoint x="1355" z="606" y="118">	</waypoint>
	<!-- #114 --><waypoint x="1382" z="668" y="118">	</waypoint>
	<!-- #115 --><waypoint x="1403" z="606" y="118">	</waypoint>
	<!-- #116 --><waypoint x="1468" z="495" y="122">	</waypoint>
	<!-- #117 --><waypoint x="1575" z="393" y="118">	</waypoint>
	<!-- #118 --><waypoint x="1646" z="392" y="118">	</waypoint>
	<!-- #119 --><waypoint x="1780" z="447" y="125">	</waypoint>
	<!-- #120 --><waypoint x="1881" z="386" y="118">	</waypoint>
	<!-- #121 --><waypoint x="1835" z="240" y="118">	</waypoint>
	<!-- #122 --><waypoint x="1691" z="62" y="118">	</waypoint>
	<!-- #123 --><waypoint x="1602" z="-40" y="138">	</waypoint>
	<!-- #124 --><waypoint x="1233" z="-30" y="145">	</waypoint>
	<!-- #125 --><waypoint x="646" z="-297" y="128">	</waypoint>
	<!-- #126 --><waypoint x="575" z="-586" y="125">	</waypoint>
	<!-- #127 --><waypoint x="390" z="-657" y="129">	</waypoint>
	<!-- #128 --><waypoint x="98" z="-743" y="117">	</waypoint>
	<!-- #129 --><waypoint x="-111" z="-802" y="120">	</waypoint>
	<!-- #130 --><waypoint x="-164" z="-737" y="122">	</waypoint>
	<!-- #131 --><waypoint x="-143" z="-872" y="131">	</waypoint>
	<!-- #132 --><waypoint x="-6" z="-1096" y="137">	</waypoint>
	<!-- #133 --><waypoint x="-93" z="-1233" y="165">	
		if 90000 > player.Xp then
			__WPL:setWaypointIndex(__WPL:findWaypointTag("killmobs"))
		end
	</waypoint>
	<!-- #134 --><waypoint x="-185" z="-655" y="120">	
		CoO_settravel("TRAVEL");
		settings.COMBAT_DISTANCE = 150;
		CoO_getmounted();
	</waypoint>
	<!-- #135 --><waypoint x="-302" z="-721" y="131">	</waypoint>
	<!-- #136 --><waypoint x="-192" z="-821" y="131">
		__WPL:setWaypointIndex(__WPL:findWaypointTag("start"));
	</waypoint>
	
	
	
				
	
</waypoints>
