// TOWN DIALOGUE SCRIPT
//    Town 3: Marralis

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

begintalkscript;

variables;

int i,j,k,r1,choice;

begintalknode 1;
	state = -1;
	personality = 0;
	nextstate = -1;
	condition = 1;
	question = "Courtier";
	text1 = "This is one of the courtiers who is waiting for a meeting with the higher-ups on the food chain. They range from minor nobles to captains in the Megiddo defense forces.";
	text2 = "These people are not naturally inclined to be loquacious, and definitely don't care for your type. Your attempts to make conversation do not achieve much success.";
	action = END_TALK;

begintalknode 2;
	state = -1;
	personality = 0;
	nextstate = -1;
	condition = 1;
	question = "Megiddo guard";
	text1 = "The guards of Megiddo are proud, upstanding fellows. They risk their lives, and sacrifice their individual desires, in order to protect the common people of Megiddo. However, they don't have much to say.";
	action = END_TALK;

begintalknode 3;
	state = -1;
	personality = 1;
	nextstate = 2;
	condition = 1;
	question = "Moodie";
	text1 = "This soldier is dutifully practicing his swordsmanship. He seems to be pretty good at it already; he can slice with more precision and speed than you usually see.";
	text2 = "When you try to talk to him, he pauses in his training in order to meet your eye. However, he still glances back at the dummy occasionally, as if pretending to kill it is better than talking to you.";
	text3 = "He grunts at you disinterestedly. _Moodie._ Presumably that's his name, his way of introducing himself; or maybe that's his emotional state right now...";
	text5 = "You meet Moodie again. He's still training. He knows that one day, all his work will pay off.";
	action = INTRO;

begintalknode 4;
	state = 2;
	personality = 1;
	nextstate = 2;
	condition = get_flag(4,4) < 250;
	question = "What's going on in the tower?";
	text1 = "Moodie shrugs. _I don't see much of the tower. I just go from the barracks to the gate, and then from there I travel wherever General Seth and King Valion command._";
	text2 = "_Although, I suppose, all the aristos are in an uproar over the Prince's upcoming marriage. The Prince and the King have tried to keep it quiet, but there's serious bad blood between them at the moment._";
	text3 = "_The Prince has asked Lady Keria to marry him, but King Valion has misgivings. He's threatened to cancel the wedding. Or so I've heard._ Moodie takes a lazy slash at the training dummy, as if Megiddo politics and drama can be dismissed that easily.";
	text4 = "_And then there's this crazy rumor I heard, that we're going to attack the Hunan people._ He sighs. _I heard they have witches and spirits. I'll fight any man with a blade, but magic is something different._";
	code = 
		if (get_flag(0,17) == 0) {
			remove_string(4);
			}
	break;
begintalknode 5;
	state = 2;
	personality = 1;
	nextstate = 2;
	condition = 1;
	question = "Have you ever killed anyone?";
	text1 = "This seems to stump the man. _Have I ever killed anyone?... I don't believe I have. There was that one man, I wounded him pretty badly. Sadly, he only almost died. No, I believe I haven't._";
	text2 = "A contemplative look comes over Moodie's face, and then real panic. _Does that make me a bad soldier?_";

begintalknode 97;
	state = 2;
	personality = 1;
	nextstate = 2;
	condition = get_flag(4,4) == 250;
	question = "What's going on in the tower?";
	text1 = "Moodie shrugs. _I don't see much of the tower. I just go from the barracks to the gate, and then from there I travel wherever General Seth commands._";
	text2 = "_But I heard a crazy rumor. I heard Lady Keria went mad and attacked General Seth? Is that what you heard?_";
begintalknode 6;
	state = 3;
	personality = 2;
	nextstate = 4;
	condition = 1;
	question = "Marissa";
	text1 = "This small shop is run by a petite, pretty woman. She smiles engagingly at you. _Hello there, I don't think we've met. I'm Marissa, the finest baker in these parts!_";
	text5 = "Marissa the cheerful baker looks at you inquisitively. _What else can I do?_";
	action = INTRO;

begintalknode 7;
	state = 4;
	personality = 2;
	nextstate = 4;
	condition = 1;
	question = "Can I buy some bread?";
	text1 = "You finish shopping. Marissa smiles cheerfully.";
	code = 
		begin_shop_mode("Marissa's baked goods","Marissa runs a cozy little bakery in Megiddo Tower. But since she has to bring grain uphill and some of it is imported, it's not the cheapest you've seen.",6,4,-1);
	break;

begintalknode 8;
	state = 4;
	personality = 2;
	nextstate = 4;
	condition = get_flag(4,4) < 250;
	question = "This shop has a great location!";
	text1 = "Marissa smiles and flushes, pleased by your comment. _Well thank you! It certainly does. Everyone in the whole tower has to walk by my window and smell the bread baking, and it just makes them so hungry!_";
	text2 = "_And then of course, I see everything that goes on in the city. I've seen some..._ She trails off. _I don't mean to talk about such things, it's not fitting._";
	text3 = "_And then of course, I see everything that goes on in the city. I've seen a lot of people running to and from the tower, do you know why that is?_ That activity probably has to do with the Hunan war. You neglect to mention that to her.";
	code = 
		if (get_flag(0,17) == 0) {
			remove_string(3);
			}
		if (get_flag(0,17) == 250) { 
			remove_string(2);
			}
	break;
	
begintalknode 105;
	state = 4;
	personality = 2;
	nextstate = 4;
	condition = get_flag(4,5) >= 50;
	question = "Did you see where Lady Keria took the King?";
	text1 = "Marissa shakes her head sadly. _I felt that earthquake, and I heard all the commotion. I wish I could help, but..._ She looks worried.";

begintalknode 9;
	state = 5;
	personality = 3;
	nextstate = 6;
	condition = 1;
	question = "Deadeye";
	text1 = "Judging from this man's arms and armor, he's an archer in the service of Megiddo. He curtly nods. _I go by Deadeye._";
	text5 = "The grim Deadeye is still here. Presumably he doesn't have anything else to do.";
	action = INTRO;
	code = 
		set_flag(0,25,250);
	break;
begintalknode 10;
	state = 6;
	personality = 3;
	nextstate = 7;
	condition = 1;
	question = "What do you do?";
	text1 = "Deadeye shifts uncomfortably. _I was originally a hunter from a small village to the southwest. But then I joined the Megiddo Army, and I became... a cartographer of sorts. Yes. Maps. Although lately I've just been waiting here._";
	text2 = "_It involves a lot of travelling, and looking very closely at things. And surviving._ He abruptly stops, leaving more questions unanswered.";
begintalknode 11;
	state = 7;
	personality = 3;
	nextstate = 6;
	condition = 1;
	question = "So... you're a spy?";
	text1 = "Deadeye sighs. _Yes. I spy for the King. I did a really terrible job hiding that, didn't I?_ He doesn't seem overly concerned.";
begintalknode 12;
	state = 6;
	personality = 3;
	nextstate = 6;
	condition = 1;
	question = "Have you seen anything interesting around the castle?";
	text1 = "Deadeye glares at you. _Nothing that would concern you. Or me._ He refuses to say more.";
begintalknode 13;
	state = 6;
	personality = 3;
	nextstate = 6;
	condition = 1;
	question = "What's there to see outside the tower?";
	text1 = "Deadeye laughs. _There's much to be seen, by someone who has the right eye. For example, did you know that in Hunan to the north, there's more than just trolls and horses? There's giant birds to the far north, larger than a man!_";
	text2 = "He leans toward you conspiratorally. _And I'll tell you something else. I'll tell you this, because you look like the sort of person who might appreciate this, and the other person who might appreciate this is a despicable creature._";
	text3 = "_Outside the tower and to the southwest, there's a village. And nestled between the village and the mountains, there's a bush. It's the only one nearby that grows red berries. And beneath this bush, there's a special plant that grows._";
	text4 = "_This plant is known to wise men and sages. If ground and dried properly, it makes a powerful draught that can restore vitality. Could be a good thing to know._ He nods.";
	code =
		set_flag(0,11,250);
	break;

