<?xml version="1.0" encoding="utf-8"?><waypoints>
<onLoad>
<!--**************************************************************************************************************************************************************
******************************************************************************************************************************************************************
**																		   MAIN.XML																				**
**														Waypoint Create by Pseudo Based on Xm3n's work !														**
**																																								**
**																	Thanks to Lisa & Kuripot !																	**
**																																								**
******************************************************************************************************************************************************************
***************************************************************************************************************************************************************-->

<!--                       												Options
##################################################################################################################################################################
##																	CHANGE FOLOW OPTION																			##
##																																								##
##		on line 23				changeProfileOption("INV_AUTOSELL_ENABLE", "true")			set to true if you sell bag contents								##
##				24				changeProfileOption("INV_AUTOSELL_FROMSLOT", xx)			1-180 (1-30 is the first bag 1-60 sec. ...)							##
##				25				changeProfileOption("INV_AUTOSELL_TOSLOT", xxx)				1-180 (1-30 is the first bag 1-60 sec. ...)							##
##				26				dura = xxx													//100% = 1 // 50% = 0.5 // 10% = 0.1								##
###############################################################################################################################################################-->

	changeProfileOption("INV_AUTOSELL_ENABLE", "true")
	changeProfileOption("INV_AUTOSELL_FROMSLOT", 61)
	changeProfileOption("INV_AUTOSELL_TOSLOT", 180)
	dura = 0.9

<!--++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++..==Start Functions==..+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
																		###################
																		###!!!WARNING!!!###
																		###################
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++DONT CHANGE THE FOLLOW LINE+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-->


	<!-- # FONCTION DEFINIR WAYPOINT D'ORIGINE -->
		__WPL:setWaypointIndex(__WPL:findWaypointTag("start"))	
									
	<!-- # FONCTION COMPTEUR -->
		Count = 0
		function Countround()
			Count = Count+1;
			cprintf(cli.pink, "Round Nbr: %s\n", Count)
			cprintf(cli.pink, "Have nice farm on DoD !\nWaypoint Create by Pseudo Based on Xm3n's work !\n\n\n")
		end
					
	<!-- # FONCTION VENTE PNJ ET CONTROLE STRUCTURE ARME -->
		function checkdura()
			if dura > inventory:getMainHandDurability() then
				__WPL:setWaypointIndex(__WPL:findWaypointTag("mech"))
			end
			
			local bcount = inventory:getItemCount(0)
			if(  5 > bcount ) then
				__WPL:setWaypointIndex(__WPL:findWaypointTag("mech"))
			end
		end	
		
		<!-- # FONCTION POUR LES PAGES DE CHARGEMENTS -->
		zid = 0
		function findzi()					
			keyboardHold( settings.hotkeys.MOVE_FORWARD.key )
			yrest(500)
			keyboardRelease( settings.hotkeys.MOVE_FORWARD.key )
			waitForLoadingScreen()
			yrest(100)
			local getinlvl = sendMacro('GetInstanceLevel()')
			if getinlvl == ("easy") then
				zid = 128
				elseif getinlvl == ("normal") then
				zid = 127
				elseif getinlvl == ("hard") then
				zid = RoMScript("GetZoneID()");
				sendMacro('SetInstanceLevel("easy")');
				cprint(cli.blue, "Instance Lvl change to easy\n")
			end
		end
					
	<!-- # FONCTION DEGROUPE/REGROUPE -->
		function ireset()
			SlashCommand("ILG destroy")
			yrest(500)
			SlashCommand("ILG inv")
		end		
