// TOWN DIALOGUE SCRIPT
//    Town 11: Fresan

// This is the dialogue for this town.
// You can use states numbered from 1 to 199.

begintalkscript;

variables;

short i,j,k,r1,choice;

begintalknode 1;
	state = -1;
	personality = 220;
	nextstate = 1;
	condition = 1;
	question = "Daeghrefn";
	text1 = "A young shipwright walks distractedly about the yard.";
	text2 = "_Ah? I am Daeghrefn._";

begintalknode 2;
	state = 1;
	personality = 220;
	nextstate = 3;
	condition = 1;
	question = "What is your job?";
	text1 = "_Boatmaker. Not a terrific time to be one, I admit, but it'll get better._";

begintalknode 3;
	state = 1;
	personality = 220;
	nextstate = 2;
	condition = 1;
	question = "A boat would be handy actually.";
	text1 = "_Interested in purchasing at all? Only... what is it..._ He counts on his hands briefly. _ Only 800 of your 'gold' each. That's a cheap price in these parts._";

begintalknode 4;
	state = 2;
	personality = 220;
	nextstate = 1;
	condition = 1;
	question = "Yes, we are interested in purchasing one.";
	text1 = "_Good, good._ He takes the cash and hands you a small seal of ownership. _The boat's at the docks just outside._";
	text3 = "He frowns when you try to talk down the price. _Business may be bad, but I'm not going to have haggling over my boats._";
	text5 = "There are no ships left.";
	code =
		clear_strings();
		if (coins_amount() >=800) {
                        if (set_boat_range_property(0,1) >= 0) {
				add_string(1);
                                change_coins(-800);
				}
				else add_string(5);
                }
                else add_string(3);
	break;

begintalknode 5;
	state = 3;
	personality = 220;
	nextstate = 1;
	condition = 1;
	question = "Why is it a terrible time?";
	text1 = "_Sea raiders are harassing fishermen and merchant ships from the west. Not many customers these days._";

begintalknode 6;
	state = 3;
	personality = 220;
	nextstate = 1;
	condition = 1;
	question = "You expect things to get better?";
	text1 = "_I can't tell you too much, but I know the Falconers do not lose wars. We shall defeat them yet._";

begintalknode 9;
	state = -1;
	personality = 221;
	nextstate = 11;
	condition = 1;
	question = "Hemming";
	text1 = "A wearied, middle-aged man reclines back in his chair.";
	text2 = "He sits up and inclines his head. _Hemming, governor of Fresan._";
	text5 = "A wearied, middle-aged man reclines back in his chair.";
	action = INTRO;

begintalknode 10;
	state = 11;
	personality = 221;
	nextstate = 12;
	condition = 1;
	question = "What does being the Governor involve?";
	text1 = "_The burdening task of keeping this town together._";

begintalknode 11;
	state = 12;
	personality = 221;
	nextstate = 13;
	condition = 1;
	question = "Why is it a burden?";
	text1 = "_There is much talk in the town of the pirates' raids. Each week the assaults grow worse. I don't know when they'll be bold enough as to attack openly, and we are not being helped._";
	text3 = "_The situation is improving. I don't know why, but the pirates aren't harassing us as much. It's all for the better._";
	action = DEP_ON_SDF 11 0 0;

begintalknode 12;
	state = 13;
	personality = 221;
	nextstate = 14;
	condition = 1;
	question = "Tell me about these pirates";
	text1 = "_On the western island of Skane dwells a band of rebellious, dangerous raiders. In truth, we have no power now to stop them, for the army is simply dormant. I almost grow suspicious._";

begintalknode 13;
	state = 14;
	personality = 221;
	nextstate = 15;
	condition = 1;
	question = "What is the army doing?";
	text1 = "_Hengest says that they are training and used for other purposes. I am not one to speak out against them, or I wouldn't be here. But I don't know why no aid has come._";

begintalknode 14;
	state = 15;
	personality = 221;
	nextstate = -1;
	condition = 1;
	question = "Training?";
	text1 = "_If that's what they say, that's what I'll believe. But believing never does any good._";
	text2 = "He sighs and reclines back.";

