// TOWN DIALOGUE SCRIPT
//    Town 10: Hengest

// 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 = 200;
	nextstate = 1;
	condition = 1;
	question = "Scyld";
	text1 = "Hand set upon a tome in front of him, Scyld, Falcon King, rises to greet you. Snowy-white hair and beard proclaim his age, but his strength has not withered.";
	text2 = "_Scyld I am called, and Falconmaster also. As for you, honored guests, you may name me by the former._";
	text5 = "Hand set upon a tome in front of him, Scyld, Falcon King, rises to greet you. Snowy-white hair and beard proclaim his age, but his strength has not withered.";
	action = INTRO; // This line only does anything if the character has a personality set.

begintalknode 2;
	state = 1;
	personality = 200;
	nextstate = 2;
	condition = 1;
	question = "What is your job?";
	text1 = "_Many tasks, past, present, and future. For now, my greatest duty is the rulership of the Falcon clan._";

begintalknode 3;
	state = 2;
	personality = 200;
	nextstate = 3;
	condition = 1;
	question = "Falcon ruler";
	text1 = "_We came over the high passes of the northern mountains fifty years ago. We came, we made the friendship of the native peoples, and we had peace. That was before._";

begintalknode 4;
	state = 3;
	personality = 200;
	nextstate = 4;
	condition = 1;
	question = "North mountains";
	text1 = "_We were... adventurers, as you would say. The passes and caverns were treacherous, but we came through. We succeeded, the Wind-lord willing._";

begintalknode 5;
	state = 4;
	personality = 200;
	nextstate = 2;
	condition = 1;
	question = "Wind-lord";
	text1 = "_We have our own beliefs, our own religion. We do not force it onto you. And this is not a time to discuss it - perhaps, when peace returns, we can have a long talk._";

begintalknode 6;
	state = 3;
	personality = 200;
	nextstate = 2;
	condition = 1;
	question = "Native people";
	text1 = "_We brought civilization. There were many warring tribes on Ylmir, but we guided them toward unification. Now they rule themselves as the Wolf clan. We are, I would hope, on friendly terms._";

begintalknode 7;
	state = 3;
	personality = 200;
	nextstate = 4;
	condition = 1;
	question = "Peace before";
	text1 = "_But now the airs bode ill. You have come from new struggles, as I have heard. The newcomers, the Seawyrm, may need our reckoning._";

begintalknode 8;
	state = 4;
	personality = 200;
	nextstate = 5;
	condition = 1;
	question = "Seawyrm reckoning";
	text1 = "_Just as the natives here were once fierce, so are the men from beyond the east. But they are also strong and unified. I admire their strength, yet not their tactics._";

begintalknode 9;
	state = 5;
	personality = 200;
	nextstate = 6;
	condition = 1;
	question = "Tactics";
	text1 = "_Spies and deceptions are not the Falcon's ways. Still, if..._ He sighs and shakes his head.";
	text2 = "_Of present, they have raised an outpost southeast of Sweon._";

begintalknode 10;
	state = 6;
	personality = 200;
	nextstate = 7;
	condition = 1;
	question = "Southeast of Sweon";
	text1 = "_By all leads, they build up for assault. We are loath to take the initiative, but the guard there needs to be warned._";
	code =
	run_town_script(15);
	break;

begintalknode 11;
	state = 7;
	personality = 200;
	nextstate = 2;
	condition = (get_flag(100,0) >= 10);
	question = "Warning task";
	text1 = "He looks at you for a long time, unsure of what to say.";
	text2 = "_You know better of the their ways than we. Go to Sweon and alert the guards. Then see if you can investigate the outpost._";
	code = 
	toggle_quest(4,0);
	toggle_quest(5,1);
break;
	
begintalknode 12;
	state = 1;
	personality = 200;
	nextstate = 8;
	condition = get_flag(18,10) == 250;
	question = "Faustus";
	text1 = "He frowns. _He was... an old acquaintance._";

begintalknode 13;
	state = 8;
	personality = 200;
	nextstate = 9;
	condition = 1;
	question = "Acquaintance";
	text1 = "_He was great once. Then he fell._";

begintalknode 14;
	state = 9;
	personality = 200;
	nextstate = 1;
	condition = 1;
	question = "Fell";
	text1 = "_A grievous turn. I will say no more of it._";

begintalknode 15;
	state = 1;
	personality = 200;
	nextstate = 1;
	condition = has_special_item(3);
	question = "We investigated the outpost as you desired.";
	text1 = "_Good, now find a place where you can get that captain's log translated, and then go talk to the Sweon commander._";
	