</onLoad>		

						<!-- # WAYPOINT PRE-ENTRER DANS L'INSTANCE+DEGROUPE/REGROUPE & INSTANCE NORMAL -->
	<!-- #  1 --> <waypoint x="1661" z="-4967" y="760" tag="start" type="TRAVEL"> checkdura() Countround() ireset() RoMScript("SetInstanceLevel('normal')");</waypoint>
	<!-- #  2 --> <waypoint x="1687" z="-5142" y="772" type="TRAVEL"> findzi() player:cast("ROGUE_PREMEDITATION") </waypoint>
	<!-- #  3 --> <waypoint x="1906" z="2867" y="433"  type="TRAVEL"> </waypoint>
	<!-- #  4 --> <waypoint x="1976" z="2773" y="433" type="TRAVEL"> </waypoint>
	<!-- #  5 --> <waypoint x="2076" z="2663" y="434" type="TRAVEL"> </waypoint>
	<!-- #  6 --> <waypoint x="2206" z="2503" y="401" type="TRAVEL"> </waypoint>
	
						<!-- # WAYPOINT UTILISATION PREMIDITATION AVANT LE KINDER -->
	<!-- #  7 --> <waypoint x="2297" z="2391" y="401"> player:cast("ROGUE_PREMEDITATION") yrest(600) </waypoint>
	<!-- #  8--> <waypoint x="2298"  z="2398"  y="401">	</waypoint>
	<!-- #  9--> <waypoint x="2125"  z="2605"  y="432">	</waypoint>
	<!-- # 10--> <waypoint x="2025"  z="2719"  y="433" type="TRAVEL"> </waypoint>
	<!-- # 11--> <waypoint x="1925"  z="2838"  y="433" type="TRAVEL"> </waypoint>
	<!-- # 12 --> <waypoint x="1889"  z="2881"  y="433" type="TRAVEL"> </waypoint>
	
						<!-- # WAYPOINT MODE FURTIF VOLEUR ACTIF POUR SORTIR DE L'INSTANCE -->
	<!-- # 13 --> <waypoint x="1762"  z="2877"  y="433"> player:cast("ROGUE_HIDE") </waypoint>
	
						<!-- # WAYPOINT SORTIE INSTANCE+FONCTION DEGROUPE EN CAS DE BUG -->
	<!-- # 14 --> <waypoint x="1700" z="2886" y="433" type="TRAVEL">
						findzi()    
						local zoneid = RoMScript("GetZoneID()")
						if zoneid == zid then
								ireset()
								waitForLoadingScreen()
								__WPL:setWaypointIndex(__WPL:findWaypointTag("return"))
							else
								__WPL:setWaypointIndex(__WPL:findWaypointTag("start"))
						end </waypoint>
						
						<!-- # WAYPOINT VENTE/REPARATION PNJ -->
	<!-- # 15 --> <waypoint x="1707" z="-4755" y="752" tag="mech">						
						local bcount = inventory:getItemCount(0)
						player:update()
						player:merchant(115536)				--== no more works on Chapter IV ==--
						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
						__WPL:setWaypointIndex(__WPL:findWaypointTag("start")) </waypoint>
				
				<!-- # WAYPOINT RETOUR INSTANCE EN CAS DE BUG/MORT -->			
	<!-- # 16 --> <waypoint x="-3812" z="5117" y="30" tag="return" type="TRAVEL">
						player:update()
						if not player.Mounted then
						player:mount()
						end</waypoint>
	<!-- # 17 --> <waypoint x="-3382" z="5466" y="23" type="TRAVEL"> </waypoint>
	<!-- # 18 --> <waypoint x="-3100" z="5624" y="14" type="TRAVEL"> </waypoint>
	<!-- # 19--> <waypoint x="-2918" z="5898" y="25" type="TRAVEL"> </waypoint>
	<!-- # 20 --> <waypoint x="-2627" z="6184" y="23" type="TRAVEL"> </waypoint>
	<!-- # 21 --> <waypoint x="-2482" z="6432" y="28" type="TRAVEL"> </waypoint>
	<!-- # 22 --> <waypoint x="-2490" z="6534" y="43" type="TRAVEL"> </waypoint>
	<!-- # 23 --> <waypoint x="-2602" z="6606" y="62" type="TRAVEL"> </waypoint>
	<!-- # 24 --> <waypoint x="-2836" z="6756" y="52" type="TRAVEL"> </waypoint>
	<!-- # 25 --> <waypoint x="-2859" z="6949" y="52" type="TRAVEL"> </waypoint>
	<!-- # 26 --> <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>