begintalknode 64;
	state = 6;
	personality = 3;
	nextstate = -1;
	condition = get_flag(0,15) == 2 && get_flag(0,17) == 0;
	question = "Cynthia says we're supposed to check out the northwest woods.";
	text1 = "Deadeye looks confused. _Did she really say that? Why? I've been up there, there's just wolves. Does she suspect the wolves of planning an uprising?_";
	text2 = "Then Deadeye shakes his head. _Fine. I'll prove to Cynthia how foolish this little jaunt is. I need to go prepare. And I'll meet you in the northwest woods._ He stalks off.";
	code =
		set_flag(0,16,250);
		erase_char(40);
	break;
	
begintalknode 14;
	state = -1;
	personality = 7;
	nextstate = 8;
	condition = 1;
	question = "Student";
	text1 = "This is one of the students at the Megiddo University. Presumably these people know what they're doing. It's best to not bother them.";
	action = END_TALK;
begintalknode 15;
	state = 8;
	personality = 8;
	nextstate = 8;
	condition = 1;
	question = "Administrator";
	text1 = "This is one of the bureaucrats of Megiddo. The nation is known for its craftsmanship and for producing vast quantities of paper, and the people of Megiddo seem to go to excessive lengths in order to use as much paper as possible.";
	text2 = "This man is busily scribbling notes and adding sums and generally occupying himself with scholarly things. He considers your conversation to be without purpose, and disdains your contributions to society.";
	text3 = "Conversation with him is unpleasant, but at least it's pleasantly short.";
	action = END_TALK;

begintalknode 16;
	state = 9;
	personality = 9;
	nextstate = 10;
	condition = 1;
	question = "Goldsmith";
	text1 = "The owner of this shop, probably from a noble family, looks at you disdainfully. _Perhaps you are lost? The tower proper is to the north; there you can find a job suited to your... skills._";
	text2 = "He idly twists an ornate ring on his finger. He's not even doing any work; he just wants you out of his shop. The goldsmith doesn't even bother telling you his name; he just assumes that your presence cannot serve him.";
begintalknode 17;
	state = 10;
	personality = 9;
	nextstate = 10;
	condition = 1;
	question = "Do you have a problem with me?";
	text1 = "He sniffs daintily. _I rather think I do. But I don't have to justify my conclusions to anyone, especially not dim-witted ruffians like you. Buy something, or begone._";
begintalknode 18;
	state = 10;
	personality = 9;
	nextstate = 10;
	condition = 1;
	question = "Let me see what you're selling.";
	text1 = "The goldsmith huffs. _It's not as if I keep pieces simply lying around, waiting for you to drop by; I work on a contract basis. I'm known all over the world!_";
	code = 
		begin_shop_mode("Goldsmith's gold goods","This arrogant noble runs a gold shop in Megiddo Tower. The jewelry is actually of a decent quality, and as such it is ridiculously overpriced.",7,6,-1);
	break;

begintalknode 19;
	state = 11;
	personality = 10;
	nextstate = 12;
	condition = 1;
	question = "Duneflin";
	text1 = "Upon first inspection, you aren't really sure what this shop sells. Perhaps magical scrolls or sketches? But you look at a rolled-up piece of parchment in one of the cubbyholes against the wall; the sheet is blank.";
	text2 = "The shop is managed by a tall, severe woman. She stalks toward you, eyebrows raised so high that they've disappeared underneath her hair. _May I be of service? I am Duneflin, paper product seller._";
	text5 = "Duneflin is still here, amongst her scrolls and parchment. She seems happy, though.";
	action = INTRO;
begintalknode 20;
	state = 12;
	personality = 10;
	nextstate = 12;
	condition = get_flag(4,4) < 250;
	question = "What's going on in these parts?";
	text1 = "She sighs. _I don't expect country ruffians such as yourselves should be expected to keep abreast of politics... The Prince has declared his intention to marry Lady Keria, the daughter of Lord Kato. _";
	text2 = "_But King Valion protests the arrangement, because Lady Keria has a... formidable reputation._ Duneflin hesitates. _Rumors swirl round her. Doubtless they are unfounded. But persistent._";
	text3 = "_And then I heard from a servant that we are at war. Do you think there will be a battle?_ She looks at you curiously. Obviously the nobility of Megiddo, insulated by their guards and estates, do not have the best understanding of problems like this.";
	code = 
		if (get_flag(0,17) == 0) {
			remove_string(3);
			}
	break;
begintalknode 98;
	state = 12;
	personality = 10;
	nextstate = 12;
	condition = get_flag(4,4) == 250;
	question = "Have you heard about Lady Keria?";
	text1 = "Duneflin draws herself up, affronted. _Lady Keria has been the subject of vicious rumors, which I am sure are unfounded. Now get out!_";
	action = END_TALK;
begintalknode 21;
	state = 12;
	personality = 10;
	nextstate = 12;
	condition = 1;
	question = "Is this your shop?";
	text1 = "She begins nodding, then shakes her head. _I suppose it is not. I manage it, but in the name of Lord Kato. From his estate, he ships high-quality paper to my shop and elsewhere._";
	text2 = "_Here it is greedily bought up by the Megiddo University, the Tower's scribes, and by others as well. The magnificent new techniques of Lord Kato have brought great prosperity and reverence to Megiddo._";
	text3 = "_So I suppose I run the shop, but it is not mine to do with as I please._";
begintalknode 22;
	state = 13;
	personality = 10;
	nextstate = 12;
	condition = get_flag(4,4) < 250;
	question = "Who is Lord Kato? Lady Keria?";
	text1 = "Duneflin looks scandalized. _Do you not know the highest family of Megiddo, save for the King's own kin? Lady Keria and her father, Lord Kato, are servants of Megiddo and enrich us with their grace._";
	text2 = "_And beyond that, Lady Keria is set to be wed to Prince Mercion. Although the King protests, so we shall watch closely to see what develops._";
begintalknode 23;
	state = 12;
	personality = 10;
	nextstate = 12;
	condition = 1;
	question = "Can I buy some paper?";
	text1 = "Duneflin is surprised by your interest in paper, but indulges it nonetheless.";
	code = 
		begin_shop_mode("Duneflin's paper outlet","Duneflin sells paper and paper goods from this shop in Megiddo, in the name of Lord Kato. In addition to plain paper, she has a few magical scrolls.",8,5,-1);
	break;
begintalknode 24;
	state = 12;
	personality = 10;
	nextstate = 12;
	condition = 1;
	question = "How is paper made? Isn't it very hard?";
	text1 = "Duneflin nods. _In my mother's time, it was. Only the sages used paper, and for others it wasn't worth it; it was too expensive. But Lord Kato invented a new way to make paper, a way that greatly reduces cost and time._";
	text2 = "_It involves machinery,  machinery that steams and threshes and mashes. I'm not familiar with the details myself. The principal work is done at Lord Kato's estate._";
	text3 = "_I know, though, that now it's cheaper to make and thus available to the common man to use. Now it has allowed us to pass on and record so much more knowledge, truly a godsend._";

begintalknode 25;
	state = 13;
	personality = 11;
	nextstate = 14;
	condition = 1;
	question = "Prig";
	text1 = "This man is one of the most important in Megiddo, although you wouldn't know it by looking at him. He's a carpenter, and in this time of great growth for Megiddo this job is vital.";
	text2 = "Right now it looks like he's busy finishing a cabinet, sanding down all its rough edges before delivering it. He doesn't stop sanding, but he talks over the sound of his work. _Hello there. I'm Prig, and this is my shop._";
	text5 = "Prig is still here, and still working on his cabinet. It's starting to look very nice.";
	action = INTRO;
begintalknode 26;
	state = 14;
	personality = 11;
	nextstate = 14;
	condition = 1;
	question = "Can I buy anything here?";
	text1 = "He shrugs, and waves toward the back of the shop. _That's what I have for sale at the moment. There's a table, carts, and shelves. Are you interested in any of those? If you buy one, I'll sell you a second piece for half off._";
	text2 = "_Oh, and the chair. The chair is especially nice. For sitting in..._";
