<?xml version="1.0" encoding="utf-8"?><waypoints type="TRAVEL">
<onLoad>
  changeProfileOption("MAX_TARGET_DIST", 60);
	ecandle = player:findNearestNameOrId(114117)

	for k,v in pairs(settings.profile.skills) do
	      v.AutoUse = false
	end

	function getecandle()
			local lastpllocx = 0
			local lastpllocz = 0
			local lastpllocy = 0
			player:update()
			local cecandle = player:findNearestNameOrId("Elemental Candlestick")
			local dist = distance(cecandle.X,cecandle.Z,player.X,player.Z)
			local lastpllocx = player.X
			local lastpllocz = player.Z
			local lastpllocy = player.Y
			if cecandle and (100 > dist) then
				-- goto ecandle
				teleport_SetStepSize(40)
				teleport(cecandle.X, cecandle.Z)	-- teleport to above ecandle
				teleport(cecandle.X + 1, cecandle.Z, cecandle.Y +15)	-- teleport in range to click ecandle

				-- click ecandle
					player:target(cecandle)
					yrest(100)
					player:target_Object("Elemental Candlestick", nil, nil, true);
					yrest(5000)
					player:update()

				teleport(lastpllocx,lastpllocz,lastpllocy)
			end
	end
	
	local zoneid = RoMScript("GetZoneID()")
	if zoneid == 10 then
		player:target_NPC("Ange Rasa");
		yrest(2000)
		sendMacro("ChoiceOption(4);");
		yrest(2000)
		sendMacro("ChoiceOption(1);");
		yrest(2000)
		waitForLoadingScreen();
	end
	__WPL:setWaypointIndex(__WPL:getNearestWaypoint(player.X,player.Z))
