<?xml version="1.0" encoding="utf-8"?><waypoints>
<onload>
--==========================================--
-- start at Portal to Logar in Varanas      --
-- reward is 1 Frog Celebration Certificate --
-- Version 1.0                              --
-- last update: 23.03.2013	Rintintin		--
--==========================================--


magicFrogId = 105583;
frogLegsId = 208975;
table.insert(settings.profile.mobs, GetIdName(magicFrogId));
changeProfileOption("TARGET_LEVELDIF_BELOW",player.Level-1);
changeProfileOption("MAX_TARGET_DIST", 110);

function isQuestComplete() 
	local status = getQuestStatus(getTEXT("Sys424206_name"));
	if status == "complete" then 
		return true;
	else
		return false;
	end
end


function enoughItems() 
	if inventory:getItemCount(GetIdName(frogLegsId)) == 10 then
		__WPL:setForcedWaypointType("TRAVEL");
	end
end

enoughItems();
</onload>
	<!-- #  1 --><waypoint x="2432" z="1135" y="18">
		__WPL:setForcedWaypointType("TRAVEL");	
		NPCTeleport (111256,getTEXT("Sys491891_name")); --  sturo nach logar
	</waypoint>
	<!-- #  2 --><waypoint x="-1153" z="-5546" y="35">	</waypoint>
	<!-- #  3 --><waypoint x="-1183" z="-5644" y="45">	</waypoint>
	<!-- #  4 --><waypoint x="-1180" z="-5752" y="44">	</waypoint>
	<!-- #  5 --><waypoint x="-1197" z="-5836" y="42">	</waypoint>
	<!-- #  6 --><waypoint x="-1269" z="-6108" y="42">	</waypoint>
	<!-- #  7 --><waypoint x="-1308" z="-6126" y="36">	
	__WPL:setForcedWaypointType("NORMAL");		
		player:target_NPC(116862);
		yrest(150);
		AcceptQuestByName(424206);
	</waypoint>
	<!-- #  8 --><waypoint x="-1524" z="-6281" y="27" tag="startFarming">	</waypoint>
	<!-- #  9 --><waypoint x="-1644" z="-6401" y="26">enoughItems()	</waypoint>
	<!-- # 10 --><waypoint x="-1740" z="-6444" y="35">enoughItems()	</waypoint>
	<!-- # 11 --><waypoint x="-2082" z="-6452" y="37">enoughItems()	</waypoint>
	<!-- # 12 --><waypoint x="-2237" z="-6602" y="22">enoughItems()	</waypoint>
	<!-- # 13 --><waypoint x="-2383" z="-6416" y="79">enoughItems() </waypoint>
	<!-- # 14 --><waypoint x="-2317" z="-6269" y="54">enoughItems()	</waypoint>
	<!-- # 15 --><waypoint x="-2313" z="-5877" y="68">enoughItems()	</waypoint>
	<!-- # 16 --><waypoint x="-2135" z="-5794" y="75">enoughItems()	</waypoint>
	<!-- # 17 --><waypoint x="-1989" z="-6052" y="72">enoughItems()	</waypoint>
	<!-- # 18 --><waypoint x="-1702" z="-6099" y="63">enoughItems()	</waypoint>
	<!-- # 19 --><waypoint x="-1589" z="-6200" y="31">
		if  isQuestComplete() then 
		__WPL:setWaypointIndex(__WPL:findWaypointTag("deliver"));
	else
		__WPL:setWaypointIndex(__WPL:findWaypointTag("startFarming"));
	end
	</waypoint>	
	<!-- #  20 --><waypoint x="-1482" z="-6218" y="27" tag="deliver">	
		player:target_NPC(116862);
		yrest(150);
		CompleteQuestByName(424206)
	</waypoint>
	<!-- #000 --><waypoint x="-1304" z="-6035" y="30"></waypoint>
	<!-- #000 --><waypoint x="-1110" z="-5973" y="36"></waypoint>
	<!-- #000 --><waypoint x="-1171" z="-5723" y="44"></waypoint>
	<!-- #000 --><waypoint x="-1183" z="-5589" y="47">
		player:target_NPC("111256")
		yrest(250);
		RoMScript ("ChoiceOption(3)");
		waitForLoadingScreen(); 
		error("finished",0);
	</waypoint>
</waypoints>