begintalknode 15;
	state = 11;
	personality = 221;
	nextstate = 16;
	condition = 1;
	question = "Tell me about Fresan.";
	text1 = "_The largest township in the realm. Not as grand as Castle Hengest, nor as industrious as the Mines, and prosperity has been down lately, but a ... well, you know what I mean, right?_";

begintalknode 16;
	state = 15;
	personality = 221;
	nextstate = -1;
	condition = 1;
	question = "What is Hengest like?";
	text1 = "_Stronghold of the Falcon, and seat of King Scyld under the shadow of the northern mountains. Mild in the summer, downright freezing in the winter. The army dozes there all the year round._";

begintalknode 17;
	state = 16;
	personality = 221;
	nextstate = 17;
	condition = 1;
	question = "What happens at the mines?";
	text1 = "_They mine iron there. It's a pity there's no gold or silver. All of that comes over ships. And we aren't getting ships, not with the pirates. It all comes from Hatherond now._";
	text3 = "_They mine iron there. It's a pity there's no gold or silver. All of that comes over ships. At least we get ships coming now. Not many, but if the pirates don't attack again soon, it'll get better._";
	action = DEP_ON_SDF 11 0 0;

begintalknode 18;
	state = 17;
	personality = 221;
	nextstate = 18;
	condition = 1;
	question = "How do you feel about Hatherond?";
	text1 = "_They're a greedy lot. We civilized the natives, we gave them stone houses, and smithying skill, and what does the Wolf Clan give us now? Tolls._";

begintalknode 19;
	state = 18;
	personality = 221;
	nextstate = -1;
	condition = 1;
	question = "Tolls sound bad...";
	text1 = "_Tolls, tariffs. Taking advantage of our bad luck. I hope the pirates hit them next._";

begintalknode 22;
	state = -1;
	personality = 222;
	nextstate = 21;
	condition = 1;
	question = "Ecgwela";
	text1 = "Appearing in a constant scowl, this merchant shifts and sorts the wares before him.";
	text5 = "_Ecgwela,_ he spits out.";
	action = INTRO;

begintalknode 23;
	state = 21;
	personality = 222;
	nextstate = 22;
	condition = 1;
	question = "What is your job?";
	text1 = "_Ah? I ... I buy. I buy things in._";

begintalknode 24;
	state = 22;
	personality = 222;
	nextstate = 22;
	condition = 1;
	question = "You buy things...?";
	text1 = "_You have something to sell, I'll take it. I don't care what it is, as long as you can tell me how it works. If you can't, don't bother me._";

begintalknode 25;
	state = 22;
	personality = 222;
	nextstate = -1;
	condition = 1;
	question = "We do have some stuff to offload.";
	text1 = "His mouth twists slightly. _Good. Now let's see what you have._";
	code =	
	begin_shop_mode("Ecgwela's Items","Ecgwela is a rarity among merchants: one willing to take a chance on buying the party's items.",16,5,3);
	break;

begintalknode 28;
	state = -1;
	personality = 223;
	nextstate = 31;
	condition = 1;
	question = "Fitela";
	text1 = "A finely decorated woman tends the counter.";
	text5 = "_Fitela,_ she responds.";
	action = INTRO;

begintalknode 29;
	state = 31;
	personality = 223;
	nextstate = 32;
	condition = 1;
	question = "What is your job?";
	text1 = "_I distribute a variety of valuables._";

begintalknode 30;
	state = 32;
	personality = 223;
	nextstate = 33;
	condition = 1;
	question = "You sell valuable magical items?";
	text1 = "_Some rings and necklaces._ She takes out a few and shows them to you. _Nothing of Thrytho-make, but quite attractive. Interested in any purchases?_";

begintalknode 31;
	state = 32;
	personality = 223;
	nextstate = 32;
	condition = 1;
	question = "Yes, we would like to purchase.";
	text1 = "You finish shopping.";
	code =
		begin_shop_mode("Fitela's Assortment","Fitela sells some basic magical jewellery, just the thing for a party of adventurers.",17,5,3);
	break;

begintalknode 32;
	state = 33;
	personality = 223;
	nextstate = 34;
	condition = 1;
	question = "Tell me about this Thrytho.";
	text1 = "_A traveling sorceress, or so they say._ She shrugs. _I just hear rumors._";

begintalknode 33;
	state = 34;
	personality = 223;
	nextstate = 35;
	condition = 1;
	question = "Rumors are always of interest to us.";
	text1 = "_She gives out gifts. Magical gifts, mostly in form of charms and amulets._";

