<?xml version="1.0" encoding="utf-8"?>
<waypoints>
<onLoad>
  	questtype 		= "daily" -- "public" or "daily";
	swapClass 		= false;				-- Do ClassSwapping for levelling Second Class?
	minPlayerLevel	= 96;				-- minimum PlayerLevel to accept the Quest.
	questGiverId 	= (123953) -- Marleta Bedkon
	questNameId 	= (427300) -- Hunting Season
	questName 		= GetIdName(questNameId);
	houseMaidId     = 110758 -- Housekeeper
	UseDailyTickets = false;              -- this needs home sweet home 7day or regular
	
	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", 109186, "Add");   --snake
		--- zone mobs to ignore
		changeOptionFriendMob("friend", 106468, "Add");   --omn fanged fish
		changeOptionFriendMob("friend", 109160, "Add");   --blood sucking swamp bat
		changeOptionFriendMob("friend", 105374, "Add");   --skeltion general
			
print ( "starting quest =", questName, "questtype =", questtype)
function questtohouse()
	yrest(500)
	--inventory:useItem(202435) -- home sweet home standard    -- comment out one you are not using.
   inventory:useItem(208785) -- home sweet home 7 days         -- comment out one you are not using.
	yrest(5000)
	waitForLoadingScreen(40);
end
function questsDone()
	local dailyQuestCount, dailyQuestsPerDay= RoMScript("Daily_count()");
	print( dailyQuestCount, dailyQuestsPerDay)
	if (dailyQuestCount==dailyQuestsPerDay) then
		return true;
	else 
		return false;
	end
end	
function housetoquest()
	repeat
		yrest(500)
    until player:target_NPC(houseMaidId) -- Housekeeper
	ChoiceOptionByName(getTEXT("HOUSE_MAID_LEAVE_HOUSE")) -- 'Leave the house'
	waitForLoadingScreen(40);
end
function swClass()
	player:update();
	RoMScript("ExchangeClass("..(player.Class2+1)..","..(player.Class1+1)..")");
	yrest(1000);
	
end
function mountUp()
	if not player:hasBuff(506688) and inventory:itemTotalCount(207204) > 0 then
		inventory:useItem(207204)
		yrest(500);
	end
	player:mount()	
end
function quest()
	queststate = getQuestStatus(questNameId)
	if queststate == "complete" then
		mountUp()
		__WPL:setForcedWaypointType("TRAVEL")
	end
end

if not player:hasBuff(506684) then -- Unbridled Enthusiasm
inventory:useItem(207200)
end	
		