begintalknode 27;
	state = 14;
	personality = 11;
	nextstate = 14;
	condition = 1;
	question = "How is life?";
	text1 = "_I can't complain,_ Prig says. _I have a house and a job, and more work than I know what to do with. I'm a simple man, and that's all I need._";

begintalknode 28;
	state = 15;
	personality = 25;
	nextstate = 16;
	condition = 1;
	question = "Mazeura";
	text1 = "This somber old man, the only occupant of this temple, looks upon you with weary eyes. _Greetings, children. Have you come to learn the way? I am Mazeura, and I can show you._";
	text5 = "Mazeura is still here, patiently waiting in the temple. He seems wistful at best.";
	action = INTRO;
begintalknode 29;
	state = 16;
	personality = 25;
	nextstate = 16;
	condition = 1;
	question = "Who are you?";
	text1 = "Mazeura seems to relish this excuse to talk about himself. _I was born in Megiddo, to a merchant and his wife. When I was younger, I was unsure what to do with my life._";
	text2 = "_Then I found my calling, ministering the message of enlightenment and truth to the people. Since then I have found peace, and serenity. And I made my way to this castle, in order to be closest to the people who need the most guidance._";
begintalknode 30;
	state = 16;
	personality = 25;
	nextstate = 16;
	condition = 1;
	question = "Tell me more about your religion.";
	text1 = "He nods earnestly. _Very well. It is always a pleasant surprise to speak to someone whose mind is not closed. I and my bretheren, the Helians, believe that we must continue the work of Helios._";
	text2 = "_To that end, we must always defend Megiddo, as Helios did so many generations ago. We must always seek to strengthen it. We can do this by serving the King in the army, or by working to build Megiddo into a stronger nation._";
	text3 = "_And we must always maintain the eternal fires, the symbol of Helios's spirit. So long as the fires burn, Helios will never leave; he will always stand guard over us._";
	text4 = "_And the greatest glory is to ascend into the heavens, like Helios himself did. His heart was so pure that God set him in the sky to act as our guiding light, our champion._";
begintalknode 31;
	state = 16;
	personality = 25;
	nextstate = 16;
	condition = 1;
	question = "How would I best serve Megiddo?";
	text1 = "Mazeura points to the east. _To the tower! Go there, and ask how you may dedicate yourself to our glorious nation._";
begintalknode 68;
	state = 16;
	personality = 25;
	nextstate = 16;
	condition = 1;
	question = "Can you tell me about the Hunan?";
	text1 = "Mazeura actually spits on the floor. _A curse upon our fine nation! They stole the plains to the north, and live their wild ways. They refuse to settle or build a permanent home, or take up scholarly pursuits._";
	text2 = "_They live like beasts, and so they are growing to become beasts. They hunch over like apes, and they do not have hands but claws; and they do not speak like men, but growl and bark._ He shakes his head. _They should all be put to the sword._";
	text3 = "_And then, I heard that we will go to war with them. This is long past due._";
	code = 
		if (get_flag(0,17) == 0) {
			remove_string(3);
			}
		if (get_flag(4,4) == 250) {
			remove_string(3);
			}
	break;
	
begintalknode 32;
	state = 17;
	personality = 12;
	nextstate = 18;
	condition = 1;
	question = "Captain Hobbes";
	text1 = "This man looks to be a liason between the military of Megiddo and the royalty. Such people are tasked with taking the commands of the King, and putting them into action.";
	text2 = "Understandably, the liasons of the King hold much of the political power in Megiddo. This man looks at you with skepticism, as if he's sure that you are not the caliber of person that he needs.";
	text3 = "_I'm Captain Hobbes, and I'm very busy. Let's make this quick: what do you want?_";
	text5 = "Captain Hobbes toys with his pen. _I have things to do, you know._";
	action = INTRO;
begintalknode 33;
	state = 18;
	personality = 12;
	nextstate = 19;
	condition = get_flag(0,13) == 0;
	question = "Are there any odd jobs you need done?";
	text1 = "Captain Hobbes seems to like this idea. _I hadn't thought of that, but yes, there is. I've been tasked with finding our missing caretaker, and I'm swamped with work. If you find him for me, I'll pay you 100 coins._";
	text2 = "_The caretaker is responsible for tending to the Helios fires, and general upkeep around the tower. We're not sure where he went, but we'd like him back._";
begintalknode 34;
	state = 19;
	personality = 12;
	nextstate = 18;
	condition = get_flag(0,13) == 0;
	question = "Sounds like grunt work. No thanks.";
	text1 = "Hobbes sighs, then leans back in his chair and stares up at the ceiling dolefully. _A pity. I was hoping I would catch a break for once._";
begintalknode 35;
	state = 19;
	personality = 12;
	nextstate = 18;
	condition = 1;
	question = "Let's see what can be done. Is that all the information you have?";
	text1 = "Captain Hobbes squints at you. _Pretty much. I know he had a store room..._ He thinks. _That way._ Hobbes points to the west. _If you find a body, tell me. Then I'll know to hire another custodian to clean up the mess._";
	text2 = "He shuffles through some papers. _Ah. The custodian's store room is east of the... northwest courtyard._ He pauses. _For God's sake, that's right next to this office It's just through the west door, and the west door of the next room.._";
	text3 = "_Oh, and if you don't find him, never bother me about this again. I'm filing it as 'under investigation,' and I refuse to do any extra paperwork._";
	code =
		set_flag(0,13,1);
		set_flag(0,18,250);
		toggle_quest(1,1);
	break;
begintalknode 36;
	state = 18;
	personality = 12;
	nextstate = 18;
	condition = get_flag(4,4) < 250;
	question = "How are things?";
	text1 = "_Fine and dandy,_ Hobbes mutters. _It's my job to reconcile the King's wishes with our military's actions. With General Seth pushing to invade a different neighbor each day, it gets kind of difficult._";
	text2 = "_The King doesn't listen to General Seth when he tries to instigate wars like that. He's too... They're both smart men._ Hobbes decides that he shouldn't pick sides on this conflict, and stops talking.";
	text5 = "_Apart from the coming war with the Hunan?_ Captain Hobbes snorts. _It's already a badly-kept secret, that we'll have to go to war. Quite frankly, I'm surprised it didn't happen sooner. General Seth always said we should have invaded._";
	code = 
		if (get_flag(0,17) == 250) {
			remove_string(1);
			remove_string(2);
			}
		if (get_flag(0,17) == 0) {
			remove_string(5);
			}
	break;
	
begintalknode 37;
	state = 18;
	personality = 12;
	nextstate = 20;
	condition = get_flag(0,13) == 25 && get_flag(0,18) == 250;
	question = "There's a bloodstain and a dagger in the custodian's store room.";
	text1 = "Hobbes looks at you blankly. _Bloodstain in the store room? What happened? Did you cut yourself?_";
	text2 = "You remind him of the case of the missing caretaker. He thinks for a second, then shuffles through his papers. _Ah. Yes. Good to know. Where's the body?_";

begintalknode 99;
	state = 18;
	personality = 12;
	nextstate = 18;
	condition = get_flag(0,13) > 0 && get_flag(0,13) < 250 && get_flag(5,19) > 0;
	question = "Lady Keria killed the Tower's custodian.";
	text1 = "Captain Hobbes gives you a blank look. _Who? What custodian?_";
	code = 
		set_flag(0,13,250);
		toggle_quest(1,0);
		award_party_xp(100,5);
	break;
begintalknode 100;
	state = 18;
	personality = 12;
	nextstate = 18;
	condition = get_flag(0,13) == 250 && get_flag(5,19) > 0;
	question = "Lady Keria killed the Tower's custodian.";
	text1 = "Captain Hobbes gives you a blank look. _Who? What custodian?_";
	
begintalknode 38;
	state = 20;
	personality = 12;
	nextstate = 18;
	condition = get_flag(0,13) == 25;
	question = "No idea.";
	text1 = "He sighs. _Fine. Since you didn't actually find the custodian, like I told you to, I'm going to give you half of what you would have earned._ He gives you 50 coins. _Now leave me alone._";
	code =
		toggle_quest(1,0);
		change_coins(50);
		award_party_xp(100,5);
		set_flag(0,13,250);
	break;