begintalknode 34;
	state = 35;
	personality = 223;
	nextstate = 32;
	condition = 1;
	question = "Charms and amulets...";
	text1 = "_It's all beyond me. So, interested in any purchases here?_";

begintalknode 37;
	state = -1;
	personality = 224;
	nextstate = 41;
	condition = 1;
	question = "Eadgils";
	text1 = "What looks to be a former soldier leans up against the counter belligerently.";
	text5 = "He booms out, _Eadgils!_ It turns a few heads.";
	action = INTRO;

begintalknode 38;
	state = 41;
	personality = 224;
	nextstate = 42;
	condition = 1;
	question = "What is your job?";
	text1 = "_I sell arms!_ he bellows out. You can't help but wonder if he was like this in the military. He'd have made a model captain.";

begintalknode 39;
	state = 42;
	personality = 224;
	nextstate = 43;
	condition = 1;
	question = "You sell arms...";
	text1 = "_Arms! Weaponry!_ He shakes his head impatiently at your ignorance. _You can buy some, 's long's not for the pirates, or you can leave!_";

begintalknode 40;
	state = 43;
	personality = 224;
	nextstate = 42;
	condition = 1;
	question = "Tell me about the pirates.";
	text1 = "_The Skane pirates, I said. You want to go there? Good luck._ He laughs loudly. _You'd better get some weapons from here first._";

begintalknode 41;
	state = 42;
	personality = 224;
	nextstate = -1;
	condition = 1;
	question = "We are keen to purchase weapons.";
	text1 = "You finish shopping.";
	code =
		begin_shop_mode("Skane's Weaponry","You can't help but wonder if Eagdils was like this in the military. He'd have made a model captain.",18,4,-1);
	break;

begintalknode 44;
	state = -1;
	personality = 225;
	nextstate = 51;
	condition = 1;
	question = "Beanstan";
	text1 = "The crimson-clad shopkeeper stares at you with a wild light in his eyes, breathing heavily.";
	text2 = "_Hhh. Beanstan. Hhh._";


begintalknode 45;
	state = 51;
	personality = 225;
	nextstate = 52;
	condition = 1;
	question = "What is your job?";
	text1 = "_I. It. It came. Again. Hhh. It came._";

begintalknode 46;
	state = 52;
	personality = 225;
	nextstate = 53;
	condition = 1;
	question = "It came again, what is this _it_?";
	text1 = "_Them! Did you see them?_ He looks around frantically, closes his eyes, and controls himself. _I... I guess I'm just paranoid of the pirates. I keep merchandise. Almost any kind of merchandise._";

begintalknode 47;
	state = 53;
	personality = 225;
	nextstate = 51;
	condition = 1;
	question = "What sort of merchandise?";
	text1 = "_Items with mundane qualities. Items with peculiar qualities. Items with many qualities. Items with no qualities at all. All for purchase._";

begintalknode 48;
	state = 51;
	personality = 225;
	nextstate = -1;
	condition = 1;
	question = "We would like to purchase some items.";
	text1 = "You finish shopping.";
	code =
		begin_shop_mode("Beanstan's Items","Beanstan is a bit crazy but he does have a good variety of stock.",26,3,3);
	break;

begintalknode 49;
	state = 53;
	personality = 225;
	nextstate = 51;
	condition = 1;
	question = "What about the pirates?";
	text1 = "He shudders. _No, no. Don't mention them. I don't care. No one cares any more. We just have to be careful. That's all._";
	
	
begintalknode 51;
	state = 51;
	personality = 225;
	nextstate = -1;
	condition = 1;
	question = "See you around.";
	text1 = "You finish shopping.";
	action = END_TALK;


begintalknode 52;
	state = -1;
	personality = 226;
	nextstate = 61;
	condition = 1;
	question = "Weder";
	text1 = "A hooded man stares out curiously.";
	text5 = "_I am Weder._ His voice is thin and barely audible.";
	action = INTRO;

begintalknode 53;
	state = 61;
	personality = 226;
	nextstate = 62;
	condition = 1;
	question = "What is your job?";
	text1 = "_I deal in tools._";

