
begintalkscript;
variables;

begintalknode 1;
	state = -1;
	nextstate = 2;
	question = "Ogre Merchant.";
	text1 = "This ogre is not quite as large as your average ogre, meaning it is nowhere near as large as an ogre brute. It tries, however, to stand as tall as it can behind its table.";
	text2 = "On the table there are some copper coins and other objects. Realization suddenly dawns: this ogre is a merchant. Its grin is practically benign. _Humun! You buy! I sell. Good?_";

begintalknode 2;
	state = 2;
	nextstate = 3;
	question = "What are you selling ogre?";
	text1 = "_I sell weapon. Best ogre weapon! I make self. All ogres say weapons very good. You buy weapon now! Need very soon._ The ogre refuses to explain why you would need a weapon soon.";
	text2 = "_I sell magic potions. All ogres need potions!_ The ogre purses its lips suddenly. _But I no sell to humuns! Ogres need potions more._ Did this ogre not just a second ago say he would sell to you?";
	text3 = "_I sell food to all ogres. Yum! Tasty ogre food! Humun buy too! All like ogre food!_";
	code =
		clear_strings();


	if (character_talking_to() == 11) {
		add_string(2);
		set_flag(2,2,1);

		}
			if (character_talking_to() == 12)
				add_string(1);

		
		if (character_talking_to() == 13)
			add_string(3);
	break;
begintalknode 3;
	state = 3;
	nextstate = 2;
	condition = get_flag(2,2) == 1;
	question = "Maybe you could teach me the recipes for you magic potions?";
	text1 = "The ogres scratches its head. You think there might be lice falling out of its thick hair. _Yes. That I can teach humuns! They learn much! Much if they want._";
	code =
		set_flag(2,2,0);
		set_flag(2,3,1);
	break;
begintalknode 4;
	state = 2;
	nextstate = -1;
	question = "I would like to buy something.";
	text1 = "_There! That good buy! We done now, yes?_";
	text4 = "_No! Can not sell humuns! They say not to!_";
	code =
		clear_strings();
		
		if  ((character_talking_to() == 11) && (get_flag(2,3) == 1)) {
			add_string(1);
			begin_shop_mode("Ogre Potion Recipes","Some of the recipes you are told are utter nonsense, but this ogre actually knows some useful recipes too.",4,4,-1);
		}
		
		if  ((character_talking_to() == 11) && (get_flag(2,3) == 0))
			add_string(4);
		
		if (character_talking_to() == 12) {
			add_string(1);
			begin_shop_mode("Ogre Weapons","These are not weapons, but garbage. That much is obvious.",5,2,-1);
		}
		
		if (character_talking_to() == 13) {
			add_string(1);
			begin_shop_mode("Ogre Food","This food looks very suspicious. The meat is cooked at least, though you are not at all sure what kind of meat it is.",6,1,-1);
		}
		
	break;
begintalknode 5;
	state = 2;
	nextstate = -1;
	question = "I don't want to buy anything. Can we just talk for a while?";
	text1 = "The ogre creases its broad forehead. It scratches its right eye brow in confusion. _Ugh! No! No talk! I sell. You want talk? You talk Angerfist. He listen._ The ogre gestures at the large platform in the fort.";
	action = END_TALK;

begintalknode 6;
	state = -1;
	nextstate = 7;
	question = "Angry Ogre";
	text1 = "This ogre is none too pleased to see you. He grimaces at you revealing his large yellow canines. You also notice that the ogre growls like bear, menacingly and perhaps a bit fearfully.";
	text2 = "_Humun!_ It growls in a way that is hard to comprehend. _You stupid! Die very soon!_ Its speech is slow and halting.";
	text3 = "_No talk more! Go away!_";
	code =
		if (get_flag(2,5) == 0)
			remove_string(3);
		
		if (get_flag(2,5) == 1) {
			remove_string(1);
			remove_string(2);
			end();
		}
	break;
begintalknode 7;
	state = 7;
	nextstate = 8;
	question = "Why do you say that?";
	text1 = "Your question confuses the ogre. It straightens up and shakes his head to and fro. _Buh. Humuns die all. Real soon. Yuh!_ It nods its head furiously and grins viciously. _You talk Angerfist._";
	text2 = "_See Mighty Beast!_ This is apparently very amusing because the ogre lets out a hearty guffaw.";

begintalknode 8;
	state = 8;
	nextstate = -1;
	question = "Mighty Beast? Is Angerfist a mighty beast?";
	text1 = "_Ugh? No. Mighty Beast no Angerfist. Mighty Beast Mighty Beast._ The ogre scratches its black hair, discovers an insect and eats it. _You go now! Go or Smashy get angry!_ Smashy must be the name of this ogre.";
	text2 = "Or maybe it is Mighty Beast. Either way, this stimulating conversation ends here.";
	action = END_TALK;
	code =
		set_flag(2,5,1);
	break;
