<?xml version="1.0" encoding="utf-8"?><waypoints>	
	<onLoad>
	--=== Version 5.1 ===--
	settings.profile.events.onDeath = function()
		RoMScript("BrithRevive();");
		waitForLoadingScreen();
		yrest(3000)
		sendMacro("LeaveParty();");
		player:update();
		__WPL:setWaypointIndex(__WPL:findWaypointTag("rerun"));		
	end

	setwindow("gold")
	ToPancer = 1
	changeProfileOption("LOOT_SIGILS", false)
	changeProfileOption("INV_AUTOSELL_ENABLE",true)
	changeProfileOption("LOOT_ALL", false)
	changeProfileOption("LOOT", false)
	changeProfileOption("COMBAT_TYPE", "melee")	
	
	for i, skill in pairs(settings.profile.skills) do
		if skill.Name == "MAGE_PURGATORY_FIRE" then
			settings.profile.skills[i].AutoUse = true
		end
		if skill.Name == "MAGE_FLAME" then
			settings.profile.skills[i].AutoUse = false
		end	
		if skill.Name == "MAGE_PLASMA_ARROW" then
			settings.profile.skills[i].AutoUse = true
		end
	end
	
	function bagcheck()
		if inventory:itemTotalCount(0) == 0 then
			sendMacro("LeaveParty();");
			waitForLoadingScreen(); 
			yrest(3000)
			player:update();
			__WPL:setWaypointIndex(__WPL:findWaypointTag("rerun"));
		end
	end

	function unStick3()
		if getZoneId() == 6 then
			__WPL:setForcedWaypointType("RUN")	
		else	
			sendMacro("LeaveParty();");
			waitForLoadingScreen(); 
			yrest(3000)
			player:update();
			__WPL:setWaypointIndex(__WPL:findWaypointTag("rerun"));
		end
	end

	function CleanBagKS()
		for i, item in pairs(inventory.BagSlot) do
			if item.SlotNumber >= settings.profile.options.INV_AUTOSELL_FROMSLOT + 60 and
			settings.profile.options.INV_AUTOSELL_TOSLOT + 60 >= item.SlotNumber then
				if item:isType("Runes") or item:isType("Monster Cards") then 
					item:delete()
				end
				if ( item:isType("Weapons") or item:isType("Armor") ) and (100 > item.Worth and 3 > item.Quality) then
					item:delete()
				end
				if item:isType("Production Runes") then
					item:delete()
				end
				if item:isType("Potions") and (45 > item.RequiredLvl and item.RequiredLvl > 10) then
					item:delete()
				end			
			end
		end
	end	
	</onLoad>

	<!-- #  1 --><waypoint x="4714" z="913" type="TRAVEL">	
	changeProfileOption("QUICK_TURN", true)
	changeProfileOption("MAX_TARGET_DIST", 100);	
	changeProfileOption("USE_PHIRIUS_POTION", true);
   </waypoint>
	<!-- #  2 --><waypoint x="4626" z="913" type="RUN" >	</waypoint>
	<!-- #  3 --><waypoint x="4531" z="911"  > 	</waypoint>
	<!-- #  4 --><waypoint x="4428" z="915" type="RUN"  > 	</waypoint>	<!--changeProfileOption("MAX_TARGET_DIST", 130);-->
	<!-- #  5 --><waypoint x="4350" z="976"  >	</waypoint>
	<!-- #  6 --><waypoint x="4380" z="824"  >	</waypoint>
	<!-- #  7 --><waypoint x="4215" z="928"  >	</waypoint>	
	<!-- #  8 --><waypoint x="4175" z="803" > CleanBagKS()	</waypoint>
	<!-- #  9 --><waypoint x="4234" z="945" > bagcheck()	</waypoint> <!-- changeProfileOption("MAX_TARGET_DIST", 130); -->
	<!-- # 10 --><waypoint x="4072" z="909" type="RUN"  >  </waypoint>
	<!-- # 11 --><waypoint x="3992" z="985" >	</waypoint>
	<!-- # 12 --><waypoint x="3881" z="988" >	</waypoint>	<!-- changeProfileOption("MAX_TARGET_DIST", 90); -->
	<!-- # 13 --><waypoint x="3813" z="734" >bagcheck()	</waypoint>
	<!-- # 15 --><waypoint x="3751" z="782"> 	</waypoint>
	<!-- # 16 --><waypoint x="3751" z="1121" type="RUN"  >	</waypoint>
	<!-- # 17 --><waypoint x="3751" z="1161" >	</waypoint>
	<!-- # 18 --><waypoint x="3797" z="1178">bagcheck()	</waypoint>
	<!-- # 19 --><waypoint x="3830" z="1199"> 
	changeProfileOption("LOOT_ALL", true)
	changeProfileOption("LOOT", true)
 	</waypoint>	<!-- changeProfileOption("MAX_TARGET_DIST", 110);-->
	<!-- # 20 --><waypoint x="3891" z="1200">CleanBagKS()	</waypoint>
	<!-- # 21 --><waypoint x="3958" z="1176">bagcheck()	</waypoint>
	<!-- # 23 --><waypoint x="4030" z="1207">	</waypoint>
	<!-- # 24 --><waypoint x="4033" z="1278">bagcheck()	</waypoint>
	<!-- # 25 --><waypoint x="4040" z="1359">  	</waypoint>
	<!-- # 26 --><waypoint x="4064" z="1428">  </waypoint>
	<!-- # 27 --><waypoint x="4148" z="1439">CleanBagKS()	</waypoint>
	<!-- # 28 --><waypoint x="4212" z="1411"> bagcheck()	</waypoint>
	<!-- # 29 --><waypoint x="4233" z="1336" type="RUN" >	</waypoint>
	<!-- # 30 --><waypoint x="4232" z="1262" type="RUN" >	</waypoint>
	<!-- # 31 --><waypoint x="4235" z="1153" type="TRAVEL">	</waypoint>
	<!-- # 32 --><waypoint x="4269" z="1155"> 
	changeProfileOption("LOOT_ALL", false)
	changeProfileOption("LOOT", false)
	bagcheck()		</waypoint>
	<!-- # 33 --><waypoint x="4339" z="1150">	</waypoint>
	<!-- # 34 --><waypoint x="4421" z="1149"> bagcheck() 	</waypoint>
	<!-- # 35 --><waypoint x="4418" z="1278">	</waypoint>
	<!-- # 36 --><waypoint x="4418" z="1437" type="RUN" >	</waypoint>
	<!-- # 37 --><waypoint x="4339" z="1438" type="RUN" >	</waypoint>
	<!-- # 38 --><waypoint x="4267" z="1436" type="RUN" >	</waypoint>
	<!-- # 39 --><waypoint x="4202" z="1444" type="RUN" >  		</waypoint>
	<!-- # 40 --><waypoint x="4164" z="1492">	</waypoint>
	<!-- # 41 --><waypoint x="4100" z="1500">bagcheck()		</waypoint>
	<!-- # 42 --><waypoint x="4052" z="1509">	</waypoint>
	<!-- # 43 --><waypoint x="3980" z="1532">CleanBagKS()	</waypoint>
	<!-- # 44 --><waypoint x="3911" z="1508"> bagcheck()		</waypoint>
	<!-- # 45 --><waypoint x="3831" z="1441">	</waypoint>
	<!-- # 46 --><waypoint x="3777" z="1416">	</waypoint>
	<!-- # 47 --><waypoint x="3757" z="1362">bagcheck()		</waypoint>
	<!-- # 48 --><waypoint x="3763" z="1307">	</waypoint>
	<!-- # 49 --><waypoint x="3781" z="1238">bagcheck()		</waypoint>	<!-- changeProfileOption("MAX_TARGET_DIST", 150);-->
	<!-- # 50 --><waypoint x="3771" z="1176">	</waypoint>
	<!-- # 51 --><waypoint x="3728" z="1149"> 	</waypoint>
	<!-- # 52 --><waypoint x="3601" z="1157">bagcheck()		</waypoint>
	<!-- # 53 --><waypoint x="3474" z="1162">	</waypoint>
	<!-- # 54 --><waypoint x="3448" z="1211">bagcheck()		</waypoint>
	<!-- # 55 --><waypoint x="3454" z="1313">	</waypoint>
	<!-- # 56 --><waypoint x="3466" z="1408">bagcheck()		</waypoint>
	<!-- # 57 --><waypoint x="3427" z="1456">   		</waypoint>
	<!-- # 58 --><waypoint x="3313" z="1444">	</waypoint>
	<!-- # 59 --><waypoint x="3198" z="1429">bagcheck()		</waypoint>
	<!-- # 60 --><waypoint x="3149" z="1446">	</waypoint>
	<!-- # 62 --><waypoint x="3160" z="1514">	</waypoint>
	<!-- # 63 --><waypoint x="3169" z="1617">CleanBagKS()	</waypoint>
	<!-- # 64 --><waypoint x="3157" z="1716">  bagcheck()		</waypoint>
	<!-- # 66 --><waypoint x="3158" z="1813">	</waypoint>
	<!-- # 67 --><waypoint x="3172" z="1887">	</waypoint>
	<!-- # 68 --><waypoint x="3172" z="1969">	</waypoint>
	<!-- # 69 --><waypoint x="3169" z="2050">	</waypoint>
	<!-- # 70 --><waypoint x="3168" z="2138"> bagcheck()	 		</waypoint>
	<!-- # 71 --><waypoint x="3178" z="2255"> 	</waypoint>
	<!-- # 72 --><waypoint x="3148" z="2287">	</waypoint>
	<!-- # 73 --><waypoint x="3059" z="2282">	</waypoint>
	<!-- # 74 --><waypoint x="2958" z="2288">  		</waypoint>
	<!-- # 75 --><waypoint x="2927" z="2245" type="RUN" >	</waypoint> 	<!-- changeProfileOption("MAX_TARGET_DIST", 90); -->
	<!-- # 76 --><waypoint x="2938" z="2157" type="RUN" >	</waypoint>
	<!-- # 77 --><waypoint x="3045" z="2008" type="RUN" >	</waypoint>
	<!-- # 78 --><waypoint x="2920" z="2012">CleanBagKS()	</waypoint>
	<!-- # 79 --><waypoint x="2867" z="1987">  bagcheck()	  </waypoint> <!-- changeProfileOption("MAX_TARGET_DIST", 110); -->
	<!-- # 80 --><waypoint x="2811" z="2029" >	</waypoint>
	<!-- # 81 --><waypoint x="2806" z="2088" >	</waypoint>
	<!-- # 82 --><waypoint x="2845" z="2148" >	</waypoint>
	<!-- # 83 --><waypoint x="2857" z="2210">bagcheck()		</waypoint>
	<!-- # 84 --><waypoint x="2766" z="2266">	</waypoint>
	<!-- # 85 --><waypoint x="2705" z="2289">	</waypoint>
	<!-- # 86 --><waypoint x="2636" z="2242">  		</waypoint>
	<!-- # 87 --><waypoint x="2628" z="2175">	</waypoint>
	<!-- # 88 --><waypoint x="2621" z="2106">	</waypoint>
	<!-- # 89 --><waypoint x="2614" z="2042"> changeOptionFriendMob("friend", "Iron Rune Warrior", "Add") 	</waypoint>
	<!-- # 90 --><waypoint x="2649" z="1989"> fly()		</waypoint>
	<!-- #  1 --><waypoint x="2690" z="1885" y="739">	</waypoint>
	<!-- #  2 --><waypoint x="2690" z="1813" y="798">	</waypoint>
	<!-- #  3 --><waypoint x="2849" z="1812" y="877">	</waypoint>
	<!-- #  4 --><waypoint x="2810" z="1513" y="912">	</waypoint>
	<!-- #  5 --><waypoint x="2720" z="1410" y="822">	</waypoint>
	<!-- #  6 --><waypoint x="2865" z="1422" y="712">	 flyoff()	</waypoint>
	<!-- # 10 --><waypoint x="2945" z="1425" y="628"> changeProfileOption("MAX_TARGET_DIST", 110);	</waypoint>
	<!-- # 11 --><waypoint x="3084" z="1429" y="591">	</waypoint>
	<!-- # 12 --><waypoint x="3132" z="1792" y="591">	</waypoint>
	<!-- # 107 --><waypoint x="3087" z="1804" type="RUN" >	</waypoint>
	<!-- # 108 --><waypoint x="3031" z="1797" type="RUN" >	</waypoint>
	<!-- # 109 --><waypoint x="2880" z="1795" type="RUN" >	</waypoint>
	<!-- # 110 --><waypoint x="2711" z="1796" type="RUN" >	</waypoint>
	<!-- # 111 --><waypoint x="2705" z="1730"> 	</waypoint>
	<!-- # 112 --><waypoint x="2867" z="1724">  </waypoint>
	<!-- # 113 --><waypoint x="2638" z="1703" >	</waypoint>
	<!-- # 114 --><waypoint x="2532" z="1705">	</waypoint>
	<!-- # 115 --><waypoint x="2484" z="1677">
	changeProfileOption("MAX_TARGET_DIST", 150);   bagcheck()		</waypoint>
	<!-- # 116 --><waypoint x="2425" z="1594">	</waypoint>
	<!-- # 117 --><waypoint x="2454" z="1541">	</waypoint>
	<!-- # 118 --><waypoint x="2528" z="1517">	</waypoint>
	<!-- # 119 --><waypoint x="2650" z="1515"> 	
	changeProfileOption("LOOT_ALL", true)
	changeProfileOption("LOOT", true)	
	changeProfileOption("MAX_TARGET_DIST", 110);	</waypoint>
	<!-- # 120 --><waypoint x="2751" z="1532">	</waypoint>
	<!-- # 121 --><waypoint x="2811" z="1527">  </waypoint>
	<!-- # 122 --><waypoint x="2936" z="1562">	</waypoint>
	<!-- # 123 --><waypoint x="2960" z="1511">	</waypoint>
	<!-- # 124 --><waypoint x="2946" z="1424"> bagcheck()		</waypoint>
	<!-- # 125 --><waypoint x="2786" z="1426">	</waypoint>
	<!-- # 126 --><waypoint x="2597" z="1433">	</waypoint>
	<!-- # 127 --><waypoint x="2593" z="1540">		</waypoint>
	<!-- # 128 --><waypoint x="2589" z="1771"> 	</waypoint>
	<!-- # 129 --><waypoint x="2590" z="1867">  </waypoint>
	<!-- # 130 --><waypoint x="2581" z="2366">	</waypoint>
	<!-- # 131 --><waypoint x="2595" z="2496">	</waypoint>
	<!-- # 132 --><waypoint x="2595" z="2685">	</waypoint>
	<!-- # 133 --><waypoint x="2593" z="2846">  </waypoint>
	<!-- # 134 --><waypoint x="2570" z="2961">	</waypoint>
	<!-- # 135 --><waypoint x="2464" z="2946">
		changeProfileOption("LOOT_ALL", false)
		changeProfileOption("LOOT", false)
 	</waypoint>
	<!-- # 136 --><waypoint x="2342" z="2949">	</waypoint>
	<!-- # 137 --><waypoint x="2291" z="3004">	</waypoint>
	<!-- # 138 --><waypoint x="2307" z="3088">
	changeProfileOption("LOOT_ALL", true)
	changeProfileOption("LOOT", true)
	</waypoint>
	<!-- # 139 --><waypoint x="2318" z="3228">	</waypoint>
	<!-- # 140 --><waypoint x="2303" z="3284">	</waypoint>
	<!-- # 141 --><waypoint x="2178" z="3289">	</waypoint>
	<!-- # 142 --><waypoint x="2050" z="3274">
		changeProfileOption("LOOT_ALL", false)
		changeProfileOption("LOOT", false)
		yrest(1000)
		sendMacro("LeaveParty();");
		waitForLoadingScreen(); 
		yrest(3000)
		player:update();
		__WPL:setWaypointIndex(__WPL:findWaypointTag("rerun"));	
	</waypoint>	
	
	
	
	<!-- going to sold out -->	
	<!-- # 210 --><waypoint x="-15147" z="11542" y="136" tag="rerun">
	if not player:hasBuff(506841) then
		inventory:useItem(202879);
		yrest(5000)
		SlashCommand("ILG inv")
	else
		SlashCommand("ILG inv")
	end
	yrest(3000)
	if GetPartyMemberName(1) == "" then player:sleep() end --invite didn't work, other char must have disconnected
	
	yrest(1000)
    
    player:mount();
	player:update()
	if not player.Mounted then 
		inventory:useItem(203033)
		yrest(2000)
		inventory:update()
		player:mount();
	end
	changeProfileOption("LOOT_ALL", false)
	changeProfileOption("LOOT", false)	
	if ToPancer == 1 then
		__WPL:setWaypointIndex(__WPL:findWaypointTag("Pancer1"));
	end
	if ToPancer == 2 then
		__WPL:setWaypointIndex(__WPL:findWaypointTag("Pancer2"));
	end

	</waypoint>
	<!-- # 211 --><waypoint x="-15764" z="11358" type="TRAVEL" tag="Pancer1">	</waypoint>
	<!-- # 212 --><waypoint x="-15967" z="11304" type="TRAVEL">	</waypoint>
	<!-- # 213 --><waypoint x="-16078" z="11312" type="TRAVEL">	</waypoint>
	<!-- # 214 --><waypoint x="-16249" z="11327" type="TRAVEL">	</waypoint>
	<!-- # 215 --><waypoint x="-16450" z="11350" type="TRAVEL">	</waypoint>
	<!-- # 216 --><waypoint x="-16607" z="11365" type="TRAVEL">	</waypoint>
	<!-- # 217 --><waypoint x="-16618" z="11352" type="TRAVEL"> 
	changeProfileOption("HARVEST_DISTANCE", 200);  
	yrest(100);
	if inventory:itemTotalCount(0) == 0 then -- make sure to get pet xtras
		player:merchant("Pancer");
		yrest(100);
	end
	player:merchant("Pancer");
	yrest(100);
	ToPancer = 1
	__WPL:setWaypointIndex(__WPL:findWaypointTag("toKS"));
	</waypoint>
	<!-- #  1 --><waypoint x="-15134" z="11548" y="161" type="TRAVEL" tag="Pancer2"> </waypoint>
	<!-- #  2 --><waypoint x="-15365" z="11644" y="170" type="TRAVEL">	</waypoint>
	<!-- #  3 --><waypoint x="-15931" z="11922" y="167" type="TRAVEL">	</waypoint>
	<!-- #  4 --><waypoint x="-16431" z="11769" y="158" type="TRAVEL">	</waypoint>
	<!-- #  5 --><waypoint x="-16613" z="11701" y="154" type="TRAVEL">	</waypoint>
	<!-- #  6 --><waypoint x="-16618" z="11352" y="158" type="TRAVEL"> 
	changeProfileOption("HARVEST_DISTANCE", 200);  
	yrest(100);
	if inventory:itemTotalCount(0) == 0 then -- make sure to get pet xtras
		player:merchant("Pancer");
		yrest(100);
	end
	player:merchant("Pancer");
	yrest(100); 
	ToPancer = 1
	__WPL:setWaypointIndex(__WPL:findWaypointTag("toKS"));
	</waypoint>
	<!-- # 218 --><waypoint x="-16650" z="11463" type="TRAVEL" tag="toKS">	</waypoint>
	<!-- # 219 --><waypoint x="-16836" z="11573" type="TRAVEL">	</waypoint>
	<!-- # 220 --><waypoint x="-17141" z="11250" type="TRAVEL">	</waypoint>
	<!-- # 221 --><waypoint x="-17448" z="10703" type="TRAVEL">
	changeProfileOption("USE_PHIRIUS_POTION", false);
	</waypoint>
	<!-- # 222 --><waypoint x="-17668" z="10680" type="TRAVEL">	player:mount();
	</waypoint>
	<!-- # 223 --><waypoint x="-17936" z="10586" type="TRAVEL"> </waypoint>
	<!-- # 224 --><waypoint x="-18160" z="10707" type="TRAVEL">	</waypoint>
	<!-- # 225 --><waypoint x="-18288" z="11068" type="TRAVEL">	</waypoint>
	<!-- # 226 --><waypoint x="-18416" z="11681" type="TRAVEL"> </waypoint>
	<!-- # 225 --><waypoint x="-18528" z="12368" tag="enter" type="TRAVEL">
	changeProfileOption("QUICK_TURN", false)
	</waypoint>	
	<!-- # 227 --><waypoint x="-18576" z="12498" type="TRAVEL">
	repeat
		waitForLoadingScreen(20);
		if getZoneId() == 6 then
			__WPL:setWaypointIndex(__WPL:findWaypointTag("enter"));
		end
	until getZoneId() ~= 6
	yrest(3000)
	</waypoint>
</waypoints>