</onLoad>
	<!-- #  1 --><waypoint x="-8094" z="-3206" y="827"> 
		local empties = inventory:itemTotalCount(0);
		if 1 &gt; empties then
			-- Wait for user to make some space in inventory.
			cprintf(cli.yellow,"Not much space left in inventory. Are you sure you want to continue with only %d spaces left?\n",empties)
			player:sleep();
		end;

		local dqCount, dqPerDay = RoMScript("Daily_count()");
		if 	questsDone()== true then 
			inventory:update();
			player:update();
			if inventory:itemTotalCount(202434) > 0 and UseDailyTickets == true then
				inventory:useItem(202434);
				yrest(2000)
			else
				error("dailys are done and no resets are left")
			end		
		end
		repeat
			yrest(500)
        until player:target_NPC(questGiverId) 
		AcceptQuestByName(questNameId,questtype) 
		if not player:hasBuff(506684) then -- Unbridled Enthusiasm
			inventory:useItem(207200)
		end
		__WPL:setForcedWaypointType("NORMAL")
	</waypoint>
	<!-- #  2 --><waypoint x="-8094" z="-3206" y="828">	</waypoint>
	<!-- #  3 --><waypoint x="-8318" z="-3282" y="817">	</waypoint>
	<!-- #  4 --><waypoint x="-8392" z="-3286" y="805">	</waypoint>
	<!-- #  5 --><waypoint x="-8441" z="-3229" y="798">	</waypoint>
	<!-- #  6 --><waypoint x="-8538" z="-2908" y="795">	</waypoint>
	<!-- #  7 --><waypoint x="-8558" z="-2845" y="790">	</waypoint>
	<!-- #  8 --><waypoint x="-8598" z="-2641" y="759">	</waypoint>
	<!-- #  9 --><waypoint x="-8577" z="-2367" y="663">	quest()</waypoint>
	<!-- # 10 --><waypoint x="-8392" z="-2144" y="598">	</waypoint>
	<!-- # 11 --><waypoint x="-8264" z="-1908" y="580">quest()	</waypoint>
	<!-- # 12 --><waypoint x="-8056" z="-1768" y="586">	</waypoint>
	<!-- # 13 --><waypoint x="-8075" z="-1714" y="589">quest()	</waypoint>
	<!-- # 14 --><waypoint x="-8228" z="-1520" y="582">	</waypoint>
	<!-- # 15 --><waypoint x="-8105" z="-1379" y="597">quest()	</waypoint>
	<!-- # 16 --><waypoint x="-8309" z="-1428" y="582">	</waypoint>
	<!-- # 17 --><waypoint x="-8464" z="-1410" y="558">quest()	</waypoint>
	<!-- # 18 --><waypoint x="-8611" z="-1479" y="547">	</waypoint>
	<!-- # 19 --><waypoint x="-8898" z="-1160" y="519">quest()	</waypoint>
	<!-- # 20 --><waypoint x="-8924" z="-1218" y="526">	</waypoint>
	<!-- # 21 --><waypoint x="-8874" z="-1414" y="551">quest()	</waypoint>
	<!-- # 22 --><waypoint x="-8961" z="-1512" y="561">	</waypoint>
	<!-- # 23 --><waypoint x="-9055" z="-1715" y="539">quest()	</waypoint>
	<!-- # 24 --><waypoint x="-9354" z="-1764" y="560">	</waypoint>
	<!-- # 25 --><waypoint x="-9124" z="-1706" y="548">quest()	</waypoint>
	<!-- # 26 --><waypoint x="-8964" z="-1712" y="560">	</waypoint>
	<!-- # 27 --><waypoint x="-8755" z="-1580" y="557">quest()	</waypoint>
	<!-- # 28 --><waypoint x="-8585" z="-1650" y="562">quest()	</waypoint>
	<!-- # 29 --><waypoint x="-8441" z="-1756" y="577">	</waypoint>
	<!-- # 30 --><waypoint x="-8386" z="-1809" y="577">	</waypoint>
	<!-- # 31 --><waypoint x="-8358" z="-1919" y="580">	</waypoint>
	<!-- # 32 --><waypoint x="-8383" z="-2151" y="600">	</waypoint>
	<!-- # 33 --><waypoint x="-8421" z="-2249" y="621">	</waypoint>
	<!-- # 34 --><waypoint x="-8502" z="-2327" y="645">	</waypoint>
	<!-- # 35 --><waypoint x="-8590" z="-2421" y="677">	</waypoint>
	<!-- # 36 --><waypoint x="-8618" z="-2536" y="720">	</waypoint>
	<!-- # 37 --><waypoint x="-8614" z="-2648" y="760">	</waypoint>
	<!-- # 38 --><waypoint x="-8583" z="-2770" y="767">	</waypoint>
	<!-- # 39 --><waypoint x="-8539" z="-2908" y="795">	</waypoint>
	<!-- # 40 --><waypoint x="-8415" z="-3232" y="804">	</waypoint>
	<!-- # 41 --><waypoint x="-8388" z="-3265" y="805">	</waypoint>
	<!-- # 42 --><waypoint x="-8098" z="-3205" y="828">
				if swapClass == true then	
			yrest(2500)  -- wait for agro to drop
			yrest(2500)  -- wait for agro to drop
			questtohouse()
			repeat
				yrest(500)
            until player:target_NPC(houseMaidId) -- housemaid 
			yrest(150);
			ChoiceOptionByName(getTEXT("HOUSE_MAID_HOUSE_CHANGEJOB")) -- 'Change class'
			yrest(150);
			swClass()	
			housetoquest()
		end	
		repeat
			yrest(500)
        until player:target_NPC(questGiverId)
		CompleteQuestByName(questName) 
		if swapClass == true then
			questtohouse()
			repeat
				yrest(500)
            until player:target_NPC(houseMaidId) -- housemaid 
			yrest(150);
			ChoiceOptionByName(getTEXT("HOUSE_MAID_HOUSE_CHANGEJOB")) -- 'Change class'
			yrest(150);
			swClass()	
			yrest(300);
			housetoquest()
		end
	</waypoint>

</waypoints>