// TOWN DIALOGUE SCRIPT
//    Town 1: Hatherond

// 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 = 20;
	nextstate = 1;
	condition = 1;
	question = "Rauling";
	text1 = "Black of robes, dark of face, with a sheathless dagger hanging by his side. His eyes run over you as though appraising items for trade.";
	text2 = "_I am Rauling, agents._ Barely a whisper, you must strain to hear him.";
	text5 = "Black of robes, dark of face, with a sheathless dagger hanging by his side. His eyes run over you as though appraising items for trade.";
action = INTRO; // This line only does anything if the character has a personality set.

begintalknode 2;
	state = 1;
	personality = 20;
	nextstate = 2;
	condition = 1;
	question = "What is your job?";
	text1 = "_I am here to deliver you important tasks on behalf of the seawyrm._";

begintalknode 4;
	state = 2;
	personality = 20;
	nextstate = 3;
	condition = 1;
	question = "Tell us about your clan.";
	text1 = "He nods. _As we contacted you, it is fitting that you know somewhat of us. Our home is beyond the eastern seas, but we came, fleeing an unnamed menace._";

begintalknode 5;
	state = 3;
	personality = 20;
	nextstate = 4;
	condition = 1;
	question = "So you all had to flee.";
	text1 = "_Indeed, we no longer name our homeland, in fear of that which resides there now. We sought refuge on this isle of Ylmir._";
	text2 = "_We fought long battles to gain our foothold, for the natives, the peoples of the wolf and falcon, do not take any liking to us in their presumed superiority._";
	text3 = "_But we succeeded, at least in part._";


begintalknode 6;
	state = 4;
	personality = 20;
	nextstate = 5;
	condition = 1;
	question = "How did you succeed?";
	text1 = "_We now hold the southeastern corner of the isle. Ingusi we name it, the Whale's Cape, though in the language of the natives it is Hronesnaess. But we do not forget our mission._";
	text2 = "_These natives will let us no further, still with their age-old beliefs that we are an inferior people, unfitting to mingle with them. That brings me to the reason that you are here._";


begintalknode 7;
	state = 5;
	personality = 20;
	nextstate = 2;
	condition = 1;
	question = "What is the reason?";
	text1 = "_You are here to fulfill a task for us. An important task, one that we cannot accomplish alone._";

begintalknode 8;
	state = 2;
	personality = 20;
	nextstate = -1;
	condition = get_flag(100,0) < 4;
	question = "What are those tasks?";
	text1 = "_I have nothing else to say._";
	code =
	toggle_quest(0,0);
	toggle_quest(1,1);
	run_town_script(11);
	break;

begintalknode 9;
	state = 1;
	personality = 20;
	nextstate = -1;
        condition = get_flag(100,0) == 2;
        question = "We have obtained the message.";
	text1 = "_Fantastic, let me see it!_";
	code =
	run_town_script(11);
	toggle_quest(1,0);
	toggle_quest(2,1);
break;

begintalknode 10;
	state = 1;
	personality = 20;
	nextstate = -1;
        condition = get_flag(100,0) >= 4;
        question = "We investigated them as best we could.";
	text1 = "_Read the note on the chair_";
	text2 = "Rauling suddenly disappears";
	action = END_TALK;
	code =
	toggle_quest(2,0);
	erase_char(character_talking_to());
	change_char_xp(0,250);
	change_char_xp(1,250);
	change_char_xp(2,250);
	change_char_xp(3,250);
	print_str_color("You all gain experience. (250)",2);
break;
	
begintalknode 14;
	state = -1;
	personality = 21;
	nextstate = 11;
	condition = 1;
	question = "Finn";
	text1 = "The robes of the harbor master are an ashen grey. A carven staff is propped up next to his desk.";
	text2 = "_My name, intruders, is Finn._ His speech is slow, precise, and with hidden menace.";

begintalknode 15;
	state = 11;
	personality = 21;
	nextstate = 12;
	condition = 1;
	question = "What is your job?";
	text1 = "He sighs. _Is there no end to interruptions?_";

begintalknode 16;
	state = 12;
	personality = 21;
	nextstate = 13;
	condition = 1;
	question = "You don't like interruptions?";
	text1 = "_I have no time for this._ He shakes his head, motioning you toward the door.";

begintalknode 17;
	state = 13;
	personality = 21;
	nextstate = -1;
	condition = 1;
	question = "So you are short of time.";
	text1 = "He simply disregards you.";
	action = END_TALK;

