
begintalkscript;

variables;

begintalknode 1;
	state = -1;
	nextstate = 1;
	question = "Duck";
	text1 = "The rubber duck notices that you're here. It ceases its mutterings about a lost top hat, and quacks happily. _Adventurers!_ it says. Wait. Did the duck just talk?";
	text2 = "_I am Duck. I used to be Duck in a Top-Hat, but I lost my hat when I was designing this cave. Anyway, how are you liking my scenario?_";
	code = 
		set_flag(3,5,1);
	break;
begintalknode 2;
	state = 1;
	nextstate = 2;
	condition = get_flag(3,3) == 0;
	question = "What are you doing here?";
	text1 = "Duck quacks in annoyance. _I'm just here to see the turnout at my new scenario. I designed this place so I could have a little rest. I would be up and making my next scenario, but I went and dropped my hat somewhere in this tunnel._";

begintalknode 3;
	state = 2;
	nextstate = 3;
	question = "You lost your hat?";
	text1 = "Duck closes his eyes and counts to ten. _Yes, I lost my hat. Are you here to rub it in?_";

begintalknode 4;
	state = 3;
	nextstate = -1;
	question = "We could find your hat.";
	text1 = "_Really?_ asks Duck. _You would do that? Wonderful. I think I dropped it somewhere to the east. I would have gotten it myself, but I can't leave my pond._";

begintalknode 5;
	state = 2;
	nextstate = -1;
	condition = has_item(446) == 1;
	question = "We found your hat.";
	text1 = "Duck quacks happily. _Really? That's wonderful. Now I can finally leave here!_";
	text2 = "He takes the hat from you. He closes his eyes and concentrates on something. Suddenly you all gain experience. This must be some Designer Magick.";
	action = END_TALK;
	code = 
		set_flag(3,3,1);
		award_party_xp(250,5);
		take_all_of_item(446);
	break;

begintalknode 7;
	state = 1;
	nextstate = -1;
	question = "How can we leave this tunnel?";
	text1 = "Duck thinks. _I could open a portal with my Designer Magick and teleport you back. But first, find my hat._";

begintalknode 8;
	state = 1;
	nextstate = -1;
	condition = get_flag(3,3) == 1;
	question = "Can you open a portal now?";
	text1 = "Duck concentrates hard and uses his Designer Magick. _There. Just go through the hole I've made to the south and enter the portal._";
	code = 
		set_flag(3,3,2);
		set_terrain(6,34,0);
		set_terrain(7,34,0);
		set_terrain(8,34,0);
		set_terrain(9,34,0);
		force_instant_terrain_redraw();
	break;
