<?xml version="1.0" encoding="utf-8"?><waypoints type="TRAVEL">
<onload>
	function respondto(ostrichcmd)
		if     ostrichcmd == "-#" then RoMScript("UseExtraAction(1)")
		elseif ostrichcmd == "#-" then RoMScript("UseExtraAction(2)")
		elseif ostrichcmd == "*!" then RoMScript("UseExtraAction(3)")
		elseif ostrichcmd == "**" then RoMScript("UseExtraAction(4)")
		elseif ostrichcmd == "'*" then RoMScript("UseExtraAction(5)")
		else
			printf("You gave me garbage : "..ostrichcmd)
		end
	end
</onload>
	<!-- #  1 --><waypoint x="2437" z="1065" y="51">
		EventMonitorStart("Test", "WARNING_MESSAGE");
		player:target_NPC(121492) -- Ostrich Nurse
		RoMScript("ChoiceOption(1)"); yrest(500) -- Ok, I would like to know...
		RoMScript("ChoiceOption(1)"); yrest(500) -- I got it.
		player:target_NPC(GetIdName(121470)) -- "Ostrich waiting to be looked after"
		RoMScript("ChoiceOption(1)"); -- I will fulfill your wish.

		local starttime = os.clock()
		repeat
			local time, moreToCome, msg = EventMonitorCheck("Test", "1")
			if msg and string.match(msg, RoMScript("TEXT(\"SC_2012THANKS_NPC_121493_SYSTEM_14\")")) then -- "The ostrich tells you its wish:"
				local wish = string.match(msg,"['#!%*%-]+")
				-- Iterate through every 2 characters
				for cmd in string.gmatch(wish,"..") do
					local buff = player:getBuff(623696) -- Ostrich Mood Time
					if buff and 3 > buff.TimeLeft then
						break
					end
					respondto(cmd)
					yrest(200)
					repeat yrest(100) player:update() until not player.Casting
				end
			end
			yrest(100)
		until os.clock() - starttime > 65 -- The time is up.
		EventMonitorStop("Test");
		player:target_NPC(121492) yrest(500)-- Ostrich Nurse
		RoMScript("ChoiceOption(1)"); yrest(500) -- Collect reward
		printf("Game over.")
		player:sleep()
	</waypoint>
</waypoints>