begintalknode 39;
	state = 20;
	personality = 12;
	nextstate = 18;
	condition = get_flag(0,13) == 25;
	question = "(Lie) The body is outside the city walls, to the south.";
	text1 = "Captain Hobbes nods vacantly. _Good. I'll send someone to do something about that._ He reaches into his desk and draws out a package, and fishes 100 coins from it. _Nice work. Now get out._";
	code = 
		toggle_quest(1,0);
		change_coins(100);
		award_party_xp(100,5);
		set_flag(0,13,250);
	break;
	
begintalknode 107;
	state = 18;
	personality = 12;
	nextstate = 18;
	condition = get_flag(0,13) == 250;
	question = "Is there anything else we can do to help?";
	text1 = "Hobbes shrugs. _Cynthia, in the next room over, wanted someone to do an odd job. You should try there._";
	
begintalknode 40;
	state = 21;
	personality = 13;
	nextstate = 22;
	condition = 1;
	question = "Warren";
	text1 = "This wizened old man appears to be a teacher in the school. He sets aside his tools to give you his full attention. _Greetings,_ he murmurs. _I am Warren, a teacher of herbalism here. How may I help you?_";	
	text5 = "Warren is still here, perfecting his alchemy. But he's perfectly happy to put aside some time to speak with you.";
	action = INTRO;
begintalknode 41;
	state = 22;
	personality = 13;
	nextstate = 22;
	condition = 1;
	question = "What do you do?";
	text1 = "He draws himself up grandly. _I am a teacher in this fine institute, a teacher of the anatomy of plants and where to find them and what their uses are. And I still share my knowledge with any who will listen._";
	text2 = "_I, uh... do not venture out of the castle so much, as I am too old. But I show sketches and samples of plants, and how to prepare them in potions and the like._";
begintalknode 42;
	state = 22;
	personality = 13;
	nextstate = 22;
	condition = 1;
	question = "Can you tell me about the history of Megiddo?";
	text1 = "Something escapes Warren; either a dry laugh, or a cough. It's unclear. _How many years do you have? The history of Megiddo continues back as far as any record can show. Since Helios, there has always been a Megiddo._";
	text2 = "_We don't know for sure when Helios lived, or even if half of what the legends say is true. But according to folk history, Helios founded the ancient Megiddo at the site of the Fire Temple, and carved out a nation._";
	text3 = "_He repelled the vicious barbarians, the Hunan. They originally lived in these parts too, but Helios pushed them into the north. Then he built a civilization. It is said that Helios found favor with God for this._";
	text4 = "_And so God took Helios into the sky and made the sun and Helios one. So long as Helios's light shines upon us, so long as the eternal fires and the sun survive, Megiddo will be protected... Or so the stories go._";
	text5 = "_And it is said that the children of Helios continue to rule over us. King Valion and Prince Mercion can, I have heard, trace their roots back to Helios himself. And I have heard a rumor as well, that General Seth is a distant relative._";
begintalknode 43;
	state = 22;
	personality = 13;
	nextstate = 22;
	condition = get_flag(0,8) < 250;
	question = "Who is Lady Keria?";
	text1 = "Warren pauses, and shows some discomfort. _She... Lady Keria... She was my student, once. A very avid, adept student. But she surpassed me as an alchemist. I don't know how._ His voice has a tinge of jealousy.";
	text2 = "_But I do not closely follow the doings of Lady Keria. Perhaps she has found a more excellent tutor, though I know of none. Or perhaps she has unearthed old, forgotten knowledge._";
	text3 = "_Then again, perhaps she has simply succeeded in learning and doing what I could not. The mind stagnates, and wanders..._";
	text4 = "_But I have heard quite a few odd stories about Lady Keria, and I doubt there's any real truth to most of them..._";
	code = 
		if (get_flag(4,5) == 0) {
			remove_string(4);
			}
		if (get_flag(4,5) >= 2) {
			remove_string(2);
			remove_string(3);
			}
	break;
begintalknode 44;
	state = 22;
	personality = 13;
	nextstate = 22;
	condition = 1;
	question = "Can you teach me of your cures?";
	text1 = "Warren sighs. _I wish I could teach you for free, but alas you are not enrolled in the university and then, a man must eat._";
	code = 
		begin_shop_mode("Warren's medicinal cures","Warren uses combinations of substances found in plants to cure various diseases. He will teach you to make these cures, for a price.",9,5,-1);
	break;
begintalknode 76;
	state = 22;
	personality = 13;
	nextstate = 22;
	condition = get_flag(0,22) == 0;
	question = "Do you need any help fetching ingredients?";
	text1 = "His eyes actually light up. _As a matter of fact, I do! It is clearly the benediction of Helios that has sent you here._ He eagerly outlines an assignment for you.";
	text2 = "_Outside this castle and to the east, there is the original Fire Temple, built by Helios himself. Underneath the Fire Temple, there are caverns. Huge, vicious bats and spiders live in these caverns._";
	text3 = "_But they shouldn't be much trouble. Anyway, there are several useful ingredients to be found in this place. The fangs of the bats and spiders carry venoms that I use in my potions. I'll pay 15 coins per fang._";
	text4 = "_And in the deepest parts of the cave, I have heard that there is a pool of strong acid. I would like a sample, to analyze. If you can bring me this, I will pay you 100 coins._";
	text5 = "He pauses. _There is a guard who stops travellers from unwittingly venturing into this dangerous place... Tell him I sent you. He should allow you to pass._";
	code = 
		toggle_quest(4,1);
		toggle_quest(5,1);
		set_flag(0,22,250);	
	break;
	
begintalknode 77;
	state = 22;
	personality = 18;
	nextstate = 22;
	condition = get_flag(0,22) == 250 && has_item(446) == 1;
	question = "Here are some fangs. (15 coins each)";
	text1 = "Warren inspects the fangs and nods appreciatively. _These are fine pieces. I will be able to brew a strong battle potion._";
	code = 
		i = 0;
		i = take_all_of_item(446);
		award_party_xp(10,i);
		i = 15 * i;
		change_coins(i);
		i = 0;
	break;

begintalknode 78;
	state = 22;
	personality = 18;
	nextstate = 22;
	condition = get_flag(0,22) == 250 && has_special_item(1) == 1;
	question = "This is a sample of that acid pool that you wanted. It tried to eat me. (100 coins)";
	text1 = "You tell Warren of your ordeal, and how the acid pool actually tried to kill you. Warren is perturbed, but only for a few moments.";
	text2 = "He shrugs. _These things happen._";
	code =
		change_spec_item(1,-1);
		change_coins(100);
		toggle_quest(5,0);
		award_party_xp(100,5);
	break;
	
begintalknode 45;
	state = 23;
	personality = 14;
	nextstate = 24;
	condition = 1;
	question = "Baker";
	text1 = "This man works in the kitchens for the Megiddo army. You try to speak to him, and he stares at you mutely. He opens his mouth wide, to reveal a mutilated tongue. This man cannot talk.";
begintalknode 46;
	state = 24;
	personality = 14;
	nextstate = 24;
	condition = get_flag(0,13) == 2;
	question = "Uh... do you know what happened to the janitor?";
	text1 = "The poor man nods. That's all, though. If only he could speak, you could find out more.";
	action = END_TALK;

begintalknode 47;
	state = 25;
	personality = 15;
	nextstate = 25;
	condition = 1;
	question = "Official";
	text1 = "This party of people is busy drinking in the Megiddo army's dining hall. By the looks of it, this is a fancy event. These people are probably only half-drunk on actual acohol. The rest probably comes from their own sense of entitlement.";
	text2 = "Attempts to crash the party are met with stares of loathing and resentment. You make no headway trying to start conversations.";
	action = END_TALK;

begintalknode 48;
	state = 26;
	personality = 16;
	nextstate = 26;
	condition = 1;
	question = "Drinker";
	text1 = "This couple is having a nice meal at the local tavern. Although they are suspicious why you're bothering them, they are nice enough to make pleasant small talk until you leave them alone.";
	action = END_TALK;