begintalknode 18;
	state = 12;
	personality = 21;
	nextstate = 14;
	condition = get_flag(1,9) == 1;
	question = "We are interested in a book actually.";
	text1 = "He strikes his desk in exasperation. _Fine, fine. Procure one for 300 gold._";

begintalknode 19;
	state = 14;
	personality = 21;
	nextstate = -1;
	condition = 1;
	question = "We wish to procure one.";
	text1 = "He takes the gold and tosses out a red tome from a drawer.";
	text3 = "_You do not have the gold? Good. Be off._";
	code =
		clear_strings();
		if (pay_coins(300) == 1) {
				add_string(1);
				change_spec_item(5,1);
			}
			else add_string(3);
	break;

begintalknode 22;
	state = -1;
	personality = 22;
	nextstate = 21;
	condition = 1;
	question = "Aeschere";
	text1 = "Richly woven robes and jeweled adornments fit for a king clothe a man perhaps in his early thirties, brown hair crowned with a golden circlet above a supercilious smile.";
	text2 = "_Aeschere, merchant master of Hatherond. Welcome._ He inclines his head in customary, superficial respect.";
	text5 = "Richly woven robes and jeweled adornments fit for a king clothe a man perhaps in his early thirties, brown hair crowned with a golden circlet above a supercilious smile.";
	action = INTRO;

begintalknode 23;
	state = 21;
	personality = 22;
	nextstate = 22;
	condition = 1;
	question = "What is your job?";
	text1 = "He laughs. _Regular duties._";

begintalknode 24;
	state = 22;
	personality = 22;
	nextstate = 23;
	condition = 1;
	question = "What would regular duties actually involve?";
	text1 = "_All economics. All very tiresome. I shan't explain lest you request._";

begintalknode 25;
	state = 23;
	personality = 22;
	nextstate = 24;
	condition = 1;
	question = "We are all ears.";
	text1 = "_Some are simply not cut out to be scholars or business-men._ He pauses, then smiles. _I accuse no one._";

begintalknode 26;
	state = 24;
	personality = 22;
	nextstate = 25;
	condition = 1;
	question = "Who makes a good scholar?";
	text1 = "_As per the Lord Harbour Master. There's one who delves too deep into esoteric affairs, though I'm not going to say that in his face._";

begintalknode 27;
	state = 25;
	personality = 22;
	nextstate = 26;
	condition = 1;
	question = "The esoteric sounds unwholesome.";
	text1 = "_The arcane is dangerous, and also useful. But the less I have to do with it, the better._";

begintalknode 28;
	state = 26;
	personality = 22;
	nextstate = 24;
	condition = 1;
	question = "The less the better...";
	text1 = "_Well, you know the saying about too much curiousity._";

begintalknode 29;
	state = 24;
	personality = 22;
	nextstate = 27;
	condition = 1;
	question = "Tell me about the businessmen.";
	text1 = "_Traders. Shippers. All sorts. I'm not sure where to begin. But there are still more farmers than all of those together. It's a trend._";
	text2 = "_The routes are lucrative from here to Hetware, and to the Falcon provinces to the north. Even the Seawyrm to the east. _";
	text3 = "_The routes are lucrative, but the resources still must be there._";

begintalknode 33;
	state = 27;
	personality = 22;
	nextstate = 27;
	condition = 1;
	question = "What is Hetware like?";
	text1 = "_A place for intellects and communal agriculture. Quiet place._";
	text2 = "_Quite a number of people like Finn, some no less powerful. But again, I do not like to speak of the arcane._";
	text3 = "_ Communal agriculture is usually efficient, if somewhat unfair._";

begintalknode 36;
	state = 27;
	personality = 22;
	nextstate = 28;
	condition = 1;
	question = "Tell me about Falcon Province.";
	text1 = "_Our northern friends. We try to work together. It hasn't always been successful, but we try._";

begintalknode 37;
	state = 28;
	personality = 22;
	nextstate = 27;
	condition = 1;
	action = SET_SDF 1 9 1;
	question = "Not always successful...";
	text1 = "_Ancient history. Perhaps you should ask Finn for a book._";
	text2 = "_He has them in abundance, and he'll give you next to anything to be rid of interruptions._";

begintalknode 39;
	state = 27;
	personality = 22;
	nextstate = 29;
	condition = 1;
	question = "What do you know of the Seawyrm?";
	text1 = "_Primitive society. Not much in the way of civilization, and strange too. Reminds me of something else. But they have needs just as we._";

begintalknode 40;
	state = 29;
	personality = 22;
	nextstate = 27;
	condition = 1;
	question = "What is the something else?";
	text1 = "He looks at you mysteriously.";


