<?xml version="1.0" encoding="utf-8"?><waypoints>
<onLoad>
<!--**************************************************************************************************************************************************************
******************************************************************************************************************************************************************
**																			PARTY.XML																			**
**																	Waypoint Create by Xm3n																		**
**																																								**
**															Thanks to Lisa, M4gm4, and all other tester															**
**																																								**
******************************************************************************************************************************************************************
***************************************************************************************************************************************************************-->

<!-- ##Version 0.3.0 Beta##												Options
##################################################################################################################################################################
##																	CHANGE FOLOW OPTION																			##
##				on line 34				changeProfileOption("INV_AUTOSELL_FROMSLOT", xx)		The 60 first bagslots coming from Itemshop						##
##						35				changeProfileOption("INV_AUTOSELL_TOSLOT", xxx)			240 it's the max												##
##						36				Slots = xxx												"1" is the first slot form you bag pack.						##
##																								"180" is the last possible slot									##
##																																								##
##						37				dura = xxx												/100% = 1 / / 50% = 0.5 / / 10% = 0.1/							##
##						38				instancebuff = true										true= On / false = Off 											##
##						44				Grassland_Mix = true									Set to true if you want use Grassland Mix						##
##						45-47			Magic_xxx = main_true									Set to main_true if you want use the magic_instruments 			##
##																								from party leader												##
##																																								##
##																								Set to party_true if you want use the magic_instruments			##
##																								form party menber												##
##																																								##
##																								Set to false if you want to disable								##
##																																								##
###############################################################################################################################################################-->

					changeProfileOption("INV_AUTOSELL_FROMSLOT", 60)
					changeProfileOption("INV_AUTOSELL_TOSLOT", 120)
					Slots = 59
					dura = 0.9
					instancebuff = false

					--==New on Ver. 0.3==--
					changeProfileOption("INV_AUTOSELL_ENABLE", "true")
					changeProfileOption("EGGPET_ENABLE_ASSIST", "false")

					Grassland_Mix = main_true
					Magic_Lute = main_true
					Magic_Tambourine = main_true
					Magic_Guitar = false