begintalknode 49;
	state = 27;
	personality = 17;
	nextstate = 28;
	condition = 1;
	question = "Portia";
	text1 = "This woman appears to run the local tavern. She waves at you. _I'm Portia. If you need anything, just shout._";
begintalknode 50;
	state = 28;
	personality = 17;
	nextstate = 28;
	condition = 1;
	question = "We'd like a room. (10 coins)";
	text1 = "You spend a restful night in a decent bed and wake up feeling refreshed. Time to go kill something.";
	text3 = "You don't have enough money for that!";
	text5 = "Why don't you get off your high horse first?";
	action = INN 10 48 45;
	
	code =
		change_coins(-10);
		revive_party();
		//teleport_party(48,45,1);
	break;
begintalknode 106;
	state = 28;
	personality = 17;
	nextstate = 28;
	condition = 1;
	question = "We'd like a meal. (5 coins)";
	text1 = "After a pleasant meal, you get up again. It's time to keep moving.";
	text3 = "Portia gives you a look, like her heart is breaking just from witnessing your poverty. _I'm so sorry, but that's not enough._";
	action = PAY -1 -1 0 5;
	
begintalknode 51;
	state = 29;
	personality = 18;
	nextstate = 29;
	condition = 1;
	question = "Thief";
	text1 = "This rough-looking gentleman looks to be a foreigner, probably one of the sea-people. Their people are known for ferocity and the constant threat to shipping that they pose.";
	text2 = "But Megiddo is apparently tolerating these people. There's probably a good reason for it.";
	text3 = "But they aren't known for their intelligence, chattiness, or hospitality. This man stares at you with dark, glittering eyes. When you try to talk to him more, he simply points to the east, to the curtain.";
	action = END_TALK;
	
begintalknode 52;
	state = 29;
	personality = 18;
	nextstate = 30;
	condition = 1;
	question = "Manucher";
	text1 = "This white-haired man looks like he's spent some years at sea. He hasn't grown fat and lazy as he aged, like the Megiddo nobles tend to. Rather, he's kept himself on his toes and always active.";
	text2 = "When you enter, he's counting a vast pile of coins. They look to be from all the different nearby nations, and together they could probably buy a city somewhere. The man looks up from his fortune and nods at you.";
	text3 = "_Peace to you. I am called Manucher._ He has an accent, although it's hard to place. He looks like one of the sea-people, although he must have either spent a lot of time in Megiddo or spoken the language enough to grasp it pretty well.";
	text5 = "Manucher is sitting in this room, meticulously counting his vast pile of coins. _You need me?_";
	action = INTRO;
begintalknode 53;
	state = 30;
	personality = 18;
	nextstate = 30;
	condition = 1;
	question = "What do you do?";
	text1 = "Manucher shrugs. _I and my brothers will do anything, if the price is right. I mostly lend money, but I also will fetch any item you ask, if you pay up front. And sometimes, we provide protection for travelling merchants._";
	text2 = "_Times are rough._ He grins. Seeing as the sea-people are responsible for half of piracy and other crimes committed on the seas to the east, this is kind of ironic.";
begintalknode 54;
	state = 30;
	personality = 18;
	nextstate = 30;
	condition = 1;
	question = "Can I have some of that money?";
	text1 = "Manucher looks you over, and shakes his head. _Although I do lend money, you do not have the look of a trustworthy fellow. You look like you'll either be gone, or dead in a few days._ He shrugs. _It's nothing personal, it's just business._";
begintalknode 55;
	state = 30;
	personality = 18;
	nextstate = 30;
	condition = 1;
	question = "Business looks good.";
	text1 = "Manucher laughs and runs his hands casually through the vast pile of coins. _So it is. This comes from the delivery of a large quantity of Megiddo's precious paper._";
	text2 = "Manucher suddenly looks at you more closely. _Actually, perhaps we can do business. I have an interest in gathering as much paper as I can, and I sell it to foriegners. Perhaps you can find me blank sheets of paper._";
	text3 = "He points to the northwest. _The woman there, she is a shrew. If I could find the same paper at lower prices, I could increase my margins. And I would pay you fairly, 15 coins per sheet._";
	code = 
		set_flag(0,19,250);
		toggle_quest(7,1);
	break;
begintalknode 56;
	state = 30;
	personality = 18;
	nextstate = 30;
	condition = get_flag(0,19) == 250 && has_item(185) == 1;
	question = "I have paper! (15 coins each)";
	text1 = "Manucher nods greedily. _And I will buy it then!_ He counts the sheets that you bring him, and for each sheet he gives you 15 coins as well. Not a bad deal, considering the paper is useless to you.";
	code = 
		i = 0;
		i = take_all_of_item(185);
		award_party_xp(10,i);
		i = 15 * i;
		change_coins(i);
		i = 0;
	break;
	
begintalknode 65;
	state = 30;
	personality = 18;
	nextstate = 30;
	condition = 1;
	question = "Do you happen to have anything for sale?";
	text1 = "Manucher is stingy and his items aren't of good quality. But still, they may save your life.";
	code = 
		begin_shop_mode("Manucher's supplies","Manucher sells a variety of items. Most of them wouldn't be used by, for example, a farmer. These are more tools for people in the threatening-and-killing business.",10,4,6);
	break;
	
begintalknode 57;
	state = 31;
	personality = 19;
	nextstate = 32;
	condition = 1;
	question = "Cynthia";
	text1 = "This woman serves King Valion as his personal assistant. She is overworked and overly aggressive. She looks at you as just another nuisance. _I suppose you want something from me._ She doesn't even ask; it's as if it's already a fact.";
	text2 = "She sighs. _If you were looking for Cynthia, that's me. I suppose someone sent you here to bother me about something they want done. And I'll get around to it as soon as I can. Try again in six to eight days._";
	text5 = "Cynthia seems to have found a way to be even more stressed than before. She might be on the verge of crying. _What... what is it?_";
	action = INTRO;
begintalknode 58;
	state = 32;
	personality = 19;
	nextstate = 33;
	condition = get_flag(4,4) < 250;
	question = "What's going on in the tower?";
	text1 = "This question sends Cynthia into a high rage. _Are you here to mock me? Everyone knows that the Prince's wedding to Lady Keria is coming up, and I have to coordinate all of it!_";
	text2 = "_And then every captain would prefer to speak to General Seth, and since General Seth is using me as his personal assistant as well, I'm left to deal with all of their problems and run half the army as well._";
	text3 = "_That wouldn't be so bad, except all the soldiers are in a frenzy about some witch they've seen, or something to the north. I have no idea what's wrong with them._";
	text4 = "_That wouldn't be so bad, except all the soldiers are in a frenzy about this Hunan war._";
	text5 = "_And our custodian disappeared. Perhaps he knew things were going downhill in Megiddo, and he tried to escape,_ Cynthia says wistfully.";
	code = 
		if (get_flag(0,17) == 0) {
			remove_string(4);
			}
		if (get_flag(0,17) == 250) { 
			remove_string(3);
			}
	break;
begintalknode 101;
	state = 32;
	personality = 19;
	nextstate = 32;
	condition = get_flag(4,5) >= 50;
	question = "What will happen now that Lady Keria is gone?";
	text1 = "Cynthia shakes her head sadly. _The poor Prince, to be rocked by his father's disappearance and Lady Keria's betrayal... I am amazed that he's doing as well as he is._";
	
begintalknode 104;
	state = 32;
	personality = 19;
	nextstate = 32;
	condition = get_flag(4,5) >= 2 && get_flag(4,5) < 50;
	question = "What's going on?";
	text1 = "Cynthia tears up. _I have no idea! Why does everyone come to me with these problems?_";
	
