<?xml version="1.0" encoding="utf-8"?><waypoints>
<onLoad>
<!--**************************************************************************************************************************************************************
******************************************************************************************************************************************************************
**																		   MAIN.XML																				**
**														Waypoint Create by Solembum05 Based on Xm3n's work !														**
**																																								**
**																	Thanks to Lisa & Kuripot !																	**
**																																								**
******************************************************************************************************************************************************************
***************************************************************************************************************************************************************-->

<!--                       												Options
##################################################################################################################################################################
##																	CHANGE FOLOW OPTION																			##
##																																								##
##		on line 22				changeProfileOption("INV_AUTOSELL_ENABLE", "true")			set to true if you sell bag contents								##
##				23				changeProfileOption("INV_AUTOSELL_FROMSLOT", xx)			1-180 (1-30 is the first bag 1-60 sec. ...)							##
##				24				changeProfileOption("INV_AUTOSELL_TOSLOT", xxx)				1-180 (1-30 is the first bag 1-60 sec. ...)							##
###############################################################################################################################################################-->

	changeProfileOption("INV_AUTOSELL_ENABLE", "true")
	changeProfileOption("INV_AUTOSELL_FROMSLOT", 61)
	changeProfileOption("INV_AUTOSELL_TOSLOT", 180)

<!--++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++..==Start Functions==..+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
																		###################
																		###!!!WARNING!!!###
																		###################
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++DONT CHANGE THE FOLLOW LINE+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-->

	<!-- # FUNCTION TO DEFINE ORIGIN'S WAYPOINT -->
		__WPL:setWaypointIndex(__WPL:findWaypointTag("start"))	

	<!-- # FUNCTION COUNT MECH -->
		Mcount = 0
		function Mcountround()
			Mcount = Mcount+1;
		end
		
	<!-- # FUNCTION COUNT DEAD -->
		Dcount = 0
		function Dcountround()
			Dcount = Dcount+1;
		end	
		
	<!-- # FUNCTION COUNT BUG -->
		Bcount = 0
		function Bcountround()
			Dcount = Bcount+1;
		end	
		
	<!-- # FUNCTION COUNT ANCIENT MEMENTO -->
		Acount = 0
		function Acountround()
			Acount = Count*4;
		end
		
	<!-- # FUNCTION COUNT RUN -->
		Count = 0
		function Countround()
			Count = Count+1;
		end
					
	<!-- # FUNCTION CHECKS STRUCTURE ARMS -->
		function checkdura()
			local dura = inventory:getMainHandDurability();
			if 95 > dura 
				then __WPL:setWaypointIndex(__WPL:findWaypointTag("mech"))
			end
		end	
		
	<!-- # FUNCTION BLOWS PNJ -->
		function repair()
			local bcount = inventory:getItemCount(0)
			if(  5 > bcount ) 
				then __WPL:setWaypointIndex(__WPL:findWaypointTag("mech"))
			end
		end
					
	<!-- # FUNCTION GROUP -->
		function ireset()
			SlashCommand("ILG destroy")
			yrest(500)
			SlashCommand("ILG inv")
		end		
		
	<!-- # FUNCTION INFORMATION -->
		function Info()
			cprintf(cli.pink, "\nNbr Round: %s for %s Memento\n", Count, Acount)
			cprintf(cli.yellow, "Nbr Mech: %s\n", Mcount)
			cprintf(cli.red, "Nbr Dead: %s and Nbr Bug: %s\n", Dcount, Bcount)
			cprintf(cli.blue, "Have nice farm on DoD !\nWaypoint Create by Solembum05 Based on Xm3n's work !\n\n\n")
		end
	
