<?xml version="1.0" encoding="utf-8"?><waypoints>
<onLoad>

	ZZbeltName = "XXXXXXXX" -- Name of the character you want to send fusion stones to.

	local fusionVendorId
	--player:target_NPC(110576) -- Odeley Prole
	--player:target_NPC(118736) -- Guri Bayber
	local VaranasNpc = player:findNearestNameOrId(110576)
	local FirebootNpc = player:findNearestNameOrId(118736)
	if VaranasNpc and 300 > distance(VaranasNpc, player) then
		fusionVendorId = VaranasNpc.Id
	elseif FirebootNpc and 300 > distance(FirebootNpc, player) then
		fusionVendorId = FirebootNpc.Id
	else
		error("No fusion NPC nearby");
	end
	
	EventMonitorStart("FusionBuy", "CHAT_MSG_WHISPER");
	
	function ZZbuyFusionStones()
		local gold = RoMScript('GetPlayerMoney("copper");')
		if gold >= (60*1980) then
			local stonesSent
			local fusionCount = inventory:itemTotalCount(202999)
			if 60 > fusionCount then
				local toBuy = 60 - fusionCount
				if toBuy > 0 then
					repeat
						player:openStore(fusionVendorId)
						store:buyItem(202999, toBuy)
						repeat
							yrest(100);
						until RoMScript("GetItemQueueInfo(1)") == nil
						inventory:update()
						fusionCount = inventory:itemTotalCount(202999)
						toBuy = 60 - fusionCount
					until inventory:itemTotalCount(202999) >= 60
				end
			end
			RoMCode("CloseWindows()");
			repeat
				yrest(50);
				local time, moreToCome, _name, _msg = EventMonitorCheck("FusionBuy","4,1")
				if (_name == ZZbeltName and _msg == "send") then
					UMM_SendByNameOrId(ZZbeltName,{202999}, 30)
					sendMacro("/w "..ZZbeltName.." 1stsent");
					UMM_SendByNameOrId(ZZbeltName,{202999}, 30)		
					sendMacro("/w "..ZZbeltName.." 2ndsent");
					stonesSent = true
				elseif (_name == ZZbeltName and _msg == "quit") then
					error("Partner out of resources");
				end
			until stonesSent
		else
			sendMacro("/w "..ZZbeltName.." quit");
			error("Out of Gold")
		end
	end
	
	while true do
		if getZoneId() == 2 then
			player:moveTo(CWaypoint(2745,-1627,53),true);
			ZZbuyFusionStones()
			RoMCode("CloseAllWindows()")
			player:moveTo(CWaypoint(2551,-1479,53),true);
			player:target_NPC(110752, true) -- Marliss Sister
			ChoiceOptionByName(getTEXT("SO_ENTERHOME")) -- 'I want to enter my house'
			waitForLoadingScreen()
			player:target_NPC(110758, true) -- Housekeeper
			ChoiceOptionByName(getTEXT("HOUSE_MAID_LEAVE_HOUSE")) -- 'Leave the house'
			waitForLoadingScreen()
		elseif getZoneId() == 80 then
			player:moveTo(CWaypoint(4248,2316,1030),true);
			ZZbuyFusionStones()
			RoMCode("CloseAllWindows()")
			player:moveTo(CWaypoint(4228,2475,1028),true);
			player:moveTo(CWaypoint(3725,2518,1028),true);
			player:target_NPC(118761, true) -- Shaif Rebecca
			ChoiceOptionByName(getTEXT("SO_ENTERHOME")) -- 'I want to enter my house'
			waitForLoadingScreen()
			player:target_NPC(110758, true) -- Housekeeper
			ChoiceOptionByName(getTEXT("HOUSE_MAID_LEAVE_HOUSE")) -- 'Leave the house'
			waitForLoadingScreen()
			player:moveTo(CWaypoint(4228,2475,1028),true);
		else
			error("Not in a correct zone")
		end
	end
</onLoad>

</waypoints>