begintalknode 59;
	state = 33;
	personality = 19;
	nextstate = 33;
	condition = get_flag(4,4) < 250;
	question = "The Prince and Lady Keria?";
	text1 = "She throws up her hands, exasperated. _How long have you been here? The Prince and Lady Keria are to be wed, and the whole nation has been gossiping about it!_";
	text2 = "Despite her bitterness and complaints, Cynthia relishes this excuse to take a break. _The Prince and Lady Keria are deeply in love, but the King disapproves of the Lady. The King is only allowing the wedding to proceed with extreme misgivings._";
	text3 = "_You see, Lady Keria is trained in the wise arts, medicine and herbalism. The King is intensely suspicious of such practices, and so he does not trust her._";
	text4 = "_But of course, this is all hearsay and rumors,_ Cynthia says hastily.";
begintalknode 60;
	state = 33;
	personality = 19;
	nextstate = 34;
	condition = get_flag(0,17) == 0;
	question = "What's the army up to?";
	text1 = "_Absolutely no good, I'm sure._ Cynthia grimaces. _They patrol and keep the peace, but then a troop patrolling the deep woods to the north swears they saw a spirit in the trees._";
	text2 = "_They say there was a flickering light, like fire, moving through the forest and howling. At night._ She shakes her head. _The idiots have let their imaginations get the better of them. And now none of the soldiers will go near, even in the daylight._";
	text3 = "_And then of course, General Seth is constantly rallying for the King to invade this place or that. If it were up to General Seth, we would be fighting three wars at a time._ She sighs. _At least I don't have to deal with that paperwork. Yet._";
begintalknode 61;
	state = 33;
	personality = 19;
	nextstate = 33;
	condition = 1;
	question = "Do you know anything else about the custodian?";
	text1 = "Cynthia suddenly becomes quieter. _Ah... well, that's actually Captain Hobbes's responsibility._ She points to the north. _He's through there, he knows all the details. But I'm sure that this will cause trouble for me!_";
begintalknode 62;
	state = 32;
	personality = 19;
	nextstate = 34;
	condition = get_flag(0,15) == 0;
	question = "I heard you need to hire someone to do a job.";
	text1 = "_Well, would you take my job?_ Cynthia sighs. But then before you can answer, Cynthia quickly speaks again. _Actually, there has been some sighting of a ghost to the north, in the woods._";
	text2 = "_Soldiers saw some light moving in the woods while on patrol, so obviously it's a ghost. Which is keeping the soldiers from maintaining their composure, morale, and patrol routes._ Cynthia buries her head in her hands.";
	text3 = "_I'm looking to send someone to go to the woods, and prove that there's no dangerous evil monster. It was probably just a wolf whose eyes were shining in the moonlight, or something equally inane._";
begintalknode 63;
	state = 34;
	personality = 19;
	nextstate = 35;
	condition = get_flag(0,15) == 0;
	question = "I'll investigate this thing in the woods.";
	text1 = "Cynthia's jaw drops. _You... you will help?_ She pauses for a moment, but then bursts into a flurry of action. Papers fly everywhere. _Fine. Soldiers say they saw this spirit in the north woods. To get there, leave the tower and head northwest._";
	text2 = "_The soldiers just know that whatever it is, it's in that direction. Oh, and..._ Cynthia slyly grins. _If you see Deadeye, tell him that his orders are to accompany you. He needs to get out of the tower. Right now he's probably in the archer's gallery._";
	code = 
		toggle_quest(2,1);
		set_flag(0,15,2);
	break;
	
begintalknode 66;
	state = 32;
	personality = 19;
	nextstate = 32;
	condition = get_flag(2,8) == 250 && get_flag(0,16) == 250 && get_flag(0,17) == 0;
	question = "There were Hunan in the woods, and their chief is planning to attack!";
	text1 = "Cynthia nods rapidly. _Deadeye has already spoken to us! But you should speak to the King as well._ She points to the door behind her. _Act quickly; we don't know when the attack may come._";
	code = 
		set_flag(0,17,250);
		toggle_quest(2,0);
		award_party_xp(100,5);
	break;
begintalknode 67;
	state = 32;
	personality = 19;
	nextstate = 32;
	condition = get_flag(2,8) == 250 && get_flag(0,16) == 0 && get_flag(0,17) == 0;
	question = "There were Hunan in the woods, and their chief is planning to attack!";
	text1 = "Cynthia stares at you, terrified. _What will we do?_ she shrieks. Then, _Wait! The King must hear this._ She hurries through the door behind her, and then exits after a minute. She points to the same door. _Enter, and act quickly!_";
	code = 
		set_flag(0,17,250);
		erase_char(40);
		toggle_quest(2,0);
		award_party_xp(100,5);
	break;
	
begintalknode 69;
	state = 36;
	personality = 3;
	nextstate = 44;
	condition = 1;
	question = "Deadeye";
	text1 = "This man wears the arms and armor of the Megiddo Army. He's probably an important military official. He squints at you, taking you in and judging you. _I'm Deadeye,_ he says gruffly. _Are you the scouts? From the forest?_.";
	text2 = "You start to relate the story of your ordeal in the forest, but Deadeye cuts you off. _Tell it to the General_, he says, pointing to the man in golden armor, the only one sitting.";
	text5 = "Deadeye nods at you with familiarity. _General Seth needs a report from you,_ he says. He gestures to the man in golden armor.";
	text6 = "Deadeye nods at you with familiarity. _Well, it looks like we all have our work cut out for us._";
	code = 
		if (get_flag(0,25) == 250) {
			// means that you've spoken to Deadeye before
			remove_string(1);
			remove_string(2);
			if (get_flag(2,11) == 250) {
				// means that you've gotten your mission from General Seth
				remove_string(5);
				}
			else  {
				remove_string(6);
				}
			}
	break;
begintalknode 79;
	state = 44;
	personality = 3;
	nextstate = 44;
	condition = 1;
	question = "What are you doing here?";
	text1 = "Deadeye shrugs. _I serve at the whim of the King._ He gestures around vaguely. The King notes this with a shadow of a smile. _I'll probably be part of the vanguard of the Megiddo strike force. Perhaps we'll meet up in Hunan._";
	text2 = "Deadeye shrugs. _Right now, I'm just waiting for General Seth to tell me to kill someone._";
	code = 
		if (get_flag(4,5) >= 2) {
			remove_string(1);
			}
		else {
			remove_string(2);
			}
	break;
begintalknode 80;
	state = 44;
	personality = 3;
	nextstate = 44;
	condition = 1;
	question = "Do you know anything about Hunan?";
	text1 = "Deadeye nods. _I've been to that cursed place, once or twice. It's mostly grassland and low bush. Not suitable for someone with my... talents._";
	text2 = "_There's the typical animals. Horses, unicorns, Hunan._ Deadeye almost spits, but then remembers he's in the Megiddo Tower. _The unicorns, they're vicious. They'll try to gore anyone who gets close to their herd._";
	text3 = "_And don't even get me started on the Hunan people. Barely humans._ He mutters some other things about the Hunan as well. _And then there's the birds. In the far north, there's a colony of giant birds. Huge, fierce things._";
begintalknode 81;
	state = 44;
	personality = 3;
	nextstate = 44;
	condition = get_flag(4,4) < 250;
	question = "How did the Hunan scouts get into Megiddo?";
	text1 = "Deadeye considers this for a moment. _That's a good question. The woods are so dense and dangerous, and the wall at the border prevents them from passing through all but the deepest part of the forest..._";
	text2 = "This question seems to bother Deadeye. _How... I've seen quite a bit of that forest, and to find a way through it, that would take real trailcraft._";
	text3 = "_Now that I think about it, it must have been dumb luck or a miracle. Probably both._ Deadeye sighs.";
begintalknode 88;
	state = 44;
	personality = 3;
	condition = get_flag(4,4) == 250;
	question = "The Hunan scouts were being led by Lady Keria through the forest. She can control plants.";
	text1 = "Deadeye's eyebrow twitches. He looks skeptical, but he doesn't openly contradict your theory.";
	