begintalknode 54;
	state = 62;
	personality = 226;
	nextstate = 63;
	condition = 1;
	question = "We could use some tools.";
	text1 = "_Various objects of interest. Purchases are always welcome._";

begintalknode 55;
	state = 63;
	personality = 226;
	nextstate = -1;
	condition = 1;
	question = "What sort of interesting objects?";
	text1 = "_Occasionally useful wares. I'm not like some of my colleagues who openly condone thievery. I just deal in moderately useful tools._";

begintalknode 56;
	state = 63;
	personality = 226;
	nextstate = 62;
	condition = 1;
	question = "We wish to purchase some items.";
	text1 = "You finish shopping.";
	code =
		begin_shop_mode("Weder's Wares","This is the place to go for subtler items.",20,2,-1);
	break;

begintalknode 59;
	state = -1;
	personality = 227;
	nextstate = 71;
	condition = 1;
	question = "Anfal";
	text1 = "A soldier stands alertly behind the desk. Evidently, the correct usage of a desk has never occurred to him.";
	text2 = "He nods. _I am Anfal._";

begintalknode 60;
	state = 71;
	personality = 227;
	nextstate = 72;
	condition = 1;
	question = "What is your job?";
	text1 = "He frowns, perplexed. _It's my post. What else?_";

begintalknode 61;
	state = 72;
	personality = 227;
	nextstate = 73;
	condition = 1;
	question = "Post...";
	text1 = "_Assignment. Job. Task._ He pauses, thinking. _Erm... So, what's your problem?_";

begintalknode 62;
	state = 73;
	personality = 227;
	nextstate = 74;
	condition = 1;
	question = "We don't have any problems";
	text1 = "_None? Well, the governor doesn't want to see anyone with no problems._";

begintalknode 63;
	state = 74;
	personality = 227;
	nextstate = 75;
	condition = 1;
	question = "Tell us about the Governor";
	text1 = "_Why, he's in his chamber right now, working. He would prefer no interruptions._";

begintalknode 64;
	state = 75;
	personality = 227;
	nextstate = 76;
	condition = 1;
	question = "What about assignments and tasks?";
	text1 = "_Keep you occupied. The governor wants some peace and quiet._";

begintalknode 65;
	state = 76;
	personality = 227;
	nextstate = 77;
	condition = 1;
	question = "What would give him peace and quiet?";
	text1 = "_He'd be much happier without the pirates, that's to be sure._";

begintalknode 66;
	state = 77;
	personality = 227;
	nextstate = 78;
	condition = 1;
	question = "What about the pirates?";
	text1 = "_Always there. Always dangerous. Nothing we can do about it. Absolutely nothing._";

begintalknode 67;
	state = 78;
	personality = 227;
	nextstate = 79;
	condition = 1;
	question = "So there is nothing that you can do?";
	text1 = "_Not until the regular army comes around. They all say that._";

begintalknode 68;
	state = 79;
	personality = 227;
	nextstate = 80;
	condition = 1;
	question = "Tell me about the regular army";
	text1 = "_What do I know? The army comes, and first thing, I lose my job!_ He begins to scratch his head, then realizes he has a helmet on.";

begintalknode 69;
	state = 80;
	personality = 227;
	nextstate = 81;
	condition = 1;
	question = "What happens if you lose your job?";
	text1 = "_They'll make us all farm. The Wolfies can farm for us, if I had my say._";

begintalknode 70;
	state = 81;
	personality = 227;
	nextstate = -1;
	condition = 1;
	question = "Where do the Wolf clan farm?";
	text1 = "_Down south. But I like my job as it is._ He pauses, losing his train of thought. _Hmm. Did you say you wanted to see the governor?_";

begintalknode 190;
	state = 100;
	personality = 38;
	nextstate = 101;
	condition = 1;
	question = "Immortal Sage give us wisdom to understand these items.";
	text1 = "You seek guidance from above.";
	
begintalknode 191;
	state = 101;
	personality = 38;
	nextstate = 102;
	condition = 1;
	question = "Immortal Sage give us wisdom to understand these items.";
	text1 = "Your items are identified.";
	action = ID 0;
	
begintalknode 192;
	state = 102;
	personality = 38;
	nextstate = -1;
	condition = 1;
	question = "We have all the information we need for now.";
	text1 = "You finish the identification.";
	action = END_TALK;