<!--++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++..==Start Functions==..+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
																		###################
																		###!!!WARNING!!!###
																		###################
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++DONT CHANGE THE FOLLOW LINE+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-->

					__WPL:setWaypointIndex(__WPL:findWaypointTag("start"))
					
					changeProfileOption("LOOT_IN_COMBAT", "false")
					changeProfileOption("AUTO_ELITE_FACTOR", 1000)
					changeProfileOption("HARVEST_DISTANCE", 50)
					
					BuffCount = 0
					Count = 0
					zid = 0

					if not eventparty then
						function eventparty()
							checkeventparty()
						end
					end

					if not checkeventparty then 
						--cprintf(cli.red, "\t\t\t !!!Fatal error!!!\nMicroMacro Stop\nPlease instal the user function \"userfunction_partymonitoring.lua\" \n")
						function checkeventparty()
						close()
						end
					end

					function Countround()
						Count = Count+1;
						cprintf(cli.pink, "Round Nbr: %s\n\n", Count)
					end

					function checkdura()
						if dura > inventory:getMainHandDurability() then
							__WPL:setWaypointIndex(__WPL:findWaypointTag("mech"))
						end

						occupiedSlots, totalSlots = sendMacro("GetBagCount();")
						if(  occupiedSlots > Slots ) then
							__WPL:setWaypointIndex(__WPL:findWaypointTag("mech"))
						end
					end

					function Boss_buff()
						if useGoodie then 
							if Grassland_Mix == true then 
								if inventory:itemTotalCount(206874) > 1 then
									useGoodie(206874)
								end
							else
								cprintf(cli.yellow, "Please instal the user function \"useGoodie\" \n")
							end 
						end

						cprintf(cli.pink, "\n\n\nWaypoint create by Xm3n\n\n\n")

						if Magic_Tambourine == party_true then
							if inventory:itemTotalCount(204463) >= 1 then
								inventory:useItem(204463) -- 3 days
								yrest(4000)
							elseif inventory:itemTotalCount(204571) >= 1 then
								inventory:useItem(204571) -- 7 days
								yrest(4000)
							elseif inventory:itemTotalCount(206420) >= 1 then
								inventory:useItem(206420) -- 30 days
								yrest(4000)
							end
						elseif Magic_Tambourine == main_true then
								yrest(4000)
						end

						if Magic_Lute == party_true then
							if inventory:itemTotalCount(204544) >=1 then
								inventory:useItem(204544) -- 3 days
								yrest(4000)
							elseif inventory:itemTotalCount(204570) >= 1 then
								inventory:useItem(204570) -- 7 days
								yrest(4000)
							elseif inventory:itemTotalCount(206419) >= 1 then
								inventory:useItem(206419) -- 30 days
								yrest(4000)
							end
						elseif Magic_Lute == main_true then
								yrest(4000)
						end

						if  Magic_Guitar == party_true then
							if inventory:itemTotalCount(204461) >= 1 then
								inventory:useItem(204461) -- 3 days
								yrest(4000)
							elseif inventory:itemTotalCount(206418) >= 1 then
								inventory:useItem(206418) -- 7 days
								yrest(4000)
							elseif inventory:itemTotalCount(204569) >= 1 then
								inventory:useItem(204569) -- 30 days
								yrest(4000)
							end
						elseif  Magic_Guitar == main_true then
								yrest(4000)	
						end
					end

					function findzi()
						keyboardHold( settings.hotkeys.MOVE_FORWARD.key )
						yrest(500)
						keyboardRelease( settings.hotkeys.MOVE_FORWARD.key )
						waitForLoadingScreen(2)
						local getinlvl = sendMacro('GetInstanceLevel()')
						if getinlvl == ("easy") then
							zid = 128
						elseif getinlvl == ("normal") then
							zid = 127
						elseif getinlvl == ("hard") then
							zid = 000
						end
					end

					function selfname()
						sname = RoMScript("UnitName('player')")
						yrest(500)
						cprintf(cli.blue, "Player name is : %s\n", sname)
						sendpartychat(sname)
					end

					function gcheck()
						local _go = false
						local groupnumber = RoMScript("GetNumPartyMembers()")
						if groupnumber == 0 then
							_go = false
						else
							_go = true
						end
						return _go
					end

					function getbuff()
						player:harvest(114982)
						player:update() 
						if player:hasBuff(506432) then
							__WPL:setWaypointIndex(__WPL:findWaypointTag("havebuff"))
						else
							BuffCount = BuffCount+1
							if BuffCount > 8 then
								__WPL:setWaypointIndex(__WPL:findWaypointTag("havebuff"))
							end
						end
					end
