<?xml version="1.0" encoding="utf-8"?><waypoints>
<onload>
-- approx. 634 sek
-- Version 0.2
time = os.time();		-- Startingtime of Waypoint

stoneId = 121855;
questGiverId = 121819;
questid = 425866;
questName = GetIdName(questid);
questtype = "daily" -- "public" or "daily";
	
	__WPL:setForcedWaypointType("TRAVEL")
	direction = WPT_FORWARD;
	
	function questsDone()
		local dailyQuestCount, dailyQuestsPerDay= RoMScript("Daily_count()");
		if (dailyQuestCount==dailyQuestsPerDay) then
			return true;
		else 
			return false;
		end
	end	

	__WPL:setDirection(direction)
	changeProfileOption("WAYPOINT_DEVIATION",5);

function _sturoport (zones)
	if type(zones) ~= "table" then
		error ("Argument needs to be a table!",0);
	end
	table.print (zones);
	for __,v in pairs(zones) do
			player:target_NPC(getTEXT("Sys111256_name"));
			yrest(50);
			ChoiceOptionByName(getTEXT(v));
			yrest(50);
			RoMScript("StaticPopup_OnClick(StaticPopup1, 1);");
			waitForLoadingScreen(7);
	end
end	
	

</onload>
	<!-- #  1 --><waypoint x="2297" z="1153" y="-1" tag="obsi">	
	if not questsDone() then
		zones = {"ZONE_Z22_OLD_ROJAN_KINGDOM","Syrbalpass"}
		_sturoport(zonenames);
	else
		error("finished",0);
	end
	</waypoint>
	<!-- #  2 --><waypoint x="-6582" z="-7707" y="1453" tag="syrbalpass_sturobold">

	if not questsDone() then
		if (not player.Mounted) then
					 useGoodie(207204);
					 player:mount()
					 yrest(1000)
					 player:update();
		end;
	else
		zonenames = {"QUEST_DIR_241","QUEST_DIR_236","ZONE_Z22_OLD_ROJAN_KINGDOM","VARANAS"}
		_sturoport(zonenames);
		direction = WPT_BACKWARD;
		__WPL:setDirection(direction);
	end
	</waypoint>
	<!-- #  3 --><waypoint x="-6698" z="-7744" y="1449" type="travel">	</waypoint>
	<!-- #  4 --><waypoint x="-6703" z="-8016" y="1450" type="travel">	</waypoint>
	<!-- #  5 --><waypoint x="-6694" z="-8270" y="1450" type="travel">	</waypoint>
	<!-- #  6 --><waypoint x="-6674" z="-8462" y="1453" type="travel">	</waypoint>
	<!-- #  7 --><waypoint x="-6810" z="-8714" y="1528" type="travel">	</waypoint>
	<!-- #  8 --><waypoint x="-6862" z="-9025" y="1525" type="travel">	</waypoint>
	<!-- #  9 --><waypoint x="-6753" z="-9015" y="1525" type="travel" tag="back">	</waypoint>
	<!-- # 10 --><waypoint x="-6731" z="-8954" y="1525"  tag="losak">
		if (not player.Mounted) then
				 useGoodie(207204);
				 player:mount()
				 yrest(250)
				 player:update();
		end;

		direction = WPT_FORWARD;
		__WPL:setDirection(direction);   
		npc=player:findNearestNameOrId(questGiverId);
		player:target(npc);
		local queststate = getQuestStatus(questName)
		if queststate == "complete" then
			Attack();
			CompleteQuestByName(questName);
		end
		repeat
			Attack();
			yrest(50);
			AcceptQuestByName(questName,"daily");
		until getQuestStatus(questName) ~= "not accepted"	or questsDone()	;
		
		if questsDone() then
			direction = WPT_BACKWARD;
			__WPL:setDirection(direction);  
			if getQuestStatus(questName) ~= "not accepted" then
				CancelQuest(questName);
			end
			print ("Finished in "..(os.time()-time).." Sekunden",0);
			
		end
	</waypoint>
	
	
	<!-- # 11 --><waypoint x="-6728" z="-8977" y="1525" tag="way_to_stones">	</waypoint>
	<!-- # 12 --><waypoint x="-6727" z="-9013" y="1525">	</waypoint>
	<!-- # 13 --><waypoint x="-6808" z="-9026" y="1525">	</waypoint>
	<!-- # 14 --><waypoint x="-6896" z="-9053" y="1525" tag="BackfromStoneToTent">	</waypoint>
	<!-- # 15 --><waypoint x="-6972" z="-9274" y="1531">	</waypoint>
	<!-- # 16 --><waypoint x="-7006" z="-9408" y="1560">	</waypoint>
	<!-- # 17 --><waypoint x="-6924" z="-9476" y="1574">	</waypoint>
	<!-- # 18 --><waypoint x="-6826" z="-9449" y="1599">	</waypoint>
	<!-- # 19 --><waypoint x="-6839" z="-9432" y="1617">
	player:dismount();
	stone=player:findNearestNameOrId(stoneId);
	repeat
		player:target_Object(stone.Name);
		yrest(100);
	until getQuestStatus(questName) == "complete"
	direction =  WPT_BACKWARD;
	__WPL:setDirection(direction);  
	player:update();
	if (not player.Mounted) then
		if not player:hasBuff(506688) then
			useGoodie(207204);
		end
		player:mount()
		yrest(1000)
		player:update();
	end;	
	
	__WPL:setWaypointIndex(__WPL:findWaypointTag("BackfromStoneToTent"));
	</waypoint>
	
</waypoints>