begintalknode 70;
	state = 37;
	personality = 20;
	nextstate = 45;
	condition = 1;
	question = "Keria";
	text1 = "This woman is obviously of noble descent; probably the infamous Lady Keria. She stares at you with revulsion and loathing. _You. The forest scouts?_";
	text2 = "You explain that you are, indeed, the forest scouts. _I see,_ she whispers. _You... you must tell us everything._ The man in golden armor, reclining in the presence of this nobility, conspicuously clears his throat.";
	text3 = "_Tell me everything,_ he rumbles.";
	text4 = "Lady Keria is not known for her compassion or her pleasant demeanor. _What do you want?_ she whispers. She seems horrified that you are even speaking to her.";
	code = 
		if (get_flag(2,11) == 250) {
			remove_string(1);
			remove_string(2);
			remove_string(3);
			}
		if (get_flag(2,11) == 0) {
			remove_string(4);
			end();
			}
	break;
	
begintalknode 82;
	state = 45;
	personality = 20;
	nextstate = 45;
	condition = 1;
	question = "So you and the Prince will be married?";
	text1 = "The air in the room instantly becomes colder. Lady Keria becomes more pale, and the Prince's face flushes red. _... Yes. Yes, Prince Mercion and I are to be wed._ She glares at you. The entire room is silent.";
	text2 = "The King clears his throat awkwardly. _Rumors abound on this subject, so perhaps I should speak very clearly: I had misgivings on the Prince's choice for a bride, but I have been convinced of their true, deep affection for each other._";
	text3 = "_Lady Keria is surely the best daughter-in-law that a King could have._";
begintalknode 83;
	state = 45;
	personality = 20;
	nextstate = 45;
	condition = 1;
	question = "You're an expert on plants, right? How do you think the Hunan scouts got through the forest?";
	text1 = "Lady Keria looks scandalized. _I have absolutely no idea how those scouts got there!_ She turns away in a huff. The Prince looks at her with dismay, but says nothing.";
	action = END_TALK;
	
begintalknode 71;
	state = 38;
	personality = 21;
	nextstate = 48;
	condition = 1;
	question = "Prince Mercion";
	text1 = "This is Prince Mercion, the young son of King Valion. The Prince is reticent like his father, but does not have the wisdom of the man. He is silent because he is sheepish and fearful, not because he is intelligent.";
	text2 = "He looks at you numbly. _I'm not General Seth,_ he says unnecessarily. _General Seth is there._ He points to the man in golden armor.";
	code = 
		if (get_flag(2,11) == 0) {
			end();
			}
	break;
begintalknode 102;
	state = 48;
	personality = 21;
	nextstate = 48;
	condition = get_flag(4,4) == 250;
	question = "Do you know what's happening?";
	text1 = "Prince Valion stares at you, barely comprehending. _Where is my father? Where is Lady Keria?_ He seems to be in shock over recent events.";
begintalknode 103;
	state = 48;
	personality = 21;
	nextstate = 48;
	condition = get_flag(0,8) == 250;
	question = "Lady Keria is dead.";
	text1 = "The Prince twitches when you say this, but apart from that is unresponsive.";
begintalknode 72;
	state = 39;
	personality = 22;
	nextstate = 46;
	condition = 1;
	question = "King Valion";
	text1 = "The King of Megiddo is a tall, aged man. He looks at you, and though he does not speak, his eyes convey his immense gravity. He nods. _I am the King Valion, and this is my top military advisor._ He waves to the seated man.";
	text2 = "_Please, speak to him. Tell him what you have seen. Time is of great importance._";
	text3 = "The King looks at you with clear, bright eyes. _What do you seek?_";
	code = 
		if (get_flag(2,11) == 250) {
			remove_string(1);
			remove_string(2);
			}
		if (get_flag(2,11) == 0) {
			remove_string(3);
			end();
			}
	break;
begintalknode 84;
	state = 46;
	personality = 22;
	nextstate = 46;
	condition = 1;
	question = "What are your thoughts on the war?";
	text1 = "The King speaks quietly, but his tone carries your attention better than if he were shouting. _Megiddo has long neighbored Hunan without conflict. Although some would have it another way..._ The King looks at General Seth.";
	text2 = "_But now, this unprecedented attack... It becomes necessary to take up the sword, to defend one's way of life. We will not invade Hunan to exact revenge, or to take their lands. Rather, we take action to defend only._";
	text3 = "_The question of what we will do, in the long term, remains an unsettled question. Perhaps this is a warning that we must not allow stagnation... But I am still inclined to think peace is our greatest hope._";
	text4 = "General Seth has remained silent this whole time, but he has been openly staring at the King the whole time. It is rumored that General Seth has long wanted to invade Hunan, and only the King stopped him.";
begintalknode 85;
	state = 46;
	personality = 22;
	nextstate = 46;
	condition = 1;
	question = "Who are the Watchmen?";
	text1 = "_They are the finest warriors of the land,_ King Valion says proudly. _Hand-picked from the ranks of the Megiddo army. They have been entrusted with the lives of the royal family._";
	text2 = "_All soldiers in the Megiddo army aspire to be as glorious as the Watchmen. No other soldier, no other army, can match their skill and ferocity._ General Seth nods slowly.";
	
begintalknode 73;
	state = 40;
	personality = 23;
	nextstate = 41;
	condition = 1;
	question = "General Seth";
	text1 = "When you first meet this man, you are struck by something. He looks like an aged version of the statue of Helios which adorns the courtyard outside. Perhaps it is the aura of command.";
	text2 = "Or maybe it is the eyes. The statue, Helios, stares into the sky proudly. Maybe this similarity is why people say that General Seth is descended from Helios.";
	text5 = "General Seth nods at you. _Time is short, but if we must speak then speak._";
	action = INTRO;
begintalknode 74;
	state = 41;
	personality = 23;
	nextstate = 42;
	condition = get_flag(2,8) == 250 && get_flag(2,11) == 0;
	question = "The Hunan are planning to attack Megiddo. (Tell your story)";
	text1 = "You narrate the events of your trip; how you journeyed through the woods, how you were attacked by wolves. How you found the treacherous Hunan, and their chief. You tell General Seth that an attack is imminent.";
	text2 = "You remember the curious thing that the last Hunan said; the Hunan had said that _your shaman_ warned their chief that Megiddo planned to attack Hunan.";
	text3 = "Keria splutters. General Seth turns to her. _Is there something you would like to add?_ Lady Keria nods, takes a deep breath, and speaks. _This is ridiculous; the Megiddo do not have shamans. We don't have such primitive customs._";
	text4 = "You remember the curious thing that the Hunan said about Megiddo, that Megiddo was planning to attack the Hunan. You make sure to include that oddity.";
	text5 = "All the members of the little council take in what you have said, and begin deliberation. General Seth pushes to launch a strike against the Hunan immediately; King Valion is uncertain. The Prince and Lady Keria are silent.";
	text6 = "General Seth and King Valion work out a decision remarkably fast. A fast strike team will journey into Hunan to try to deal a decisive blow, and possibly kill the Hunan chieftain Lu Liath.";
	text7 = "The King's personal guards, the Watchmen, as well as a part of the Megiddo army, will stay in the castle to protect the people.";
	code = 
		if (get_flag(2,10) == 0) {
			remove_string(2);
			remove_string(3);
			}
		if (get_flag(2,10) == 250) {
			remove_string(4);
			}
	break;
begintalknode 75;
	state = 42;
	personality = 23;
	nextstate = 43;
	condition = get_flag(2,11) == 0;
	question = "Is there anything else we can do?";
	text1 = "General Seth exchanges a glance with King Valion. _As a matter of fact, we have a need for scouts to move ahead of the strike force._ General Seth smiles cruelly. _I'm glad you volunteered._";
	text2 = "_Of course, we'll arm you well._ He waves to the east door. _That way, there is a storeroom. Help yourself._";
	text3 = "_And when you have finished there, you should continue with your new mission. To the northeast of the castle, there is a gate that leads to Hunan lands. Go there, gather information about the size of the Hunan forces, and report back._";
	text4 = "_May Helios protect you,_ King Valion adds. General Seth looks at him inquisitively. _The time for prayer has passed. Now comes the time for action._ He points to the door. _Go now. There is little time._";
	code = 
		set_flag(2,11,250);
		erase_char(15);
		activate_hidden_group(3);
		toggle_quest(3,1);
		set_terrain_memory_cell(5,0,0);
	break;