</onLoad>
	<!-- #  1 -->
				<waypoint x="1667" z="-4926" y="763" tag="start" type="TRAVEL">
					checkdura()
				</waypoint>
	<!-- #  2 -->
				<waypoint x="1678" z="-5092" y="772" tag="enter" type="TRAVEL">
					local groupnumber = RoMScript("GetNumPartyMembers()")
					if gcheck() == false then 
						cprintf(cli.red, "--==Not in a Groupe==--\n")
						repeat
						until gcheck() == true
						__WPL:setWaypointIndex(__WPL:findWaypointTag("enter"))
					else
						keyboardPress(key.VK_SPACE)
						repeat
						until checkparty(80) == true
						selfname()
						yrest(1000)
					end

				</waypoint>
	<!-- #  3 -->
				<waypoint x="1694" z="-5174" y="772" type="TRAVEL">	
					findzi()
					yrest(1000)
					local zoneid = RoMScript("GetZoneID()")
					if zoneid == 209 then
						__WPL:setWaypointIndex(__WPL:findWaypointTag("enter"))
					end
					repeat
					until checkparty(500) == true
				</waypoint>
	<!-- #  4 -->
				<waypoint x="1793" z="2880" y="433">		</waypoint>
	<!-- #  5 -->
				<waypoint x="1911" z="2859" y="433" >		</waypoint>
	<!-- #  6 -->
				<waypoint x="2036" z="2702" y="433">		</waypoint>
	<!-- #  7 -->
				<waypoint x="2252" z="2444" y="401" tag="wboss">
					keyboardPress(key.VK_SPACE)
					repeat
					until checkparty(100) == true
					player:clearTarget()
					changeProfileOption("AUTO_ELITE_FACTOR", 1000)
					Boss_buff()
					sendMacro('TargetNearestEnemy()')
					player:fight()
				</waypoint>
	<!-- #  8 -->
				<waypoint x="2191" z="2520" y="401" type="TRAVEL">
					if instancebuff == true then
						player:update() 
						if player:hasBuff(506432) then
							__WPL:setWaypointIndex(__WPL:findWaypointTag("buffok"))
						else
							__WPL:setWaypointIndex(__WPL:findWaypointTag("getbuff"))
						end
					else
						__WPL:setWaypointIndex(__WPL:findWaypointTag("buffok"))
					end
				</waypoint>
	<!-- #  9 -->
				<waypoint x="2465" z="2338" y="401" tag="getbuff" type="TRAVEL">	</waypoint>
	<!-- # 10 -->
				<waypoint x="2687" z="2340" y="432" type="TRAVEL">	</waypoint>
	<!-- # 11 -->
				<waypoint x="2707" z="2389" y="432" tag="object">
					getbuff()
				</waypoint>
	<!-- # 12 -->
				<waypoint x="2756" z="2346" y="432">
					getbuff()
				</waypoint>
	<!-- # 13 -->
				<waypoint x="2792" z="2444" y="432">
					getbuff()
				</waypoint>
	<!-- # 14 -->
				<waypoint x="2693" z="2476" y="432">
					getbuff()
				</waypoint>
	<!-- # 15 -->
				<waypoint x="2768" z="2546" y="432">
					player:harvest(114982)
					player:update() 
					if player:hasBuff(506432) then
						__WPL:setWaypointIndex(__WPL:findWaypointTag("havebuff"))
					else
						BuffCount = BuffCount+1
						if BuffCount > 8 then
							__WPL:setWaypointIndex(__WPL:findWaypointTag("havebuff"))
						else
							__WPL:setWaypointIndex(__WPL:findWaypointTag("object"))
						end
					end
				</waypoint>
	<!-- # 16 -->
				<waypoint x="2712" z="2340" y="432" tag="havebuff" type="TRAVEL">	</waypoint>
	<!-- # 17 -->
				<waypoint x="2290" z="2357" y="401" type="TRAVEL">	</waypoint>
	<!-- # 18 -->
				<waypoint x="2192" z="2520" y="401" type="TRAVEL">	</waypoint>
	<!-- # 19 -->
				<waypoint x="2191" z="2520" y="401" tag="buffok" type="TRAVEL">
					BuffCount = 0
				</waypoint>
	<!-- # 20 -->
				<waypoint x="1994" z="2762" y="433" type="TRAVEL">	</waypoint>
	<!-- # 21 -->
				<waypoint x="1891" z="2876" y="433" tag="exit" type="TRAVEL">	</waypoint>
	<!-- # 22 -->
				<waypoint x="1700" z="2886" y="433" type="TRAVEL">
					findzi()
					local zoneid = RoMScript("GetZoneID()")
						if zoneid == zid then
							__WPL:setWaypointIndex(__WPL:findWaypointTag("exit"))
						else
							__WPL:setWaypointIndex(__WPL:findWaypointTag("start"))
						end
				</waypoint>
	<!-- # 23 -->
			<waypoint x="1707" z="-4755" y="752" tag="mech" type="TRAVEL">
				--player:merchant(115536)  --== no more works on Chapter IV ==--
				if player:openStore(115536) then
					for i, item in pairs(inventory.BagSlot) do
						if item.SlotNumber >= settings.profile.options.INV_AUTOSELL_FROMSLOT and settings.profile.options.INV_AUTOSELL_TOSLOT >= item.SlotNumber then
							item:use() -- sells it to the store
						end
					end
				end
				__WPL:setWaypointIndex(__WPL:findWaypointTag("enter"))
			</waypoint>
</waypoints>
