<?xml version="1.0" encoding="utf-8"?><waypoints>
<onLoad>
<!--**************************************************************************************************************************************************************
******************************************************************************************************************************************************************
**																		  MAIN.XML																				**
**														 Create by Solembum05 inspired by Xm3n's work !															**
**																																								**
**																Thanks to Lisa, Kuripot & Lolita !																**
**																																								**
******************************************************************************************************************************************************************
***************************************************************************************************************************************************************-->

<!--                       												Options
##################################################################################################################################################################
##																	CHANGE FOLOW OPTION																			##
##																																								##
##		on line 27				dura = XXX													//100% = 100 // 50% = 50 // 10% = 10								##
##		 		28				changeProfileOption("INV_AUTOSELL_ENABLE", "true")			set to true if you sell bag contents								##
##				29				sellbag1 = false											true= Sell / false = No Sell										##
##				30				sellbag2 = false											true= Sell / false = No Sell										##
##				31				sellbag3 = true												true= Sell / false = No Sell										##
##				32				sellbag4 = true												true= Sell / false = No Sell										##
##				33				sellbag5 = true												true= Sell / false = No Sell										##
##				34				sellbag6 = true												true= Sell / false = No Sell										##
###############################################################################################################################################################-->

	dura = 97
	changeProfileOption("INV_AUTOSELL_ENABLE", "true")
	sellbag1 = false
	sellbag2 = false
	sellbag3 = true
	sellbag4 = true
	sellbag5 = true
	sellbag6 = true

<!--++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++..==Start Functions==..+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
																		###################
																		###!!!WARNING!!!###
																		###################
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++DONT CHANGE THE FOLLOW LINE+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-->

	<!-- # FUNCTION TO DEFINE ORIGIN'S WAYPOINT -->
		__WPL:setWaypointIndex(__WPL:findWaypointTag("start"))	

	<!-- # FUNCTION SPEED -->
		function speedbuff()
			if not player:hasBuff("506684") then   
				inventory:useItem(207200);
			end
		end
		
	<!-- # FUNCTION COUNT SELL -->
		Mcount = 0
		function Mcountround()
			Mcount = Mcount+1;
		end
		
	<!-- # FUNCTION COUNT REPAIR -->
		Rcount = 0
		function Rcountround()
			Rcount = Rcount+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()
			if ( dura > inventory:getMainHandDurability() ) 
				then __WPL:setWaypointIndex(__WPL:findWaypointTag("repair"))
			end
		end
		
	<!-- # FUNCTION CHECK BAG -->
		function bag()
			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 Sell: %s and Nbr Repair: %s\n", Mcount, Rcount )
			cprintf(cli.red, "Nbr Dead: %s and Nbr Bug: %s\n", Dcount, Bcount)
			cprintf(cli.blue, "Have nice farm on DoD !\nCreate by Solembum05 inspired by 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"> bag() 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)") speedbuff() </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 -->
	<!-- # 13 --> <waypoint x="1737" z="2883" y="433"> player:cast("ROGUE_HIDE") </waypoint>
	
						<!-- # WAYPOINT EXIT+LEAVE GROUP IF NOT PORTAL  -->
	<!-- # 14--> <waypoint x="1700" z="2886" y="433" type="TRAVEL"> 
						if not waitForLoadingScreen(15)
							then
								Bcountround()
								ireset()
								waitForLoadingScreen()
								__WPL:setWaypointIndex(__WPL:findWaypointTag("return"))
							else
								__WPL:setWaypointIndex(__WPL:findWaypointTag("start"))
						end 	</waypoint>					
						
						<!-- # WAYPOINT REPAIR PNJ -->
	<!-- # 15 --> <waypoint x="1707" z="-4755" y="752" tag="repair">
						player:merchant(115536)
						yrest(500)
						Rcountround()
						__WPL:setWaypointIndex(__WPL:findWaypointTag("start")) </waypoint>
						
						<!-- # WAYPOINT SELL PNJ -->
	<!-- # 16 --> <waypoint x="1707" z="-4755" y="752" tag="mech">					
						player:openStore(115536)
						if sellbag1 == true
							then RoMScript("Sellslots1()")
							   yrest(1000)
						end
						if sellbag2 == true
							then RoMScript("Sellslots2()")
							   yrest(1000)
						end
						if sellbag3 == true
							then RoMScript("Sellslots3()")
							   yrest(1000)
						end
						if sellbag4 == true
							then RoMScript("Sellslots4()")
							   yrest(1000)
						end
						if sellbag5 == true
							then RoMScript("Sellslots5()")
							   yrest(1000)
						end
						if sellbag6 == true
							then RoMScript("Sellslots6()")
							   yrest(1000)
						end

						yrest(1000)
						Mcountround()
						__WPL:setWaypointIndex(__WPL:findWaypointTag("start")) </waypoint>
				
				<!-- # WAYPOINT RETURN -->			
	<!-- # 17 --> <waypoint x="-3812" z="5117" y="30" tag="return" type="TRAVEL">
						player:update()
						if not player.Mounted 
							then player:mount()
						end </waypoint>
						
	<!-- # 18 --> <waypoint x="-3382" z="5466" y="23" type="TRAVEL"> </waypoint>
	<!-- # 19 --> <waypoint x="-3100" z="5624" y="14" type="TRAVEL"> </waypoint>
	<!-- # 20--> <waypoint x="-2918" z="5898" y="25" type="TRAVEL"> </waypoint>
	<!-- # 21 --> <waypoint x="-2627" z="6184" y="23" type="TRAVEL"> </waypoint>
	<!-- # 22 --> <waypoint x="-2482" z="6432" y="28" type="TRAVEL"> </waypoint>
	<!-- # 23--> <waypoint x="-2490" z="6534" y="43" type="TRAVEL"> </waypoint>
	<!-- # 24 --> <waypoint x="-2602" z="6606" y="62" type="TRAVEL"> </waypoint>
	<!-- # 25 --> <waypoint x="-2836" z="6756" y="52" type="TRAVEL"> </waypoint>
	<!-- # 26 --> <waypoint x="-2859" z="6949" y="52" type="TRAVEL"> </waypoint>
	<!-- # 27 --> <waypoint x="-2904" z="7219" y="-84" type="TRAVEL"> </waypoint>
	<!-- # 28 --> <waypoint x="-2977" z="7237" y="-88" type="TRAVEL"> waitForLoadingScreen() </waypoint>
	<!-- # 29 --> <waypoint x="51" z="-890" y="869" type="TRAVEL">
						player:cast("ROGUE_HIDE")
						yrest(200)
						player:target_NPC("Jake Wallanda")
						sendMacro("ChoiceOption(1);")
						waitForLoadingScreen()						
						__WPL:setWaypointIndex(__WPL:findWaypointTag("repair")) </waypoint>
</waypoints>