begintalknode 44;
	state = -1;
	personality = 23;
	nextstate = 31;
	condition = 1;
	question = "Oslaf";
	text1 = "The innkeeper paces behind the counter, a stock smile upon his face.";
	text2 = "_Name's Oslaf._";
	text3 = "_I keep the Green Inn. Or Green's Inn. Or something._ He shrugs. _I didn't name it, I just keep it. A night's rest is 15 of your 'gold', as you call it._";

begintalknode 45;
	state = 31;
	personality = 23;
	nextstate = -1;
	condition = 1;
	question = "We would like to rest";
	text1 = "You're ushered into a common room, and spend a somewhat unrestful night in your beds.";
	text3 = "I require the 15 gold to stay in business, unfortunately";
	text5 = "You can't stay in an inn when on horseback.";
	action = INN 15 22 27;

begintalknode 49;
	state = -1;
	personality = 24;
	nextstate = 41;
	condition = 1;
	question = "Yse";
	text1 = "The merchant is peddling her wares, apparently packets of medicine, laid out on a cloth before her.";
	text2 = "_Yse._";
	text5 = "The merchant is peddling her wares, apparently packets of medicine, laid out on a cloth before her.";
	action = INTRO;

begintalknode 50;
	state = 41;
	personality = 24;
	nextstate = 42;
	condition = 1;
	question = "What is your job?";
	text1 = "_Would you like to purchase something? The dusts are very useful._";

begintalknode 51;
	state = 42;
	personality = 24;
	nextstate = -1;
	condition = 1;
	question = "Yes, we could use some dusts.";
	text1 = "You finish shopping.";
	code =
//WARNING: Shops work differently now. You'll need to modify this.
		begin_shop_mode("Yse's Dusts","These packets of magical dust look like medicines.",0,3,-1);
	break;

begintalknode 54;
	state = -1;
	personality = 25;
	nextstate = 51;
	condition = 1;
	question = "Herebeald";
	text1 = "The imposing merchant is hawking pieces of armor.";
	text2 = "_Herebeald!_";

begintalknode 55;
	state = 51;
	personality = 25;
	nextstate = 51;
	condition = 1;
	question = "What are you selling?";
	text1 = "_Fine armors on sale! Leather, chain, plate, everything!_";

begintalknode 56;
	state = 51;
	personality = 25;
	nextstate = -1;
	condition = 1;
	question = "Sounds good to us.";
	text1 = "You finish shopping.";
	code =
//WARNING: Shops work differently now. You'll need to modify this.
		begin_shop_mode("Herebeald's Armors","Herebeald has some armor to sell, fairly basic stuff.",1,3,-1);
	break;

begintalknode 59;
	state = -1;
	personality = 26;
	nextstate = 61;
	condition = 1;
	question = "Offa";
	text1 = "A brightly clothed merchant is showing off his wares.";
	text2 = "_Welcome to Offa's weaponry display!_";
	text3 = "_I deal in all sorts of weapons. If you want to sell or purchase them, just see me._";

begintalknode 62;
	state = 61;
	personality = 26;
	nextstate = -1;
	condition = 1;
	question = "We want to buy and sell some armor.";
	text1 = "You finish shopping.";
	code =
		begin_shop_mode("Offa's Weaponry","Offa sells some basic weapons, he is also willing to buy items from the party.",2,4,3);
	break;

begintalknode 65;
	state = -1;
	personality = 27;
	nextstate = 71;
	condition = 1;
	question = "Ingorn";
	text1 = "The merchant is spreading a wide range of missiles.";
	text2 = "_Ingorn, at your service._";
	text3 = "_Bows and arrows, mostly._";

begintalknode 67;
	state = 71;
	personality = 27;
	nextstate = -1;
	condition = 1;
	question = "We could use some bows and arrows.";
	text1 = "You finish shopping.";
	code =
//WARNING: Shops work differently now. You'll need to modify this.
		begin_shop_mode("Ingorn's Bows and Arrows","This guy charges outrageous prices for fairly basic items.",3,6,-1);
	break;

begintalknode 71;
	state = -1;
	personality = 28;
	nextstate = 81;
	condition = 1;
	question = "Seoran";
	text1 = "The magistrate is seated calmly behind the desk, writing.";
	text2 = "She looks up. _Seoran._";
	text5 = "The magistrate is seated calmly behind the desk, writing.";
	action = INTRO;

begintalknode 72;
	state = 81;
	personality = 28;
	nextstate = 82;
	condition = 1;
	question = "What is your job?";
	text1 = "_Papers, for the most part._";