</onLoad>
	<!-- #  1 --><waypoint x="3406" z="3588" y="34" tag="SWstart">
	fly()
		player:target_NPC("Luke Xavi");
		yrest(2000);
		sendMacro("ChoiceOption(3);");
		yrest(3000);
		sendMacro("ChoiceOption(1);");
		yrest(5000);
		teleportToWP()
	</waypoint>
	<!-- #  2 --><waypoint x="3476" z="3624" y="74">	</waypoint>
	<!-- #  3 --><waypoint x="3526" z="3653" y="74">
		teleportToWP()
	</waypoint>
	<!-- #  4 --><waypoint x="3550" z="3668" y="92">	</waypoint>
	<!-- #  5 --><waypoint x="3599" z="3581" y="92">	</waypoint>
	<!-- #  6 --><waypoint x="3662" z="3617" y="92">	</waypoint>
	<!-- #  7 --><waypoint x="3593" z="3752" y="92">	</waypoint>
	<!-- #  8 --><waypoint x="3627" z="3983" y="92">	</waypoint>
	<!-- #  9 --><waypoint x="3706" z="4114" y="92">
		teleportToWP()
	</waypoint>
	<!-- # 10 --><waypoint x="3705" z="4126" y="74">	</waypoint>
	<!-- # 11 --><waypoint x="3705" z="4185" y="74">	</waypoint>
	<!-- # 12 --><waypoint x="3648" z="4206" y="34">
		__WPL:setWaypointIndex(__WPL:findWaypointTag("commonstart"));
	</waypoint>
	<!-- # 13 --><waypoint x="3835" z="4327" y="34" tag="Nstart">
	fly()
		player:target_NPC("Luke Xavi");
		yrest(2000);
		sendMacro("ChoiceOption(3);");
		yrest(2000);
		sendMacro("ChoiceOption(1);");
		yrest(5000);
		teleportToWP()
	</waypoint>
	<!-- # 14 --><waypoint x="3835" z="4248" y="74">	</waypoint>
	<!-- # 15 --><waypoint x="3835" z="4181" y="74">	</waypoint>
	<!-- # 16 --><waypoint x="3645" z="4206" y="34">
		__WPL:setWaypointIndex(__WPL:findWaypointTag("commonstart"));
	</waypoint>
	<!-- # 17 --><waypoint x="4271" z="4086" y="34" tag="NEstart">
	fly()
		player:target_NPC("Luke Xavi");
		yrest(2000);
		sendMacro("ChoiceOption(3);");
		yrest(2000);
		sendMacro("ChoiceOption(1);");
		yrest(5000);
		teleportToWP()
	</waypoint>
	<!-- # 18 --><waypoint x="4201" z="4044" y="74">	</waypoint>
	<!-- # 19 --><waypoint x="4157" z="4019" y="74">
		teleportToWP()
	</waypoint>
	<!-- # 20 --><waypoint x="4142" z="4046" y="92">	</waypoint>
	<!-- # 21 --><waypoint x="4032" z="4200" y="92">	</waypoint>
	<!-- # 22 --><waypoint x="3714" z="4197" y="92">	</waypoint>
	<!-- # 23 --><waypoint x="3648" z="4206" y="34">
		__WPL:setWaypointIndex(__WPL:findWaypointTag("commonstart"));
	</waypoint>
	<!-- # 24 --><waypoint x="3416" z="4079" y="34" tag="NWstart">
	fly()
		player:target_NPC("Luke Xavi");
		yrest(2000);
		sendMacro("ChoiceOption(3);");
		yrest(2000);
		sendMacro("ChoiceOption(1);");
		yrest(5000);
		teleportToWP()
	</waypoint>
	<!-- # 25 --><waypoint x="3476" z="4044" y="74">	</waypoint>
	<!-- # 26 --><waypoint x="3529" z="4013" y="74">
		teleportToWP()
	</waypoint>
	<!-- # 27 --><waypoint x="3595" z="4086" y="92">	</waypoint>
	<!-- # 28 --><waypoint x="3676" z="4046" y="92">	</waypoint>
	<!-- # 29 --><waypoint x="3705" z="4113" y="92">
		teleportToWP()
	</waypoint>
	<!-- # 30 --><waypoint x="3705" z="4119" y="72">	</waypoint>
	<!-- # 31 --><waypoint x="3703" z="4187" y="72">	</waypoint>
	<!-- # 32 --><waypoint x="3647" z="4208" y="34">
		__WPL:setWaypointIndex(__WPL:findWaypointTag("commonstart"));
	</waypoint>
	<!-- # 33 --><waypoint x="3847" z="3347" y="34" tag="Sstart">
	fly()
		player:target_NPC("Luke Xavi");
		yrest(2000);
		sendMacro("ChoiceOption(3);");
		yrest(2000);
		sendMacro("ChoiceOption(1);");
		yrest(5000);
		teleportToWP()
	</waypoint>
	<!-- # 34 --><waypoint x="3848" z="3419" y="74">	</waypoint>
	<!-- # 35 --><waypoint x="3849" z="3467" y="74">
		teleportToWP()
	</waypoint>
	<!-- # 36 --><waypoint x="3977" z="3498" y="74">	</waypoint>
	<!-- # 37 --><waypoint x="3979" z="3553" y="74">	</waypoint>
	<!-- # 38 --><waypoint x="4004" z="3574" y="74">
		teleportToWP()
	</waypoint>
	<!-- # 39 --><waypoint x="4098" z="3754" y="92">	</waypoint>
	<!-- # 40 --><waypoint x="4068" z="3970" y="92">	</waypoint>
	<!-- # 41 --><waypoint x="4031" z="4038" y="92">	</waypoint>
	<!-- # 42 --><waypoint x="4085" z="4104" y="92">	</waypoint>
	<!-- # 43 --><waypoint x="4046" z="4176" y="92">	</waypoint>
	<!-- # 44 --><waypoint x="3736" z="4195" y="92">	</waypoint>
	<!-- # 45 --><waypoint x="3648" z="4209" y="34">
		__WPL:setWaypointIndex(__WPL:findWaypointTag("commonstart"));
	</waypoint>
	<!-- # 46 --><waypoint x="4261" z="3592" y="34" tag="SEstart">
	fly()
		player:target_NPC("Luke Xavi");
		yrest(2000);
		sendMacro("ChoiceOption(3);");
		yrest(2000);
		sendMacro("ChoiceOption(1);");
		yrest(5000);
		teleportToWP()
	</waypoint>
	<!-- # 47 --><waypoint x="4210" z="3619" y="74">	</waypoint>
	<!-- # 48 --><waypoint x="4159" z="3648" y="74">
		teleportToWP()
	</waypoint>
	<!-- # 49 --><waypoint x="4081" z="3589" y="92">	</waypoint>
	<!-- # 50 --><waypoint x="4017" z="3626" y="92">	</waypoint>
	<!-- # 51 --><waypoint x="4103" z="3767" y="92">	</waypoint>
	<!-- # 52 --><waypoint x="4076" z="3952" y="92">	</waypoint>
	<!-- # 53 --><waypoint x="4019" z="4043" y="92">	</waypoint>
	<!-- # 54 --><waypoint x="4103" z="4100" y="92">	</waypoint>
	<!-- # 55 --><waypoint x="4044" z="4170" y="92">	</waypoint>
	<!-- # 56 --><waypoint x="3762" z="4189" y="92">	</waypoint>
	<!-- # 57 --><waypoint x="3645" z="4208" y="34">
		__WPL:setWaypointIndex(__WPL:findWaypointTag("commonstart"));
	</waypoint>
	<!-- # 58 --><waypoint x="3643" z="4215" y="34" tag="commonstart">
		player:target_Object(114080, nil, nil, true);
		yrest(5000)
		teleportToWP()
	</waypoint>
	<!-- # 59 --><waypoint x="3704" z="4159" y="74">	</waypoint>
	<!-- # 60 --><waypoint x="3704" z="4122" y="74">
		teleportToWP()
	</waypoint>
	<!-- # 61 --><waypoint x="3736" z="4118" y="92">	</waypoint>
	<!-- # 62 --><waypoint x="3830" z="4094" y="92">
		getecandle()
	</waypoint>		<!-- check/get candle -->
	<!-- # 63 --><waypoint x="3676" z="4124" y="92">
		getecandle()
	</waypoint> <!-- actual coords -->
	<!-- # 64 --><waypoint x="3643" z="4057" y="92">	</waypoint>
	<!-- # 65 --><waypoint x="3595" z="4094" y="92">	</waypoint>
	<!-- # 66 --><waypoint x="3609" z="4181" y="34">
		teleportToWP()
	</waypoint>
	<!-- # 67 --><waypoint x="3610" z="4188" y="34">
		player:target_Object(114080, nil, nil, true);
		yrest(5000)
		teleportToWP()
	</waypoint>
	<!-- # 68 --><waypoint x="3591" z="4093" y="92">	</waypoint>
	<!-- # 69 --><waypoint x="3686" z="4022" y="92">	</waypoint>
	<!-- # 70 --><waypoint x="3572" z="3929" y="92">	</waypoint>
	<!-- # 71 --><waypoint x="3506" z="3836" y="92">
		getecandle()
	</waypoint>		<!-- check/get candle -->
	<!-- # 72 --><waypoint x="3681" z="3549" y="92">
		getecandle()
	</waypoint> <!-- actual coords -->
	<!-- # 73 --><waypoint x="3827" z="3577" y="92">
		getecandle()
	</waypoint>		<!-- check/get candle -->
	<!-- # 74 --><waypoint x="3662" z="3621" y="92">	</waypoint>
	<!-- # 75 --><waypoint x="3584" z="3574" y="92">	</waypoint>
	<!-- # 76 --><waypoint x="3632" z="3493" y="92">	</waypoint>
	<!-- # 77 --><waypoint x="3948" z="3488" y="92">
		teleportToWP()
	</waypoint>
	<!-- # 78 --><waypoint x="3981" z="3449" y="34">
		player:target_Object(114080, nil, nil, true);
		yrest(5000)
		teleportToWP()
	</waypoint>
	<!-- # 79 --><waypoint x="3978" z="3499" y="74">	</waypoint>
	<!-- # 80 --><waypoint x="3979" z="3547" y="74">	</waypoint>
	<!-- # 81 --><waypoint x="3948" z="3559" y="92">	</waypoint>
	<!-- # 82 --><waypoint x="3840" z="3573" y="92">
		getecandle()
	</waypoint>		<!-- check/get candle -->
	<!-- # 83 --><waypoint x="4012" z="3551" y="92">
		getecandle()
	</waypoint>		<!-- check/get candle -->
	<!-- # 84 --><waypoint x="4036" z="3616" y="92">	</waypoint>
	<!-- # 85 --><waypoint x="4089" z="3585" y="92">	</waypoint>
	<!-- # 86 --><waypoint x="4102" z="3527" y="92">
		teleportToWP()
	</waypoint>
	<!-- # 87 --><waypoint x="4110" z="3525" y="34">
		player:target_Object(114080, nil, nil, true);
		yrest(5000)
		teleportToWP()
	</waypoint>
	<!-- # 88 --><waypoint x="4077" z="3588" y="92">	</waypoint>
	<!-- # 89 --><waypoint x="4031" z="3626" y="92">	</waypoint>
	<!-- # 90 --><waypoint x="4111" z="3805" y="92">	</waypoint>
	<!-- # 91 --><waypoint x="4169" z="3837" y="92">
		getecandle()
	</waypoint> <!-- actual coords -->
	<!-- # 92 --><waypoint x="3984" z="4074" y="92">	</waypoint>
	<!-- # 93 --><waypoint x="4007" z="4128" y="92">
		getecandle()
	</waypoint>		<!-- check/get candle -->
	<!-- # 94 --><waypoint x="3873" z="4097" y="92">
		getecandle()
	</waypoint> <!-- actual coords -->
	<!-- # 95 --><waypoint x="4070" z="3970" y="92">	</waypoint>
	<!-- # 96 --><waypoint x="4081" z="3821" y="92">
		teleportToWP()
	</waypoint>
	<!-- # 97 --><waypoint x="4047" z="3813" y="75">	</waypoint>
	<!-- # 98 --><waypoint x="4013" z="3812" y="75">
		teleportToWP()
	</waypoint>
	<!-- # 99 --><waypoint x="3972" z="3800" y="92">	</waypoint>
	<!-- #100 --><waypoint x="3835" z="3629" y="92">
		getecandle()
	</waypoint> <!-- actual coords -->
	<!-- #101 --><waypoint x="3657" z="3728" y="92">
		getecandle()
	</waypoint>		<!-- check/get candle -->
	<!-- #102 --><waypoint x="3711" z="3897" y="92">	</waypoint>
	<!-- #103 --><waypoint x="3847" z="4029" y="92">
		getecandle()
	</waypoint> <!-- actual coords -->
	<!-- #104 --><waypoint x="4021" z="3944" y="92">
		teleportToWP()
	</waypoint>
	<!-- #105 --><waypoint x="4021" z="3944" y="34">
		player:target_Object("Elemental Candlestick", nil, nil, true);
		flyoff()
		player:rest(10)
	</waypoint>		<!-- check/get candle then wait 15 seconds -->
	<!-- #106 --><waypoint x="3964" z="3845" y="34">	</waypoint>
	<!-- #107 --><waypoint x="3911" z="3749" y="34">	</waypoint>
	<!-- #108 --><waypoint x="3751" z="3742" y="34">	</waypoint>
	<!-- #109 --><waypoint x="3714" z="3845" y="34">	</waypoint>
	<!-- #110 --><waypoint x="3792" z="3789" y="34">
		player:target_Object(114080, nil, nil, true);
		yrest(5000)
	</waypoint>
	<!-- #111 --><waypoint x="3699" z="3802" y="34">	</waypoint>
	<!-- #112 --><waypoint x="3773" z="3945" y="34">	</waypoint>
	<!-- #113 --><waypoint x="3840" z="3945" y="34">	</waypoint>
	<!-- #114 --><waypoint x="3842" z="3838" y="49">
			--=== Create table for material chests ===--
			chests = {left = {}, right = {}}

			local objectList = CObjectList();
			objectList:update();
			local objSize = objectList:size()

			for i = 0,objSize do
				local obj = objectList:getObject(i);
				if obj.Id == 113617 then
					if obj.X > 3878 then -- left side
						table.insert(chests.left, table.copy(obj))
					else -- right side
						table.insert(chests.right, table.copy(obj))
					end
				end
			end

			-- Sort chests
			table.sort(chests.left, function(a,b) return b.Z > a.Z end)
			table.sort(chests.right, function(a,b) return a.Z > b.Z end)

			-- Get left side
			for k,v in pairs(chests.left) do
				player:target(v.Address);
				Attack()
				yrest(2000)
				Attack()
				yrest(2000)
				repeat
					yrest(2000)
					player:update()
				until not player.Casting
			end

			-- Get right side
			for k,v in pairs(chests.right) do
				player:target(v.Address);
				Attack()
				yrest(2000)
				Attack()
				yrest(2000)
				repeat
					yrest(2000)
					player:update()
				until not player.Casting
			end
	</waypoint>
	<!-- #115 --><waypoint x="3842" z="3838" y="49">
			--=== Create table for rune and mount chests ===--
			chests = {runes = {}, mount = {}}

			local objectList = CObjectList();
			objectList:update();
			local objSize = objectList:size()

			for i = 0,objSize do
				local obj = objectList:getObject(i);
				if obj.Id == 113618 or obj.Id == 113619 then
					if obj.Z > 3825 then -- mount
						table.insert(chests.mount, table.copy(obj))
					else -- runes
						table.insert(chests.runes, table.copy(obj))
					end
				end
			end

			-- Sort chests
			table.sort(chests.mount, function(a,b) return b.X > a.X end)
			table.sort(chests.runes, function(a,b) return a.X > b.X end)

			-- Get mount
			for k,v in pairs(chests.mount) do
				player:target(v.Address);
				Attack()
				yrest(2000)
				Attack()
				yrest(2000)
				repeat
					yrest(2000)
					player:update()
				until not player.Casting
			end

			-- Get runes
			for k,v in pairs(chests.runes) do
				player:target(v.Address);
				Attack()
				yrest(2000)
				Attack()
				yrest(2000)
				repeat
					yrest(2000)
					player:update()
				until not player.Casting
			end
		player:target_Object("Transport Candlestick");
		RoMScript("StaticPopup_OnClick(StaticPopup1, 1);")
		waitForLoadingScreen();
		error("Bot finished", 0);
	</waypoint>
</waypoints>
