// TOWN DIALOGUE SCRIPT
//    Town 34: Lava Dome

begintalkscript;

variables;

short i,j,k,r1,choice;

// Goosenargh

begintalknode;
	tag = 10;
	state = -1;
	nextstate = 1;
	question = "Goosenargh";
	text1 = "An imp stands behind the anvil, polishing a long, twisted, wicked-looking sword. She bows and gives you a smug smile. _I am Goosenargh, loyal servant to Kordaddis. Welcome to my humble Shoppe._";
	text5 = "Goosenargh smiles at you, exposing a large assortment of filthy fangs.";
	action = INTRO;

begintalknode;
	state = 1;
	nextstate = 2;
	condition = gf(34,11) == 0;
	question = "_What are you working on?_";
	text1 = "_I make fine imp weapons for Kordaddis._ She picks up and displays the sword. _I take great pride in them._";
	text2 = "_Well, I made weapons for Kordaddis. Now he's all dead._";
	code =
		if (gf(34,11) == 0)
			rs(2);
			else sf(34,19,1);
	break;
	
begintalknode;
	state = 2;
	nextstate = -1;
	condition = gf(34,11) == 0;
	question = "_Your weapons look very nice._";
	text1 = "_Anything humans can do, we can do better._ She smiles, showing many teeth.";

begintalknode;
	state = 2;
	nextstate = 5;
	question = "_Would I be allowed to purchase them?_";
	text1 = "_Yes. A good blade may be helpful if you want to see Kordaddis._ She winks at you saucily.";
	code =
		sf(34,19,1);
	break;
	
begintalknode;
	state = 1;
	condition = gf(34,19) > 0;
	question = "_I'd like to buy some of your weapons._";
	text1 = "You conclude your business.";
	code =
		begin_shop_mode("Goosenargh's Shoppe","Goosenargh's weapons are dented, twisted, and surprisingly dangerous.",37,6,3);
	break;

begintalknode;
	state = 1;
	nextstate = 3;
	question = "_Who is Kordaddis?_";
	text1 = "She looks around to make sure nobody's spying. _That old stiff? That pompous imp with delusions of grandeur? He runs this place. For now. He only rules because he's hidden himself so well._";
	text2 = "_Well, I made weapons for Kordaddis. Now he's dead. The dumb jerk._";
	code =
		if (gf(34,11) == 0)
			rs(2);
			else rs(1);
	break;
	
begintalknode;
	state = 3;
	nextstate = 4;
	condition = gf(34,11) == 0;
	question = "_Where is he hidden?_";
	text1 = "_Hidden very well._ She leans close to you. _But I can tell you how to get to him. You need to get into the passage north of the hordling pit. There's a hint for how to do it, I hear, hidden under one of the bodies in the imp pit._";
	text2 = "_Why don't you go look? If you can kill Kordaddis, you'll be rich!_";

begintalknode;
	state = 4;
	nextstate = -1;
	question = "_How rich are we talking about?_";
	text1 = "_Gems! Gold! Magical tomes! You'll never know until you go!_";

begintalknode;
	state = 1;
	nextstate = -1;
	condition = gf(34,16) >= 1 && gf(34,0) == 0;
	question = "_I read that you hate the word fish, is that true?_";
	text1 = "__";
	code =
	run_hardcode(111);
	break;

begintalknode;
	state = 1;
	nextstate = -1;
	condition = gf(34,11) >= 1;
	question = "_I have killed your master._";
	text1 = "Goosenargh suddenly looks terrified. _You did? Oh dear! They'll find that I helped you! I'm doomed! I must flee!_ She runs screaming from the shop.";
	action = END_TALK;
	code =
		erase_char(3401);
	break;

begintalknode;
	state = 1;
	nextstate = -1;
	condition = gf(34,0) == 1;
	question = "_Fish._";
	code =
	run_hardcode(111);
	break;

begintalknode;
	state = 1;
	nextstate = -1;
	condition = gf(34,0) == 2;
	question = "_Fish!_";
	code =
	run_hardcode(111);
	break;

begintalknode;
	state = 1;
	nextstate = -1;
	condition = gf(34,0) == 3;
	question = "_Fish fish fish!_";
	code =
	run_hardcode(111);
	break;

begintalknode;
	state = 1;
	nextstate = -1;
	condition = gf(34,0) >= 4;
	question = "_Thanks for the help with Kordaddis._";
	text1 = "She shakes her head. _Oh, I will pay for this. I will suffer for helping you! Don't tell Kordaddis!_ She snivels.";

begintalknode;
	state = 1;
	nextstate = 6;
	condition = gf(34,15) >= 1 && gf(34,16) == 0;
	question = "_Do you have a pipe for sale?_";
	text1 = "Goosenargh grins. _Yes. Yes, I do. Several, in fact. And I can let you have one of them for a mere 1000 coins._";

begintalknode;
	state = 6;
	nextstate = 1;
	question = "_That's ridiculous! I won't pay that!_";
	text1 = "_Well, then you won't get your pipe._ She sticks her forked tongue out at you.";

begintalknode;
	state = 6;
	nextstate = -1;
	question = "_Fine._ (Pay 1000 coins.)";
	action = END_TALK;
	code =
	run_hardcode(51);
	break;
	
begintalknode;
	state = 1;
	nextstate = -1;
	condition = gf(34,17) > 0;
	question = "_Now that I have your secret, I can slay you!_ Attack.";
	text1 = "_What? No! Aaaaahhh!_";
	action = END_TALK;
	code =
		set_attitude(3401,10);
		sf(34,12,1);
	break;
	
begintalknode;
	state = 1;
	nextstate = -1;
	condition = 1;
	question = "_I don't need anything._";
	text1 = "_Then go away. Stupid._";
	action = END_TALK;