begintalknode 17;
	state = -1;
	personality = 201;
	nextstate = 11;
	condition = 1;
	question = "Freawaru";
	text1 = "Pale face, dark flowing hair, keen green eyes gleaming with a dangerous light: you are greeted coldly by the master of the mighty Falcon army.";
	text5 = "_I am Freawaru,_ she says, with a confident yet probing voice.";
	action = INTRO;

begintalknode 18;
	state = 11;
	personality = 201;
	nextstate = 12;
	condition = 1;
	question = "What do you do?";
	text1 = "_I lead the warriors of the Falcon. Is that not enough for your curiosity?_";

begintalknode 19;
	state = 12;
	personality = 201;
	nextstate = 13;
	condition = 1;
	question = "Falcon warriors";
	text1 = "_Three thousand spears await a single call from Hengest. Of our might we have no doubt, nor of the chances of our enemies._";

begintalknode 20;
	state = 13;
	personality = 201;
	nextstate = 12;
	condition = 1;
	question = "Might doubt";
	text1 = "_The Falcon has never lost a war, never surrendered a battle, and, by my word, it never will._";

begintalknode 21;
	state = 13;
	personality = 201;
	nextstate = -1;
	condition = 1;
	question = "Enemy chances";
	text1 = "_Those who dare stand against the Falcon will be driven into dust. We care not who they are, or with whom they stand. The north wind knows no mercy._";

begintalknode 22;
	state = 13;
	personality = 201;
	nextstate = 14;
	condition = 1;
	question = "Skane pirates";
	text1 = "_Those rabble? They will be dealt with in time, do not doubt it._";
	text3 = "She raises an eyebrow. _Indeed? Tricks are being played then._";
	action = DEP_ON_SDF 13 1 0;

begintalknode 23;
	state = 14;
	personality = 201;
	nextstate = 15;
	condition = get_flag(13,1) == 1;
	question = "Tricks played";
	text1 = "_Simply deal with Sorali. We cannot spare the soldiers to root him out, and we do not have the foolishness to send ourselves into his hands._";

begintalknode 24;
	state = 15;
	personality = 201;
	nextstate = 12;
	condition = 1;
	question = "Deal with Sorali";
	text1 = "_There is, I hear, dissension even within Skane. Perhaps you can find a weakness in his defense. A full assault would find them united - you alone can strike where he is weak._";

begintalknode 27;
	state = -1;
	personality = 202;
	nextstate = 21;
	condition = 1;
	question = "Heorot";
	text1 = "A greying but energetic man stands behind the counter.";
	text5 = "_Heorot, keeper of the Inn of the Hart. What is there needed?_";
	action = INTRO;

begintalknode 28;
	state = 21;
	personality = 202;
	nextstate = 22;
	condition = 1;
	question = "What is your job?";
	text1 = "_Ah, you can well tell me that. I offer here lodging for passers-by, as well as wine. You won't find that anywhere else._";

begintalknode 29;
	state = 22;
	personality = 202;
	nextstate = 23;
	condition = 1;
	question = "Find anywhere else";
	text1 = "_The natives don't make wine. Never learned to. Only in Hengest._";

begintalknode 30;
	state = 23;
	personality = 202;
	nextstate = -1;
	condition = 1;
	question = "Purchase wine";
	text1 = "You finish shopping.";
	code =
		begin_shop_mode("Heorot's Wines","The natives don't make wine. Never learned to. Only in Hengest will you find any.",15,3,-1);
	break;

begintalknode 31;
	state = 22;
	personality = 202;
	nextstate = -1;
	condition = 1;
	question = "Room";
	text1 = "You are shown to a large common room, and have a relatively restful sleep.";
	text3 = "_Ah, but not without the money._";
	text5 = "You can't stay in an inn when on horseback.";
	action = INN 20 40 40;

begintalknode 35;
	state = -1;
	personality = 203;
	nextstate = 31;
	condition = 1;
	question = "Weland";
	text1 = "Face darkened from burning years at the forge, this blacksmith has earned well his title. Each skilled stroke of the hammer rings out with power.";
	text5 = "He glances up briefly from his work. _Weland._";
	action = INTRO;

begintalknode 36;
	state = 31;
	personality = 203;
	nextstate = 32;
	condition = 1;
	question = "What is your job?";
	text1 = "He does not look up. _What is here in front of me now._";

begintalknode 37;
	state = 32;
	personality = 203;
	nextstate = 33;
	condition = 1;
	question = "Forge";
	text1 = "_If you have business here, if you have a weapon that you wish my improvement on, say so. Else leave me to my work._";