begintalknode 9;
	state = 7;
	nextstate = -1;
	question = "Are you threatening me, ogre?";
	text1 = "_Ugh?_ The ogre stares ay you his hostility temporarily gone. It shakes its head. _No threat. Angerfist say no threat. You talk Angerfist. Smashy no want._ The ogre turns its broad back at you.";
	text2 = "But only for a moment. It soon turns around again, glares at you and shrieks _Shoo!_";
	action = END_TALK;
	code =
		set_flag(2,5,1);
	break;
begintalknode 10;
	state = -1;
	nextstate = -1;
	question = "Lord of Sheep";
	text1 = "This ogre mage has dressed itself in a great purple tunic and dark blue trousers. Like all the ogre magi it keeps his clothing in reasonable shape. That said, its attire is unusually splendid.";
	text2 = "Its long black hair has begun to go gray and its goatee has already turned completely gray. You can sense the magic in him and there is a lot of it. Its large dark eyes are exceptionally sharp and you can see considerable intellect in them.";
	text3 = "It looks at you with a calculative look in its eyes. _I not talk to you. Only Angerfist will talk to humans._ That is all the mage says.";

begintalknode 11;
	state = -1;
	nextstate = -1;
	question = "Your average ogre";
	text1 = "This is one of the many ogres of the fort. It does not talk much especially not to you. It is large, dumb and mostly angry. You will not get anything out of it.";

begintalknode 12;
	state = -1;
	nextstate = 13;
	question = "Chain Hound";
	text1 = "In this filthy, small hut you find an ogre. It is clearly starving and dirty, even for an ogre. It stares you defiantly right in the eye, but the effect is somewhat dampened by the fact that he hunches over as if he is scared of you.";
	text2 = "_Humun! You come kill Chainhound?_ Its inflection is the only thing that reveals the phrase as a question.";

begintalknode 13;
	state = 13;
	nextstate = 14;
	question = "I'm not going to kill you. Why are you imprisoned?";
	text1 = "The ogre stares at you incredulously. Your words must confuse him. _Urgh. Chainhound is prisoner! Chainhound no listen Angerfist. Listen Wise Graybeard. He wise. Very, very wise. He keep ogres out of trouble._";
	text2 = "_Not Angerfist!_";

begintalknode 14;
	state = 14;
	nextstate = 15;
	question = "Who is this Wise Graybeard?";
	text1 = "_Wise Graybeard is chief! Uh... True chief! Angerfist is thief! He no true chief. Stoopid ogres follow Angerfist. Not Chainhound! Chainhound smart!_ The ogre takes a moment to ponder his next words.";
	text2 = "_Great ogre wizards also follow Angerfist. Chainhound think they want learn spells from the Great Witch._";

begintalknode 15;
	state = 14;
	nextstate = -1;
	question = "So you were imprisoned for opposing Angerfist?";
	text1 = "_Uh... Yuh! Always oppose Angerfist! Angerfist kills all ogres. That what Wise Graybeard say. Chainhound believe Graybeard. He smart. He kept ogre people away from harm. No ogre die violent death when he chief._";
	text2 = "_Now all ogres die violent death!_ The ogre whimpers most piteously.";

begintalknode 16;
	state = 15;
	nextstate = 16;
	question = "Where is Wise Graybeard now? You should go to him.";
	text1 = "_Yuh! Chainhound go talk to Angerfist. He know what do. He be in Ogre Village. It that way._ Chainhound points south. _There he be. In the caves usually. He med-uh-tate. He do that much!_";
	text2 = "_Chainhound go there now. Thank humun. They not nearly as mean as stories say._ Having said that the ogre slips past you and goes his way in a staggering yet determined manner.";
	action = END_TALK;
	code =
		set_flag(2,8,1);
		award_party_xp(30,12);
		erase_char(9);
	break;
begintalknode 17;
	state = 15;
	nextstate = -1;
	question = "Who are the great ogre wizards?";
	text1 = "_They greatest wizards of ogre people! They know many spells. Talk to animal people. They be Lord of Worgs, Lord of Sheep and Lord of Flies. They listen to Graybeard before. But no now!_";
	text2 = "_They under spell of the Great Witch._";

begintalknode 18;
	state = 15;
	nextstate = -1;
	question = "Who is this Great Witch?";
	text1 = "Chainhound shakes his head. _Not know. Chainhound no seen Witch. Ogres who seen is scared. Great wizard, great power. Want that ogre people destroy all humuns in the world. Angerfist like that._";
	text2 = "_Many cycles before, come to ogre lands. Talk to Angerfist, talk great wizards. Great revolt come! No good, say Wise Graybeard._";

begintalknode 19;
	state = 13;
	nextstate = -1;
	question = "(Kill the monstrous beast.)";
	text1 = "The ogre must have been weakened by its captivity. It could not even fight back. It just stood there when you drew your weapons. It stood there when you prepared to strike it in the carotid artery.";
	text2 = "Your blow was deadly and the ogre died very fast.";
	action = END_TALK;
	code =
		kill_char(9,2,0);
	break;