</onLoad>		

						<!-- # WAYPOINT MEADOW TO ENTER+GROUP -->
	<!-- #  1 --> <waypoint x="1645" z="-4908" y="752" tag="start" type="TRAVEL"> repair() player:update() checkdura() yrest(500) </waypoint>
	<!-- #  2 --> <waypoint x="1649" z="-4918" y="752" type="TRAVEL"> Info() ireset() teleportToWP(3) </waypoint>
	<!-- #  3 --> <waypoint x="1687" z="-5142" y="772" type="TRAVEL"> waitForLoadingScreen() player:cast("ROGUE_PREMEDITATION") teleportToWP(4) </waypoint>
	<!-- #  4 --> <waypoint x="1874" z="2845" y="433"  type="TRAVEL">  </waypoint>
	<!-- #  5 --> <waypoint x="1953" z="2772" y="433" type="TRAVEL"> </waypoint>
	<!-- #  6 --> <waypoint x="2061" z="2658" y="434" type="TRAVEL"> </waypoint>
	<!-- #  7 --> <waypoint x="2190" z="2493" y="401" type="TRAVEL"> </waypoint>
	
						<!-- # WAYPOINT USE PREMIDITATION BEFORE BOSS -->
	<!-- #  8 --> <waypoint x="2297" z="2391" y="401"> player:cast("ROGUE_PREMEDITATION") RoMScript("SetTitleRequest(530724)"); Countround() Acountround() yrest(300) </waypoint>
	<!-- #  9--> <waypoint x="2298"  z="2398"  y="401">	RoMScript("SetTitleRequest(530427)") </waypoint>
	<!-- #  9--> <waypoint x="2125"  z="2605"  y="432">	</waypoint>
	<!-- # 10--> <waypoint x="2061" z="2658" y="434" type="TRAVEL"> </waypoint>
	<!-- # 11--> <waypoint x="1953" z="2772" y="433" type="TRAVEL"> </waypoint>	
	<!-- # 12 --> <waypoint x="1876" z="2844" y="433"> </waypoint>	
	
						<!-- # WAYPOINT HIDE'S ROGUE+EXIT+LEAVE GROUP IF NOT PORTAL  -->
	<!-- # 13 --> <waypoint x="1737" z="2883" y="433">
						player:cast("ROGUE_HIDE")
						if not GoThroughPortal() 
							then
								Bcountround()
								ireset()
								waitForLoadingScreen()
								__WPL:setWaypointIndex(__WPL:findWaypointTag("return"))
							else
								__WPL:setWaypointIndex(__WPL:findWaypointTag("start"))
						end </waypoint>						
						
						<!-- # WAYPOINT SELL/REPAIR PNJ -->
	<!-- # 14 --> <waypoint x="1707" z="-4755" y="752" tag="mech">						
						local bcount = inventory:getItemCount(0)
						player:update()
						player:merchant(115536)
						yrest(500)
						local cbcount = inventory:getItemCount(0)
						if bcount == cbcount then
							if player:openStore(115536) then
								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
										item:use() -- sells it to the store
									end
								end
							end
						end
						Mcountround()
						__WPL:setWaypointIndex(__WPL:findWaypointTag("start")) </waypoint>
				
				<!-- # WAYPOINT RETURN -->			
	<!-- # 15 --> <waypoint x="-3812" z="5117" y="30" tag="return" type="TRAVEL">
						player:update()
						if not player.Mounted 
							then player:mount()
						end </waypoint>
						
	<!-- # 16 --> <waypoint x="-3382" z="5466" y="23" type="TRAVEL"> </waypoint>
	<!-- # 17 --> <waypoint x="-3100" z="5624" y="14" type="TRAVEL"> </waypoint>
	<!-- # 18--> <waypoint x="-2918" z="5898" y="25" type="TRAVEL"> </waypoint>
	<!-- # 19 --> <waypoint x="-2627" z="6184" y="23" type="TRAVEL"> </waypoint>
	<!-- # 20 --> <waypoint x="-2482" z="6432" y="28" type="TRAVEL"> </waypoint>
	<!-- # 21 --> <waypoint x="-2490" z="6534" y="43" type="TRAVEL"> </waypoint>
	<!-- # 22 --> <waypoint x="-2602" z="6606" y="62" type="TRAVEL"> </waypoint>
	<!-- # 23 --> <waypoint x="-2836" z="6756" y="52" type="TRAVEL"> </waypoint>
	<!-- # 24 --> <waypoint x="-2859" z="6949" y="52" type="TRAVEL"> </waypoint>
	<!-- # 25 --> <waypoint x="-2904" z="7219" y="-84" type="TRAVEL"> </waypoint>
	<!-- # 27 --> <waypoint x="-2977" z="7237" y="-88" type="TRAVEL"> waitForLoadingScreen() </waypoint>
	<!-- # 28 --> <waypoint x="51" z="-890" y="869" type="TRAVEL">
						player:dismount()
						yrest(200)
						player:target_NPC("Jake Wallanda")
						sendMacro("ChoiceOption(1);")
						waitForLoadingScreen()						
						__WPL:setWaypointIndex(__WPL:findWaypointTag("mech")) </waypoint>
</waypoints>
