<?xml version="1.0" encoding="utf-8"?><waypoints>
<onLoad>

	questtype 		= "daily" -- "public" or "daily";
	--swapClass 		= false;				-- Do ClassSwapping for levelling Second Class?  does not work.
	minPlayerLevel	= 96;				-- minimum PlayerLevel to accept the Quest.
	questGiverId 	= (123954) -- Nedhon Goodgold
	questNameId 	= (427327) -- A Masterpiece
	questName 		= GetIdName(questNameId);
	time = os.time();		-- Startingtime of Waypoint

sendMacro('SetFindPartyState(false)') 
sendMacro('SetLootMethod("freeforall","")');
sendMacro('SetInstanceLevel("hard")');
changeProfileOption("MAX_TARGET_DIST", 100)
changeProfileOption("LOOT_DISTANCE" ,130)  
changeProfileOption("WAYPOINT_DEVIATION", 20)
changeProfileOption("COMBAT_DISTANCE", 150)
 		changeOptionFriendMob("friend", "Rabbit", "Add"); 
		changeOptionFriendMob("friend", "Hare", "Add");
		changeOptionFriendMob("friend", "Scarlet Wing", "Add");
		changeOptionFriendMob("friend", "Cavy", "Add");	
		changeOptionFriendMob("friend", "Snake", "Add");
		changeOptionFriendMob("friend", "Ferdhoof Rat", "Add");
		changeOptionFriendMob("friend", "Cockroach", "Add");	
		changeOptionFriendMob("friend", "Beetle", "Add");
 		changeOptionFriendMob("friend", "Starving Wolf", "Add");
	 		changeOptionFriendMob("friend", 105347, "Add"); --squirl
	 		changeOptionFriendMob("friend",109035, "Add");  --rhino
	
	
print ( "starting quest =", questName, "questtype =", questtype)


function questsDone()
	local dailyQuestCount, dailyQuestsPerDay= RoMScript("Daily_count()");
	print( dailyQuestCount, dailyQuestsPerDay)
	if (dailyQuestCount==dailyQuestsPerDay) then
		return true;
	else 
		return false;
	end
end	
function checkfelspar()
	if inventory:itemTotalCount(243089) >= 8 then   -- 243089 white felspar essence
			__WPL:setForcedWaypointType("TRAVEL")
			mountUp()
	end		
end
function mountUp()
	if not player:hasBuff(506688) and inventory:itemTotalCount(207204) > 0 then
		inventory:useItem(207204)
		yrest(500);
	end
	player:mount()	
end
if not player:hasBuff(506684) then -- Unbridled Enthusiasm
inventory:useItem(207200)
end

</onLoad>
	<!-- #  1 --><waypoint x="-6516" z="97" y="496">
		local dqCount, dqPerDay = RoMScript("Daily_count()");
		if 	questsDone() == true then 
				error("dailys are done and no resets are left")
		end
			player:target_NPC(questGiverId) 
			AcceptQuestByName(questNameId,questtype) 
			__WPL:setForcedWaypointType("NORMAL")	
	</waypoint>
	<!-- #  2 --><waypoint x="-6679" z="1" y="506">	</waypoint>
	<!-- #  3 --><waypoint x="-6797" z="-49" y="523">	</waypoint>
	<!-- #  4 --><waypoint x="-6877" z="-92" y="510">	</waypoint>
	<!-- #  5 --><waypoint x="-6877" z="-92" y="510">	</waypoint>
	<!-- #  6 --><waypoint x="-7179" z="-87" y="494">	</waypoint>
	<!-- #  7 --><waypoint x="-7098" z="-285" y="495">	checkfelspar()</waypoint>
	<!-- #  8 --><waypoint x="-7163" z="-474" y="519">	checkfelspar()</waypoint>
	<!-- #  9 --><waypoint x="-7469" z="-592" y="518">	checkfelspar()</waypoint>
	<!-- # 10 --><waypoint x="-7713" z="-613" y="500">	checkfelspar()</waypoint>
	<!-- # 11 --><waypoint x="-7798" z="-443" y="520">	checkfelspar()</waypoint>
	<!-- # 12 --><waypoint x="-7878" z="-392" y="522">	checkfelspar()</waypoint>
	<!-- # 13 --><waypoint x="-7903" z="-488" y="512">	checkfelspar()</waypoint>
	<!-- # 14 --><waypoint x="-7418" z="-679" y="555">	checkfelspar()</waypoint>
	<!-- # 15 --><waypoint x="-7214" z="-741" y="571">	checkfelspar()</waypoint>
	<!-- # 16 --><waypoint x="-7094" z="-752" y="572">	checkfelspar()</waypoint>
	<!-- # 17 --><waypoint x="-6921" z="-745" y="556">	checkfelspar()</waypoint>
	<!-- # 18 --><waypoint x="-6958" z="-588" y="529">	checkfelspar()</waypoint>
	<!-- # 19 --><waypoint x="-7031" z="-322" y="500">	</waypoint>
	<!-- # 20 --><waypoint x="-6958" z="-235" y="495">	</waypoint>
	<!-- # 21 --><waypoint x="-6900" z="-182" y="492">	</waypoint>
	<!-- # 22 --><waypoint x="-6788" z="-140" y="491">	</waypoint>
	<!-- # 23 --><waypoint x="-6681" z="-89" y="491">	</waypoint>
	<!-- # 24 --><waypoint x="-6596" z="-37" y="497">	</waypoint>
	<!-- # 25 --><waypoint x="-6557" z="60" y="496">	</waypoint>
	<!-- # 26 --><waypoint x="-6522" z="98" y="496">
			player:target_NPC(questGiverId)
			CompleteQuestByName(questName) -- A Masterpiece
	</waypoint>
</waypoints>