begintalknode 73;
	state = 82;
	personality = 28;
	nextstate = 83;
	condition = 1;
	question = "What are you doing with the papers exactly?";
	text1 = "_Sorting them, delivering them. Not easy to keep track of everything in a city like this._";

begintalknode 74;
	state = 83;
	personality = 28;
	nextstate = 85;
	condition = 1;
	question = "Sorting and delivering what?";
	text1 = "_Unfathomable. Contracts, ledgers, claims, reports. Everything comes through. I deal with what I can. The rest go to Aeschere and Finn._";

begintalknode 75;
	state = 83;
	personality = 28;
	nextstate = 84;
	condition = 1;
	question = "So keeping track isn't easy?";
	text1 = "_It's important, though. So I do it._";
	text2 = "_How else can we hope to run our operations smoothly?_";

begintalknode 77;
	state = 85;
	personality = 28;
	nextstate = 85;
	condition = 1;
	question = "Tell me about this Aeschere?";
	text1 = "_The merchant master. A strange mind, but it works as no other._";

begintalknode 78;
	state = 85;
	personality = 28;
	nextstate = 85;
	condition = 1;
	question = "What is Finn like?";
	text1 = "_Imperious and perilous. Don't bother him without proper business._";

begintalknode 79;
	state = 84;
	personality = 28;
	nextstate = 83;
	condition = 1;
	question = "What are your operations?";
	text1 = "_Shipping and trade go together. By controlling both, we reap the most benefits._";

begintalknode 82;
	state = -1;
	personality = 29;
	nextstate = 91;
	condition = 1;
	question = "Eofenras";
	text1 = "A pilgrim is seated at the table, thoughtfully taking sips of wine.";
	text2 = "_Eofenras. Not a name of renown, but a name nonetheless._";
	text5 = "A pilgrim is seated at the table, thoughtfully taking sips of wine.";
	action = INTRO;

begintalknode 83;
	state = 91;
	personality = 29;
	nextstate = 92;
	condition = 1;
	question = "What is your job?";
	text1 = "_I travel. From place to place, from..._ He pauses and glances at you curiously.";
	text2 = "_I have seen a great deal, and know a great deal._";

begintalknode 85;
	state = 92;
	personality = 29;
	nextstate = 93;
	condition = 1;
	question = "Exactly what have you seen?";
	text1 = "_I had taken up with some Wolfers a while back. Thought I'd pay them another visit, but they're not in right now._";

begintalknode 86;
	state = 93;
	personality = 29;
	nextstate = 92;
	condition = 1;
	question = "Visit...";
	text1 = "_Not tremendously important. No, not really._ He shakes his head for emphasis.";

begintalknode 87;
	state = 92;
	personality = 29;
	nextstate = 94;
	condition = 1;
	question = "What do you know?";
	text1 = "_You can't expect me to go about blind and weaponless, can you?_ He smirks. _There are a few tricks._";

begintalknode 88;
	state = 94;
	personality = 29;
	nextstate = 95;
	condition = 1;
	question = "Tell me about the tricks.";
	text1 = "_Some call it sorcery. I don't know. Thrytho's idols and charms._";
	text2 = "_She's settled in Hetware now. Mysterious one, and much less open nowadays. Pity. She was an excellent teacher._";


begintalknode 90;
	state = 95;
	personality = 29;
	nextstate = 96;
	condition = 1;
	question = "So she was a teacher.";
	text1 = "_To me, at least. I can even pass on some of my interpellations, if you would care to purchase any._";

begintalknode 91;
	state = 96;
	personality = 29;
	nextstate = 94;
	condition = 1;
	question = "Yes we are interested in purchasing.";
	text1 = "You finish shopping.";
	code =
//WARNING: Shops work differently now. You'll need to modify this.
		begin_shop_mode("Minor Conjurations","For a moderate charge Eofenras is willing to teach low level spells.",4,3,-1);
	break;

begintalknode 92;
	state = 95;
	personality = 29;
	nextstate = 97;
	condition = 1;
	question = "What are these idols and charms?";
	text1 = "_Commonplace items. Just don't request any from her._";

begintalknode 93;
	state = 97;
	personality = 29;
	nextstate = 98;
	condition = 1;
	question = "We might want to try a request.";
	text1 = "_I suppose you can try. Don't expect a kind answer. She only gives to those whom she considers worthy._";

begintalknode 94;
	state = 98;
	personality = 29;
	nextstate = 95;
	condition = 1;
	question = "How does she decide who is worthy?";
	text1 = "_You're not going to hang around in a smelly old shop for seven years to prove yourselves. I can tell._";

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;	
