<?xml version="1.0" encoding="utf-8"?><waypoints type="TRAVEL">

<onLoad>

repeater = 10;										--here you can setup to the number's of repeating , if its= -1 it doing while you have TP

function haveTicket()
	local have=false;
	if 	player:hasBuff("Elegant Proof of Purchase") then
		have = true;
	end;	
	return have;
end

successful = false;

function backMove()
		keyboardHold( settings.hotkeys.MOVE_BACKWARD.key );
		yrest(1400);
		keyboardRelease( settings.hotkeys.MOVE_BACKWARD.key );
end

function findMOB(_range)
	printf("\n Mob find starting.\n");
	if RoMScript("ExtraActionBarFrame:IsVisible()") then printf("\n Actionbar visible.\n"); end;
	local height = 80;
	player:updateXYZ();
	while RoMScript("ExtraActionBarFrame:IsVisible()") do
		local obj = nil;
		local objectList = CObjectList();
		objectList:update();		
		for i = 0,objectList:size() do
			local obj = objectList:getObject(i);
			if (  obj ~= nil ) then	
				if ((obj.Name=="Kokomo") or (obj.Name=="Wood Cavy") or (obj.Name=="Baabaa Sheep")) then
					if ( _range >= math.floor (distance(obj.X,obj.Z,player.X,player.Z)) 
						and height >= math.floor (math.abs(obj.Y-player.Y))  ) 	   then
						--player:target(obj)
						--player.TargetPtr = obj.Address
						player:target(obj.Address);
						RoMScript("UseExtraAction(1)");
						yrest(100);
					end;
				end;
			end;
		end;
	end;
	successful=true;
end

</onLoad>

	<!-- #  1 --><waypoint x="3103" z="161" y="56" tag="Start">
	if haveTicket() then
		__WPL:setWaypointIndex(__WPL:findWaypointTag("banch3"));
	end;
	if repeater ==0 then
		os.exit();
	end;	
	if (repeater >= 1  or repeater == -1) then
		if (inventory:itemTotalCount("Transport Rune") >= 1) then
			if repeater>0 then
				repeater = repeater-1;
			end;
			__WPL:setWaypointIndex(__WPL:findWaypointTag("Npccc"));
		end;
	end;
		</waypoint>
	
	<!-- #  2 --><waypoint x="3092" z="156" y="56" tag="Npccc">
	if successful==true then 
		yrest(300);
		player:target_NPC("Waysie Stainbrick");
		yrest(300);
		sendMacro("ChoiceOption(2);");				--I've completed the game.
		yrest(300);
		sendMacro("CloseAllWindows()");
		successful=false;	
	end;
		yrest(300);
		player:target_NPC("Waysie Stainbrick");
		yrest(300);
		sendMacro("ChoiceOption(2);");				--I want to take part in the event
		yrest(300);
		sendMacro("ChoiceOption(1);");				--Hand over the transport rune.
		yrest(300);
		sendMacro("CloseAllWindows()");
	</waypoint>
	
	
----------------------------------------------------------------------------------------	
	<!-- #  3 --><waypoint x="3060" z="9" y="56" tag="banch3">
		if 	player:hasBuff("Elegant Proof of Purchase") then
			lookatTarget(2668,70,44);yrest(1500);
			local _banch = player:findNearestNameOrId({120393})
			if _banch then
				player:target(_banch.Address);
				player:target_Object(_banch.Id,nil,false,false);
				printf("\n Click to the banch its OK.\n");
			end;
			if 	not player:hasBuff("Elegant Proof of Purchase") then
				findMOB(120);
				backMove();
				__WPL:setWaypointIndex(__WPL:findWaypointTag("Start"));
			else __WPL:setWaypointIndex(__WPL:findWaypointTag("banch2"));
			end;
		end;
	</waypoint>
	<!-- #  4 --><waypoint x="3054" z="64" y="56" tag="banch2">
		if 	player:hasBuff("Elegant Proof of Purchase") then
			lookatTarget(2668,70,44);yrest(1500);
			local _banch = player:findNearestNameOrId({120392})
			if _banch then
				player:target(_banch.Address);
				player:target_Object(_banch.Id,nil,false,false);
				printf("\n Click to the banch its OK.\n");				
			end;
			if 	not player:hasBuff("Elegant Proof of Purchase") then
				findMOB(120);
				backMove();
				__WPL:setWaypointIndex(__WPL:findWaypointTag("Start"));
			else __WPL:setWaypointIndex(__WPL:findWaypointTag("banch1"));
			end;
		end;
	</waypoint>
	<!-- #  5 --><waypoint x="3063" z="111" y="57" tag="banch1">
		if 	player:hasBuff("Elegant Proof of Purchase") then
			lookatTarget(2668,70,44);yrest(1500);
			local _banch = player:findNearestNameOrId("Mr Swallowtail's Toss of Elegance");
			if _banch then
				player:target(_banch.Address);
				player:target_Object(_banch.Id,nil,false,false);
				printf("\n Click to the banch its OK.\n");				
			end;			
			if 	not player:hasBuff("Elegant Proof of Purchase") then
				findMOB(120);
				backMove();
				__WPL:setWaypointIndex(__WPL:findWaypointTag("Start"));
			end;
		end;
	</waypoint>
-----------------------------------------------------------------------------------------	

	
</waypoints>