begintalknode 86;
	state = 41;
	personality = 23;
	nextstate = 41;
	condition = get_flag(2,11) == 250 && get_flag(0,28) == 0;
	question = "Can we go over the mission again?";
	text1 = "General Seth stares at you. _It is not a complicated thing. You go to the northeast, to the Hunan border. Then further, into Hunan territory. Find their forces, and estimate how many there are. How they are armed._";
	text2 = "_We expect that they will be in the Great Circle. It is a ring of stones that has some magical significance to the Hunan. It is directly north of the Hunan-Megiddo border gate. You should begin your search there._";
	text3 = "_When you have gathered this information, take the road back to Megiddo Tower. You will either find the army still in the tower, or we will be on the road. Make your report._";
	text4 = "General Seth speaks to you as if you are intensely foolish. Maybe that's just how he sees everyone.";
begintalknode 87;
	state = 41;
	personality = 23;
	nextstate = 41;
	condition = get_flag(2,11) == 250;
	question = "Can I join the Megiddo army?";
	text1 = "This question seems to irritate General Seth. _I seriously question whether that would benefit the army. You seem to have trouble carrying out the most basic tasks._";
	
begintalknode 89;
	state = -1;
	personality = 23;
	nextstate = 47;
	condition = 1;
	question = "General Seth 2.0";
	text1 = "General Seth is already back in the Tower. He looks furious.";
	text2 = "General Seth is staring at the maps that have been set up against the wall. He barely notices you speaking to him.";
	code = 
		if (get_flag(4,5) <= 25) {
			remove_string(2);
			}
		else remove_string(1);
	break;
begintalknode 90;
	state = 47;
	personality = 23;
	nextstate = 47;
	condition = get_flag(4,5) == 25;
	question = "What happened? Where is the King? Lady Keria?";
	text1 = "General Seth actually snarls when he hears the name _Keria_. His words are steeped in bitterness. _As I arrived at the conference room, there was an earthquake. Lady Keria used witchcraft to blind us, and escaped._";
	text2 = "_She fled as soon as I kicked open the door,_ General Seth says. _I will have to ensure she cannot flee the next time I find her._";
	text3 = "_As for the King, I have no idea where his majesty is. I presume we may cut the knowledge out of Lady Keria's head._ The Prince says nothing to defend his traitorous former bride-to-be.";
	code = 
		set_flag(4,5,50);
	break;
begintalknode 91;
	state = 47;
	personality = 23;
	nextstate = 47;
	condition = get_flag(4,5) == 50;
	question = "So... what now? Do we just let Lady Keria escape?";
	text1 = "As he slowly shakes his head, General Seth seems to calm himself slightly. _No. Lady Keria will not escape retribution. She cannot have gone far, and she cannot escape Megiddo. Her wisest move would be to hide in her father's estate._";
	text2 = "General Seth snaps his fingers at you. _You must go to the estate. It is just outside the city walls, just to the northeast. And you must move quickly._";
	code = 
		set_flag(4,5,250);
	break;
begintalknode 92;
	state = 47;
	personality = 23;
	nextstate = 47;
	condition = get_flag(4,5) == 250 && get_flag(0,28) < 250;
	question = "Do you think Lady Keria caused that earthquake?";
	text1 = "General Seth was glancing at one of the wall maps, but he still answers. _No. Those earthquakes are a natural thing in Megiddo. It was probably just Lady Keria's good fortune._";
	text2 = "_I have heard that Lady Keria has unnatural power over plants. If she could cause earthquakes as well... she would be a formidable foe. Let us just hope that that isn't the case._";
begintalknode 93;
	state = 47;
	personality = 23;
	personality = 23;
	nextstate = 47;
	condition = get_flag(4,5) == 250;
	question = "What will you do about the missing King?";
	text1 = "General Seth sighs. _King Valion has disappeared without a trace. Not Deadeye, nor any of the guards, nor anyone else seems to have seen the King. In his absence, the Prince is the ruler of Megiddo._ General Seth says this slowly and quietly.";
	text2 = "The Prince doesn't seem to understand what this means; he is still hoping for the King to return. General Seth shakes his head. _The boy is distraught, stricken with grief._";
	text3 = "_But do not trouble yourself with the King; we will wait and hope, and Megiddo will persevere. I will personally search for the King, and I will send soldiers to every corner of the land to search for his majesty. They will leave no stone unturned._";
begintalknode 94;
	state = 47;
	personality = 23;
	nextstate = 47;
	condition = get_flag(4,5) == 250 && get_flag(0,28) == 0;
	question = "Can we go over the mission again?";
	text1 = "General Seth sighs. _Go outside the tower. Go outside the city walls. To the northwest, Lady Keria may be hiding in Lord Kato's estate. Find her and kill her._";
begintalknode 95;
	state = 47;
	personality = 23;
	nextstate = 47;
	condition = get_flag(0,8) == 250 && get_flag(0,28) < 250;
	question = "Lady Keria is dead. (Tell General Seth everything)";
	text1 = "General Seth seats himself wearily. _Well done. I knew relying upon you would pay off. Speaking of which..._ He retrieves a ring from his pocket and tosses it to you. _Accept this as a reward. It will protect you in these dark times._";
	text2 = "_Now there is only the question of what we will do,_ General Seth says. _Megiddo must persist, though the witch Keria stole away our King... Our hearts are with the King, but we must look to the future._";
	text3 = "You tell General Seth of the mysterious figure who was guiding Lady Keria. General Seth considers this, and speaks slowly. _Perhaps she was misled, or lying; nonetheless, we will search for this person._";
	text4 = "_Although, it would seem that if the goal of this evil person was to remove the King, they certainly achieved this... If we cannot stop them, we shall have revenge._";
	text5 = "General Seth listens as you explain what Keria said about the King's disappearance. _Yes, I suspected that Lady Keria wasn't capable of accomplishing that. Powerful forces are in play here, playing us against each other. That, I am certain of._";
	code = 
		i = reward_give(270);
		award_party_xp(500,5);
		if (get_flag(5,15) == 0 && get_flag(5,17) == 0) {
			remove_string(3);
			remove_string(4);
			}
		if (get_flag(5,18) == 0)
			remove_string(5);
		set_flag(0,28,250);
		toggle_quest(8,0);
	break;
begintalknode 96;
	state = 47;
	personality = 23;
	nextstate = 47;
	condition = get_flag(0,28) == 250;
	question = "So... what do we do now?";
	text1 = "General Seth points to the door. _Though your services have been indispensable, we have no more need of your talents. Your future is in your hands; explore the world._";
	text2 = "_I will wait here with the Prince; we will continue searching for his majesty the King, and never lose hope. But this not a job for mercenaries; it is a job for the King's pride, his retainers and his people._";
	text3 = "_There is a road to the south that leads to other lands. I recommend that you journey away from here, and see what you will. Perhaps one day I will send a messenger to you, and ask for your fine services again._";
begintalknode 108;
	state = 47;
	personality = 23;
	nextstate = 47;
	condition = get_flag(4,5) == 250;
	question = "There's some nice symmetry to this war; Lu Liath and the King are both dead, and both nations sent scouts into the territory of the other.";
	text1 = "General Seth regards this statement coldly. _Perhaps. But for there to be true symmetry, our King would have to be dead. Where is the proof of this? I will not rest until I find his majesty, dead or alive. If you know where he is, tell me at once._";
	text2 = "_And then, this is definitely not symmetrical warfare. The war has been taken to their home, their holy place, while the Hunan scouts barely penetrated our border. And then of course, those scouts died... You would be the Megiddo scouts, would you not?_";
	text3 = "General Seth taps his spear and eyes you menacingly. _I suggest you produce results when I demand them of you. It is in our mutual interest._";
begintalknode 109;
	state = 47;
	personality = 23;
	nextstate = 47;
	condition = get_flag(6,2) == 250;
	question = "We saw a giant raven, north of the Great Circle. Bigger than a full-grown man!";
	text1 = "General Seth responds with an eloquent snort. _Why do you insist on our wasting time?_";