<?xml version="1.0" encoding="utf-8"?>
<waypoints>
	<!-- Updated>15/12/2013 9:00 AM PST<-->
	<onLoad>
		DQ1 = (422340);
		DQNPC1 = (112794);
		function tgtInRange(_target, _range)
			if not _range then
				_range = 300;
			end
			local objectList = CObjectList();
			objectList:update();
			player:update();
			local objSize = objectList:size();
			cprintf(cli.lightgreen,"Checking if any %s are in range.\n",_target)
			local _closest = 1000;
			for i = 0,objSize do 
				obj = objectList:getObject(i);
				if obj.Name == _target then
					local _tmpDist = distance(obj.X,obj.Z,player.X,player.Z);
					if _closest > _tmpDist then
						_closest = _tmpDist
					end
				end
			end
			if _range >= _closest then
				cprintf(cli.lightgreen,"%s in range.\n",_target)
				return true;
			else
				cprintf(cli.lightgreen,"%s NOT in range.\n",_target)
				return false;
			end
		end
		function getDailyComplete()
			return RoMScript("Daily_count();");
		end
		function checkDQCount()
			local _tmpQC = getDailyComplete();
			cprintf(cli.lightblue,"%s quests completed.\n",tostring(_tmpQC));
			if (_tmpQC == 10) then
				cprintf(cli.lightblue,"Completed max number of daily quests, logging out.\n");
ChangeChar(2,2) -- changes to character 1 on account 3
loadProfile() -- if needed
loadPaths("X")
			end
		end
	        settings.profile.options.WAYPOINT_DEVIATION = 5
	        settings.profile.options.MAX_TARGET_DIST = 5
__WPL:setForcedWaypointType("TRAVEL")
</onLoad>
	<!-- #  1 --><waypoint x="31857" z="4586" tag ='Main'>
		dailyQuest1 = getQuestStatus(DQ1);
		if (dailyQuest1 == "complete") then
			checkDQCount();
			player:target_NPC(DQNPC1);
			CompleteQuestByName(DQ1);
		end
		checkDQCount();
		player:target_NPC(DQNPC1);
		AcceptQuestByName(DQ1);
		cprintf(cli.lightblue,"Diaria Aceptada, Moviendo asta el objectivo.\n");
        	</waypoint>
	<!-- #  2 --><waypoint x="31862" z="4635" y="9">	</waypoint>
	<!-- #  3 --><waypoint x="31804" z="4887" y="1">	</waypoint>
	<!-- #  4 --><waypoint x="31656" z="5154" y="-16">	</waypoint>
	<!-- #  5 --><waypoint x="31417" z="5712" tag = "Item">
         		
			
			if getQuestStatus(422340) == "incomplete" then
			        player:target_Object(112976,500);
	         		yrest(3000);           
         		end   
			if getQuestStatus(422340) == "incomplete" then
			        player:target_Object(112976,500);
	         		yrest(3000);           
         		end  
			if getQuestStatus(422340) == "incomplete" then
			        player:target_Object(112976,500);
	         		yrest(3000);           
         		end  
			if getQuestStatus(422340) == "incomplete" then
			        player:target_Object(112976,500);
	         		yrest(3000);           
         		end  
			if getQuestStatus(422340) == "incomplete" then
			        player:target_Object(112976,500);
	         		yrest(3000);           
         		end  
         
		</waypoint>
	<!-- #  6 --><waypoint x="31711" z="5062" y="-10">	</waypoint>
	<!-- #  7 --><waypoint x="31796" z="4883" y="4">	</waypoint>
	<!-- #  8 --><waypoint x="31826" z="4793" y="0">
cprintf(cli.lightblue,"Mision completada %s Minutos.\n", math.floor (os.difftime(os.time(),player.BotStartTime_nr) - player.Sleeping_time)/60 );	</waypoint>
	<!-- #  9 --><waypoint x="31849" z="4686" __WPL:setWaypointIndex(__WPL:findWaypointTag("Main"));	</waypoint>
</waypoints>