begintalknode 38;
	state = 33;
	personality = 203;
	nextstate = -1;
	condition = 1;
	question = "Purchase improvement";
	text1 = "He sets his tools aside and turns to you. _Show me what you have, and I shall make it strike a bit better for a large cost._";
//OBSOLETE: Individual items can no longer be augmented.
//  You can hardcode this using the it_augment_item field and.
//  the augment_item_on_space function.  Here we have +2 weapons being created.

begintalknode 41;
	state = -1;
	personality = 204;
	nextstate = 41;
	condition = 1;
	question = "Wulfgar";
	text1 = "A young soldier sits a bit uncomfortably in the chair.";
	text5 = "He smiles. _Wulfgar, at your service._";
	action = INTRO;

begintalknode 42;
	state = 41;
	personality = 204;
	nextstate = 42;
	condition = 1;
	question = "What is your job?";
	text1 = "_Stablesmaster, which means I keep after the horses._";

begintalknode 43;
	state = 42;
	personality = 204;
	nextstate = 43;
	condition = 1;
	question = "Horse stables";
	text1 = "_Only been one for a few weeks. It's too bad what happened to Hunlaf out there, but we take our chances. Now, I'm allowed to make some sales..._";
	text2 = "_One purchase will cost you 1000 of your 'gold'. They'll make fine allies._";

begintalknode 45;
	state = 43;
	personality = 204;
	nextstate = 41;
	condition = 1;
	question = "Purchase horses";
	text1 = "He nods and takes the money. _In the stables. Just don't disturb the wolves._";
	text3 = "He shakes his head. _I must insist. 1000 of your currency._";
	text5 = "There are no horses left.";
	code =
		clear_strings();
		if (coins_amount() >=1000) {
			if (set_horse_range_property(0,2) >= 0) {
				add_string(1);
				change_coins(-1000);
				}
				else add_string(5);
			}
			else add_string(3);
	break;

begintalknode 48;
	state = -1;
	personality = 205;
	nextstate = 51;
	condition = 1;
	question = "Raemmen";
	text1 = "Reclined in his chair, a large book laid in his lap, the young scholar looks up at you mildly.";
	text5 = "_Raemenn I am, formerly of Fresan._";
	action = INTRO;

begintalknode 49;
	state = 51;
	personality = 205;
	nextstate = 52;
	condition = 1;
	question = "What is your job?";
	text1 = "_Simply put, I am a student._";

begintalknode 50;
	state = 52;
	personality = 205;
	nextstate = 53;
	condition = 1;
	question = "Student";
	text1 = "_One who studies the crafts of the world. My interest is in a specific field._";

begintalknode 51;
	state = 53;
	personality = 205;
	nextstate = 54;
	condition = 1;
	question = "Crafts";
	text1 = "_There are many strange and wondrous things of the world._";

begintalknode 52;
	state = 54;
	personality = 205;
	nextstate = 52;
	condition = 1;
	question = "Strange and wondrous";
	text1 = "_As the native gods, long since faded into obscurity. As the proud ursagi, shrunken now to an enslaved race. All passing._";

begintalknode 53;
	state = 53;
	personality = 205;
	nextstate = 55;
	condition = 1;
	question = "Specific field";
	text1 = "_The Mirrors. As you might read from the book..._ He motions to a pedestal on the south side of the room. _As from the book, these are gateways._";

begintalknode 54;
	state = 55;
	personality = 205;
	nextstate = 56;
	condition = 1;
	question = "Gateways";
	text1 = "_Very rare. They lead to various worlds, or so it is believed. But few have access to it. Fewer still return to tell tales._";

begintalknode 55;
	state = 56;
	personality = 205;
	nextstate = 57;
	condition = 1;
	question = "Access";
	text1 = "_Even if our road now is not hindered by pirates, still the stones will admit few. It may have something to do with astronomical cycles._";

begintalknode 56;
	state = 57;
	personality = 205;
	nextstate = 55;
	condition = 1;
	question = "Astronomical cycles";
	text1 = "_The stars move and align. I am not sure if they have any bearing upon these. That is a matter for study._";

begintalknode 57;
	state = 56;
	personality = 205;
	nextstate = 58;
	condition = 1;
	question = "Return to tell tales";
	text1 = "_I cannot say. I have not myself had the privilege._";

begintalknode 58;
	state = 58;
	personality = 205;
	nextstate = 52;
	condition = 1;
	question = "Privilege";
	text1 = "_Or honor._ He sighs, and glances back to his book.";

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;	
	