<waypoints type="RUN"><!-- Xaviera_41-45 v1.5.1 by Bot_romka -->

	<onLoad>
<!-- Variables -->
		NumTwinks = 5			<!-- Number of Twinks. Set hou much farm daily items. For solo = 1. -->
		Farm = true				<!-- Set to false or true. -->

		Recipient="Prvv"		<!-- Name of MailReceiver -->
		RunesRec="Prvv"			<!-- Name of Production Runes Receiver -->

		<!-- Names of Chars on Account -->
		Chars={"Char1","Char2","Char3","Char4","Char5","Char6","Char7","Char8"};
		
		MustHP = 4500;
		local Account = RoMScript("GetAccountName();");

		<!-- Id table of equiped items --> 
		Items={210718, 210592, 220130, 220514, 220545, 220603, 220631, 
			220657, 220826, 220841, 221114, 221115, 222156, 221128, 222162}

		<!-- Id table of daily items -->
		Dailys={209432, 209436, 209439}

		<!-- Id table of ProductionRunes--> 
		Prunes={200850, 200851, 200852, 200853, 200854, 200855}

<!-- ================================================================================== -->

		-- Check Level and Zone Id
		if 41 > player.Level or getZoneId() ~= 14 then
			error("\a\a\Level or Zone Error.")
		end

		-- getDailyComplete
		function getDailyComplete()
			local dailyQuestCount, dailyQuestsPerDay;
			repeat dailyQuestCount, dailyQuestsPerDay = RoMScript("Daily_count()")	yrest(500) until dailyQuestCount
			return dailyQuestCount;
		end

		-- DailyQuest
		function DailyQuest(npcId, questId)
			inventory:update()
			player:update()
			npcname = GetIdName(npcId)
			questname = GetIdName(questId)
			player:target_NPC(npcname) yrest(500)
			AcceptQuestByName(questname)
			player:target_NPC(npcname) yrest(500)
			CompleteQuestByName(questname)
			inventory:update()
			player:update()
		end

		-- Unequips items
		function UnequipItems()
			if( inventory:itemTotalCount(0) > 17 ) then
				for i=1,17,1 do
					--cprintf(cli.yellow, "Account: "..Account.."_"..player.Name.." Unequip item "..i..".\n");
					RoMScript("EquipItem("..i..");"); yrest(500);
				end
				RoMScript("SwapEquipmentItem();"); yrest(500);
				inventory:update();
			else
				error("\a\a\Not enough BagSpase. Clean Bag and Start again.");
			end
		end
		
		-- Equip items
		function EquipItems()
			if( MustHP > player.MaxHP ) then
				RoMScript("SwapEquipmentItem();"); yrest(500);
				for __, item in pairs(inventory.BagSlot) do
					if item.Available and not item.Empty then
						for __, Id in pairs(Items) do
							if (item.Id == Id) then
								if( bot.ClientLanguage == "RU" ) then item.Name = utf82oem_russian(item.Name); end
								cprintf(cli.yellow, "Account-"..Account.."_"..player.Name.." Equip item: "..item.Name..".\n");
								item:use()			-- Equip item
							end
						end
					end
				end
			end
		end

		-- CheckDailyComplete
		function CheckDailyComplete()
			cprintf(cli.lightblue, player.Name.." %s Daily quests completed.\n", getDailyComplete())
			if( getDailyComplete() == 10 ) then
				UnequipItems()
				-- Select Char Name
				local i=1;
				while( player.Name ~= Chars[i] )do
					i= i + 1;
					if( i > #Chars )then
						-- Selecting and Send Item if last Char or Error.
						player:target_Object(117407,1500);			-- Mailbox
						RoMScript("ChoiceOption(1);"); yrest(1000);
						UMM_SendByNameOrId (Recipient, Items);yrest(500)
						UMM_SendByNameOrId (Recipient, Dailys);yrest(500)
						UMM_SendByNameOrId (RunesRec, Prunes);yrest(500)
						--cprintf(cli.yellow, "Error. Account: "..Account..", Char: "..player.Name.."\n");
						--RoMScript("QuitGame()");
					end
				end

				-- Selecting and Send Item to next twink
				i= i + 1;
				player:target_Object(117407,1500);					-- Mailbox
				RoMScript("ChoiceOption(1);"); yrest(1000);
				UMM_SendByNameOrId (Chars[i], Items);yrest(500)
				UMM_SendByNameOrId (Chars[i], Dailys);yrest(500)
				UMM_SendByNameOrId (RunesRec, Prunes);yrest(500)
				cprintf(cli.yellow, "Accaunt: "..Account..", Char: "..player.Name..", Bot sended items to "..Chars[i].."\n");
		
				-- Wait for Login next toon
				sendMacro("}LoginNextToon=true;a={")
				sendMacro("Logout();");
				waitForLoadingScreen();
				player = CPlayer.new();
				settings.load();
				settings.loadProfile("UserDefault");
				yrest(4000);
				loadPaths("Xaviera_41-45")
			end
		end
		

		-- changeProfileOption
		changeProfileOption("INV_AUTOSELL_QUALITY", "white,green")
		changeProfileOption("INV_AUTOSELL_ENABLE", true)
		changeProfileOption("INV_AUTOSELL_FROMSLOT", 13)
		changeProfileOption("INV_AUTOSELL_TOSLOT", 60)
		changeProfileOption("MAX_TARGET_DIST", 150)

		-- Set Player speed to 59.
		local playerAddress = memoryReadIntPtr(getProc(), addresses.staticbase_char, addresses.charPtr_offset);
		if playerAddress ~= 0 then
			memoryWriteFloat(getProc(), playerAddress + 0x40, 59);
			print("Set Player speed to 59.");
		end
	</onLoad>

<!-- ======================================================================== -->
<!-- ===                            Mailbox.1                             === -->
<!-- ======================================================================== -->

<!-- 1 -->
<!-- Start -->
	<waypoint x="893" z="12950" y="323" tag="Start">
		-- Open Mailbox and Take Mail
		player:target_Object(117407,1500);						-- Mailbox
		RoMScript("ChoiceOption(1);"); yrest(1500);
		RoMScript("UMMFrameTab1Tools:ButtonClick('tagempty');"); yrest(1000)
		RoMScript("UMMFrameTab1Tools:ButtonClick('delete');"); yrest(4000)
		if( inventory:itemTotalCount(0) > 17 ) then
			UMM_TakeMail (); yrest(1000);
		elseif( MustHP > player.MaxHP or 40 > inventory:getItemCount(209432) ) then
			error("\a\a\Not enough BagSpase. Clean Bag and Start again.");
		end
		RoMScript("CloseWindows()"); yrest(500); inventory:update();

		-- Check daily
		CheckDailyComplete()

		-- Equip items
		EquipItems()
	</waypoint>

<!-- 1.1 -->
<!-- Dawa Kana -->
	<waypoint x="775" z="12963" y="322">
		-- Accept daily Quest Calm the Fury
		npcname = GetIdName(118056)			-- Dawa Kana
		questname = GetIdName(424151)		-- Calm the Fury
		player:target_NPC(npcname) yrest(500)
		AcceptQuestByName(questname)
	</waypoint>
	<waypoint x="907" z="12911" y="321"></waypoint>
	<waypoint x="1031" z="12977" y="325"></waypoint>
	<waypoint x="1102" z="13074" y="324"></waypoint>
	<waypoint x="1188" z="13211" y="311" tag="RuinsExcavator">
		npcname = GetIdName(118075)			-- Ruins Excavator
		player:target_NPC(npcname)
		RoMScript("ChoiceOption(1);"); yrest(500);
		RoMScript("ChoiceOption(1);"); yrest(500);
		yrest(7500);
		player:target_NPC(npcname)
		RoMScript("ChoiceOption(1);"); yrest(500);
		RoMScript("ChoiceOption(1);"); yrest(500);
		yrest(7500);
	</waypoint>
	<waypoint x="1237" z="13223" y="310">
		player:target_NPC(npcname)
		RoMScript("ChoiceOption(1);"); yrest(500);
		RoMScript("ChoiceOption(1);"); yrest(500);
	</waypoint>
	<waypoint x="1218" z="13282" y="313">
		player:target_NPC(npcname)
		RoMScript("ChoiceOption(1);"); yrest(500);
		RoMScript("ChoiceOption(1);"); yrest(500);
		yrest(7500);
		player:target_NPC(npcname)
		RoMScript("ChoiceOption(1);"); yrest(500);
		RoMScript("ChoiceOption(1);"); yrest(500);
	</waypoint>
	<waypoint x="1222" z="13296" y="315">
		npcname = GetIdName(118104)			-- Silvershadow Adventurers' Guild Provisioner
		player:merchant(npcname)

		-- Check complete daily
		questname = GetIdName(424151)		-- Calm the Fury
		dailyQuest = getQuestStatus(questname)
		if dailyQuest == "incomplete" then
			yrest(7000);
			__WPL:setWaypointIndex(__WPL:findWaypointTag("RuinsExcavator"))
		end
	</waypoint>
	<waypoint x="1190" z="13190" y="311"></waypoint>
	<waypoint x="1108" z="13075" y="324"></waypoint>
	<waypoint x="989" z="12944" y="325"></waypoint>
	<waypoint x="923" z="12899" y="322"></waypoint>
	<waypoint x="779" z="12962" y="322">
		-- Complete daily Quest Calm the Fury
		npcname = GetIdName(118056)			-- Dawa Kana
		questname = GetIdName(424151)		-- Calm the Fury
		player:target_NPC(npcname) yrest(500)
		CompleteQuestByName(questname)
	</waypoint>

<!-- Go to Dafenger Pindun -->
	<waypoint x="964" z="12834" y="318"></waypoint>
	<waypoint x="1287" z="12588" y="312"></waypoint>
	<waypoint x="1475" z="12567" y="259"></waypoint>
	<waypoint x="1804" z="12469" y="219"></waypoint>
	<waypoint x="2042" z="12273" y="218"></waypoint>
	<waypoint x="2302" z="12041" y="176"></waypoint>
	<waypoint x="2570" z="11753" y="132"></waypoint>
	<waypoint x="2731" z="11535" y="154"></waypoint>
	<waypoint x="2872" z="11298" y="134"></waypoint>

<!-- 2 -->
<!-- Dafenger Pindun -->
	<waypoint x="2932" z="11259" y="133" tag="DafengerPindun">
		-- Moving Fragile Artifacts
		if( 10 > getDailyComplete()  and player.Level == 41 ) then
			npcname = GetIdName(118057)			-- Dafenger Pindun
			questname = GetIdName(424154)		-- Moving Fragile Artifacts
			player:target_NPC(npcname) yrest(500)
			CompleteQuestByName(questname)
			player:target_NPC(npcname) yrest(500)
			AcceptQuestByName(questname)
		end

		
		-- Artifact Restoration Materials	
		while( 10 > getDailyComplete() ) and player.Level == 42 and inventory:getItemCount(209432) > 4 do	--	Sticky Sap
			DailyQuest(118057, 424157)			-- Dafenger Pindun, Artifact Restoration Materials
		end
		

		-- Check Level and Daily
		if( getDailyComplete() == 10 and player.Level == 42 ) then
			error("\a\a\a\a\10 DailyComplete.");
			--__WPL:setWaypointIndex(__WPL:findWaypointTag("GoToStart"))
			--__WPL:setForcedWaypointType()
		elseif( 10 > getDailyComplete() and player.Level == 41 ) then
			__WPL:setWaypointIndex(__WPL:findWaypointTag("MovFragArt"))
			__WPL:setForcedWaypointType()
		elseif( 10 > getDailyComplete() and player.Level == 42 ) then
			__WPL:setWaypointIndex(__WPL:findWaypointTag("ArtRestMat"))
		elseif( player.Level > 42 ) then
			__WPL:setWaypointIndex(__WPL:findWaypointTag("GoToChefFhil"))
			__WPL:setForcedWaypointType("TRAVEL")
		end
	</waypoint>

<!-- Moving Fragile Artifacts -->
	<waypoint x="3069" z="11125" y="138" tag="MovFragArt"></waypoint>
	<waypoint x="3247" z="10950" y="136"></waypoint>
	<waypoint x="3249" z="10891" y="136">
		player:target_Object(118048);		--Box of Antiques
	</waypoint>
	<waypoint x="3296" z="10965" y="134"></waypoint>
	<waypoint x="3442" z="10965" y="186"></waypoint>
	<waypoint x="3690" z="10929" y="187" tag="FragArt"></waypoint>
	<waypoint x="3964" z="10942" y="186">
		player:target_Object(118048);		--Box of Antiques
	</waypoint>
	<waypoint x="3946" z="11214" y="190"></waypoint>
	<waypoint x="3927" z="11216" y="190">
		player:target_Object(118048);		--Box of Antiques
	</waypoint>
	<waypoint x="3752" z="11315" y="186">
		-- Check complete daily
		questname = GetIdName(424154)		-- Moving Fragile Artifacts
		dailyQuest = getQuestStatus(questname)
		if dailyQuest == "complete" then
			yrest(7000);
			__WPL:setWaypointIndex(__WPL:findWaypointTag("FragArtC"))
		end
	</waypoint>
	<waypoint x="3587" z="11419" y="187"></waypoint>
	<waypoint x="3589" z="11579" y="192"></waypoint>
	<waypoint x="3659" z="11736" y="184">
		player:target_Object(118048, 7000);	--Box of Antiques
		player:target_Object(118048);		--Box of Antiques
	</waypoint>
	<waypoint x="3669" z="11746" y="185"></waypoint>
	<waypoint x="3848" z="11713" y="186">
		-- Check complete daily
		yrest(1000);
		questname = GetIdName(424154)		-- Moving Fragile Artifacts
		dailyQuest = getQuestStatus(questname)
		if dailyQuest == "complete" then
			yrest(7000);
			__WPL:setWaypointIndex(__WPL:findWaypointTag("FragArtC"))
		end
	</waypoint>
	<waypoint x="4089" z="11691" y="188"></waypoint>
	<waypoint x="4280" z="11676" y="189">
		player:target_Object(118048);		--Box of Antiques
	</waypoint>
	<waypoint x="4008" z="11680" y="189"></waypoint>
	<waypoint x="3683" z="11671" y="189"></waypoint>
	<waypoint x="3517" z="11489" y="190" tag="FragArtC"></waypoint>
	<waypoint x="3422" z="11182" y="186">
		-- Check complete daily
		questname = GetIdName(424154)		-- Moving Fragile Artifacts
		dailyQuest = getQuestStatus(questname)
		if dailyQuest == "incomplete" then
			yrest(7000);
			__WPL:setWaypointIndex(__WPL:findWaypointTag("FragArt"))
		end
	</waypoint>
	<waypoint x="3283" z="11170" y="132"></waypoint>
	<waypoint x="3078" z="11197" y="135"></waypoint>
	<waypoint x="2971" z="11237" y="133">
		__WPL:setWaypointIndex(__WPL:findWaypointTag("DafengerPindun"))
	</waypoint>
	
<!-- Artifact Restoration Materials -->
	<waypoint x="2977" z="11123" y="133" tag="ArtRestMat"></waypoint>
	<waypoint x="3012" z="10995" y="132"></waypoint>
	<waypoint x="3053" z="10862" y="133">__WPL:setForcedWaypointType("NORMAL")</waypoint>
	<waypoint x="3133" z="10623" y="135"></waypoint>
	<waypoint x="3231" z="10383" y="132"></waypoint>
	<waypoint x="3257" z="10164" y="135" tag="MoreStickySap">
		if player.Current_waypoint_type == WPT_RUN then
			__WPL:setForcedWaypointType("NORMAL")		
		end
	</waypoint>
	<waypoint x="3349" z="9935" y="137"></waypoint>
	<waypoint x="3531" z="9768" y="130">
		changeProfileOption("MAX_TARGET_DIST", 180)
	</waypoint>
	<waypoint x="3859" z="9725" y="139"></waypoint>
	<waypoint x="3891" z="9537" y="137"></waypoint>
	<waypoint x="3695" z="9494" y="139"></waypoint>
	<waypoint x="3516" z="9561" y="137"></waypoint>
	<waypoint x="3287" z="9593" y="133"></waypoint>
	<waypoint x="3010" z="9798" y="133"></waypoint>
	<waypoint x="2898" z="9866" y="134"></waypoint>
	<waypoint x="3126" z="10075" y="133">
		if( 40*NumTwinks > inventory:getItemCount(209432) and inventory:getItemCount(0) > 2  ) then		--	Sticky Sap
			__WPL:setWaypointIndex(__WPL:findWaypointTag("MoreStickySap"))
		end
		changeProfileOption("MAX_TARGET_DIST", 130)
	</waypoint>
	<waypoint x="3226" z="10302" y="132">
		__WPL:setForcedWaypointType()
	</waypoint>
	<waypoint x="3171" z="10600" y="141"></waypoint>
	<waypoint x="3136" z="10853" y="147"></waypoint>
	<waypoint x="3066" z="11012" y="132"></waypoint>
	<waypoint x="2986" z="11176" y="134">
		__WPL:setWaypointIndex(__WPL:findWaypointTag("DafengerPindun"))
	</waypoint>

<!-- 3 -->
<!-- 42 Level Go to Mailbox -->	
	<waypoint x="2851" z="11320" y="140" tag="GoToStart">	</waypoint>
	<waypoint x="2660" z="11598" y="146"></waypoint>
	<waypoint x="2396" z="12002" y="161"></waypoint>
	<waypoint x="2136" z="12224" y="210"></waypoint>
	<waypoint x="1895" z="12373" y="223"></waypoint>
	<waypoint x="1567" z="12561" y="214"></waypoint>
	<waypoint x="1345" z="12575" y="309"></waypoint>
	<waypoint x="1124" z="12700" y="316"></waypoint>
	<waypoint x="934" z="12841" y="318"></waypoint>
	<waypoint x="875" z="12919" y="320">
		__WPL:setWaypointIndex(__WPL:findWaypointTag("Start"))
	</waypoint>
	
<!-- 4 -->
<!-- 43 Level Go to Chef Fhil -->
	<waypoint x="2936" z="11401" y="135" tag="GoToChefFhil"></waypoint>
	<waypoint x="2923" z="11634" y="137"></waypoint>
	<waypoint x="2947" z="11835" y="135"></waypoint>
	<waypoint x="2989" z="12168" y="137"></waypoint>
	<waypoint x="2969" z="12482" y="166"></waypoint>
	<waypoint x="2972" z="12729" y="222"></waypoint>
	<waypoint x="3260" z="12852" y="233"></waypoint>
	<waypoint x="3505" z="12928" y="209"></waypoint>
	<waypoint x="3758" z="12986" y="217">
		npcname = GetIdName(118187)		-- Stable Manager
		player:target_NPC(npcname)
		RoMScript("ChoiceOption(1);"); yrest(1000);
		RoMScript("StaticPopup_OnClick(StaticPopup1, 1);"); yrest(2500);
		inventory:update();
		player:mount();
	</waypoint>
	<waypoint x="3808" z="13067" y="220"></waypoint>
	<waypoint x="4081" z="13142" y="208"></waypoint>
	<waypoint x="4469" z="13092" y="206"></waypoint>
	<waypoint x="4902" z="12987" y="207"></waypoint>
	<waypoint x="5361" z="12889" y="206"></waypoint>
	<waypoint x="5692" z="12808" y="148"></waypoint>
	<waypoint x="5995" z="12669" y="124"></waypoint>
	<waypoint x="6317" z="12508" y="92"></waypoint>
	<waypoint x="6683" z="12337" y="10"></waypoint>
	<waypoint x="7001" z="12272" y="-61"></waypoint>
	<waypoint x="7243" z="12338" y="-80">
		__WPL:setWaypointIndex(__WPL:findWaypointTag("ChefFhil"))
	</waypoint>	
	
<!-- 5 -->
<!-- Issac Camp merchant -->	
	<waypoint x="7244" z="12435" y="-78" tag="IssacCampmerchant">
		npcname = GetIdName(118102)				-- Silvershadow Adventurers' Guild Provisioner
		player:merchant(npcname)

		-- Check Daily
		if( getDailyComplete() == 10 ) then
			__WPL:setWaypointIndex(__WPL:findWaypointTag("IssacCampMailbox"))
		end
	</waypoint>
	<waypoint x="7322" z="12288" y="-81"></waypoint>
	<waypoint x="7399" z="12261" y="-78"></waypoint>
	
<!-- 6 -->
<!-- Chef Fhil -->
	<waypoint x="7424" z="12294" y="-77" tag="ChefFhil">
		-- Crucial Ingredient for a Legendary Recipe
		while( 10 > getDailyComplete() ) and player.Level == 43 and inventory:getItemCount(209436) >= 5 do	-- Sweet Demon Bloom Honey
			DailyQuest(117776, 424161)			-- Chef Fhil, Crucial Ingredient for a Legendary Recipe
		end
	</waypoint>
	<waypoint x="7361" z="12266" y="-79">
		-- Check Level and Daily
		if( getDailyComplete() == 10 and player.Level == 43 or 2 > inventory:getItemCount(0) ) then
			__WPL:setWaypointIndex(__WPL:findWaypointTag("IssacCampMailbox"))
		elseif( player.Level > 43 ) then
			__WPL:setWaypointIndex(__WPL:findWaypointTag("GoToStaticLathrofea"))
			__WPL:setForcedWaypointType("TRAVEL")
		end
	</waypoint>
	<waypoint x="7153" z="12250" y="-76"></waypoint>
	<waypoint x="7092" z="12158" y="-76"></waypoint>
	<waypoint x="7118" z="11893" y="-95">
		__WPL:setForcedWaypointType("NORMAL")
	</waypoint>
	<waypoint x="7142" z="11583" y="-110"></waypoint>
	<waypoint x="7188" z="11343" y="-178" tag="MoreBloomHoney">
		if not player.Current_waypoint_type == WPT_NORMAL then
			__WPL:setForcedWaypointType("NORMAL")
		end
	</waypoint>
	<waypoint x="7335" z="11189" y="-251"></waypoint>
	<waypoint x="7453" z="11012" y="-225"></waypoint>
	<waypoint x="7466" z="10801" y="-226"></waypoint>
	<waypoint x="7585" z="10636" y="-238"></waypoint>
	<waypoint x="7836" z="10414" y="-230"></waypoint>
	<waypoint x="8084" z="10384" y="-153"></waypoint>
	<waypoint x="8050" z="10646" y="-138"></waypoint>
	<waypoint x="7988" z="10784" y="-121"></waypoint>
	<waypoint x="7941" z="10967" y="-105"></waypoint>
	<waypoint x="7883" z="11163" y="-90"></waypoint>
	<waypoint x="7834" z="11345" y="-75"></waypoint>
	<waypoint x="7690" z="11570" y="-74"></waypoint>
	<waypoint x="7552" z="11628" y="-73"></waypoint>
	<waypoint x="7437" z="11621" y="-75"></waypoint>
	<waypoint x="7286" z="11547" y="-104">
		if( 40*NumTwinks > inventory:getItemCount(209436) and inventory:getItemCount(0) > 2 ) then		-- Sweet Demon Bloom Honey
			__WPL:setWaypointIndex(__WPL:findWaypointTag("MoreBloomHoney"))
		end
	</waypoint>
	<waypoint x="7169" z="11687" y="-100"></waypoint>
	<waypoint x="7160" z="11962" y="-90"></waypoint>
	<waypoint x="7131" z="12215" y="-77"></waypoint>
	<waypoint x="7222" z="12279" y="-78"></waypoint>
	<waypoint x="7394" z="12262" y="-79">
		__WPL:setWaypointIndex(__WPL:findWaypointTag("ChefFhil"))
	</waypoint>

<!-- ======================================================================== -->
<!-- ===                           Mailbox.2                              === -->
<!-- ======================================================================== -->

<!-- 7 -->
<!-- Issac Camp Mailbox -->	
	<waypoint x="7245" z="12390" y="-81" tag="IssacCampMailbox">
		-- Open Mailbox and Take Mail
		player:target_Object(117407,1500);				-- Mailbox
		RoMScript("ChoiceOption(1);"); yrest(1500);
		RoMScript("UMMFrameTab1Tools:ButtonClick('tagempty');"); yrest(1000)
		RoMScript("UMMFrameTab1Tools:ButtonClick('delete');"); yrest(5000)
		if(inventory:itemTotalCount(0) > 25) then
			UMM_TakeMail (); yrest(1000);
		else
			__WPL:setWaypointIndex(__WPL:findWaypointTag("IssacCampmerchant"))
		end
		RoMScript("CloseWindows()"); yrest(500); inventory:update();

		-- Check daily
		CheckDailyComplete()

		-- Equip items
		EquipItems()
		
		-- Check Level and Daily
		if( 10 > getDailyComplete() and player.Level == 43 ) then
			__WPL:setWaypointIndex(__WPL:findWaypointTag("IssacCampmerchant"))
		elseif( 10 > getDailyComplete() and player.Level > 43 ) then
			__WPL:setWaypointIndex(__WPL:findWaypointTag("GoToStaticLathrofea"))
		end
	</waypoint>
	
<!-- 8 -->
<!-- 44 Level Go to Static Lathrofea -->
	<waypoint x="7180" z="12259" y="-76" tag="GoToStaticLathrofea"></waypoint>
	<waypoint x="7109" z="12189" y="-77"></waypoint>
	<waypoint x="7158" z="12073" y="-82"></waypoint>
	<waypoint x="7383" z="11910" y="-79"></waypoint>
	<waypoint x="7573" z="11739" y="-89"></waypoint>
	<waypoint x="7665" z="11622" y="-78"></waypoint>
	<waypoint x="7797" z="11414" y="-83"></waypoint>
	<waypoint x="7859" z="11245" y="-83"></waypoint>
	<waypoint x="7957" z="10921" y="-107"></waypoint>
	<waypoint x="8045" z="10715" y="-134"></waypoint>
	<waypoint x="8186" z="10499" y="-137"></waypoint>
	<waypoint x="8371" z="10407" y="-81"></waypoint>
	<waypoint x="8654" z="10365" y="-39"></waypoint>
	<waypoint x="8842" z="10302" y="-17"></waypoint>
	<waypoint x="9034" z="10255" y="-19"></waypoint>
	<waypoint x="9314" z="10188" y="-23"></waypoint>
	<waypoint x="9489" z="10085" y="-8"></waypoint>
	<waypoint x="9682" z="9932" y="-4"></waypoint>
	<waypoint x="9897" z="9743" y="-10"></waypoint>
	<waypoint x="10017" z="9609" y="0"></waypoint>
	<waypoint x="10023" z="9416" y="0"></waypoint>
	<waypoint x="10054" z="9316" y="0">
		-- Accept Quest Loudmouthed Adventurer
		npcname = GetIdName(117847)			-- Tilheim Finster
		questname = GetIdName(424111)		-- Loudmouthed Adventurer
		player:target_NPC(npcname) yrest(500)
		AcceptQuestByName(questname)
	</waypoint>
	<waypoint x="9994" z="9158" y="0"></waypoint>
	<waypoint x="9922" z="9070" y="0"></waypoint>
	<waypoint x="9863" z="9079" y="0">
		npcname = GetIdName(117846)			-- Denton
		player:target_NPC(npcname)
	</waypoint>
	<waypoint x="9951" z="8983" y="0"></waypoint>
	<waypoint x="9976" z="8919" y="0"></waypoint>
	<waypoint x="9927" z="8870" y="-2">
		-- Accept and Complete daily Quest Magic Coloring
		DailyQuest(118061, 424166)		-- Baladd Link, Magic Coloring
	</waypoint>
	<waypoint x="10009" z="8803" y="0">
		npcname = GetIdName(117845)			-- Reis
		player:target_NPC(npcname)
	</waypoint>
	<waypoint x="10128" z="8999" y="0">
		npcname = GetIdName(117844)			-- Klaus
		player:target_NPC(npcname)
	</waypoint>
	<waypoint x="10302" z="8968" y="-1"></waypoint>
	<waypoint x="10499" z="8968" y="0"></waypoint>
	<waypoint x="10559" z="9009" y="0">
		npcname = GetIdName(117842)			-- Little John
		player:target_NPC(npcname)
	</waypoint>
	<waypoint x="10440" z="8969" y="-1"></waypoint>
	<waypoint x="10351" z="8970" y="-5"></waypoint>
	<waypoint x="10318" z="9012" y="-1"></waypoint>
	<waypoint x="10318" z="9073" y="0">
		-- Accept or Complete Quest Chupura's Doomsday
		npcname = GetIdName(117849)			-- Samantha
		questname = GetIdName(424115)		-- Chupura's Doomsday
		player:target_NPC(npcname) yrest(500)
		AcceptQuestByName(questname)
		player:target_NPC(npcname) yrest(500)
		CompleteQuestByName(questname, 2)
	</waypoint>
	<waypoint x="10173" z="9086" y="0"></waypoint>
	<waypoint x="10135" z="9142" y="0"></waypoint>
	<waypoint x="10096" z="9314" y="0">
		-- Complete Quest Loudmouthed Adventurer
		npcname = GetIdName(117847)			-- Tilheim Finster
		player:target_NPC(npcname) yrest(500)
		RoMScript("ChoiceOption(2);"); yrest(500);
		RoMScript("OnClick_QuestListButton(3, 1);"); yrest(500);
		RoMScript("SpeakFrame_CompleteQuest();");
		RoMScript("SpeakFrame_Hide();");
	</waypoint>	

<!-- 9 -->
<!-- Sofie Paichu -->
	<waypoint x="10082" z="9362" y="0" tag="SofiePaichu">
		-- Shut Them Up
		npcname = GetIdName(118060)			-- Sofie Paichu
		questname = GetIdName(424165)		-- Shut Them Up
		if( 10 > getDailyComplete() and 50 > player.Level ) then
			DailyQuest(118060, 424165)		-- Sofie Paichu, Shut Them Up
		end

		while ( not keyPressedLocal(key.VK_LSHIFT) and  10 > getDailyComplete() ) do
			player:target_NPC(npcname) yrest(500)
			AcceptQuestByName(questname)
			
			while dailyQuest ~= "complete" do
				repeat dailyQuest = getQuestStatus(questname); yrest(500) until dailyQuest
			end;

			player:target_NPC(npcname) yrest(500)
			CompleteQuestByName(questname, 2)
		end;
		
		--while not keyPressedLocal(key.VK_CONTROL) do yrest(500); end;
		
		-- Repair and sale
		if( 4 > inventory:getItemCount(0) or 80 > inventory:getMainHandDurability() ) then
			__WPL:setWaypointIndex(__WPL:findWaypointTag("StaticLathrofeamerchant"))
		end
	</waypoint>
	
<!--10 -->
<!-- Static Lathrofea merchant -->	
	<waypoint x="10052" z="9300" y="0" tag="StaticLathrofeamerchant">	</waypoint>
	<waypoint x="10039" z="9189" y="0"></waypoint>
	<waypoint x="10049" z="9071" y="0">
		npcname = GetIdName(118109)			-- Silvershadow Adventurers' Guild Provisioner
		player:merchant(npcname)
	</waypoint>
	<waypoint x="10049" z="9188" y="0"></waypoint>
	<waypoint x="10062" z="9318" y="0">
		__WPL:setWaypointIndex(__WPL:findWaypointTag("SofiePaichu"))
	</waypoint>

<!-- ======================================================================== -->
<!-- ===                            Mailbox.3                             === -->
<!-- ======================================================================== -->

<!-- 11 -->
<!-- Static Lathrofea  -->	
	<waypoint x="10101" z="9282" y="0" tag="StaticLathrofeaMailbox">	</waypoint>
	<waypoint x="10140" z="9138" y="0">	</waypoint>
	<waypoint x="10252" z="9029" y="1">	</waypoint>
	<waypoint x="10376" z="8918" y="-1" tag="Mailbox3">
		player:target_Object(118688);	--Mailbox
	</waypoint>


</waypoints>