// TOWN DIALOGUE SCRIPT
//    Town 0: Warrior's Grove

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

begintalkscript;

variables;

int i,j,k,choice;

begintalknode 1;
	state = -1;
	personality = 0;
	nextstate = 1;
	condition = 1;
	question = "Vastro";
	text1 = "You meet a massive, alarmingly muscled man, wearing polished armor. He appraises you carefully as you approach.";
	text2 = "_I am Vastro, head trainer for Warrior's Grove._";
	text5 = "Vastro the trainer waits to see what you have to say.";
	action = INTRO; 

begintalknode 2;
	state = 1;
	personality = 0;
	nextstate = 2;
	condition = 1;
	question = "What is this place for?";
	text1 = "_I am the trainer for the Grove. I teach people skills so they can survive in the surrounding lands._";

begintalknode 3;
	state = 2;
	personality = 0;
	nextstate = -1;
	condition = 1;
	question = "I would like some training.";
	text1 = "_You will need it. If you have the money and the will, I can tell you what you need to know to survive._";
	text2 = "(You need gold and skill points to improve your skills. To train a character, press the Train button to the right of his or her portrait. You can't train in all towns/dungeons.)";

begintalknode 4;
	state = 2;
	personality = 0;
	nextstate = 3;
	condition = 1;
	question = "Tell me more about Warrior's Grove?";
	text1 = "_That's where you are now. It's a small town, but we have all the services hard-working adventurers need._";

begintalknode 5;
	state = 3;
	personality = 0;
	nextstate = -1;
	condition = 1;
	question = "What is outside?";
	text1 = "_I know not what you will find in the lands surrounding Warrior's Grove. You may rest assured, however, that they are filled with adventure, treasure, and direst peril._";
	text2 = "_One thing is for sure. You will need training to help you survive._";

begintalknode 8;
	state = -1;
	personality = 1;
	nextstate = 11;
	condition = 1;
	question = "Rippel";
	text1 = "A lovely woman with delicate features sits behind the counter. She is gluing bright blue feathers on the shafts of iron-tipped arrows.";
	text2 = "_I am known as Rippel the fletcher. Welcome to my shop._";
	text5 = "Rippel is hard at work creating carefully crafted sets of matched arrows.";
	action = INTRO;

begintalknode 9;
	state = 11;
	personality = 1;
	nextstate = 12;
	condition = 1;
	question = "What is your job?";
	text1 = "_I perform the same job I have performed in many strange lands. I create missile weapons of the finest quality. You may purchase them if you like._";

begintalknode 10;
	state = 12;
	personality = 1;
	nextstate = 13;
	condition = 1;
	question = "You've been to strange lands? Like where?";
	text1 = "She sighs. _Before I came to Warrior's Grove, I practiced my trade in many cities, both on the surface and in Exile._";

begintalknode 11;
	state = 13;
	personality = 1;
	nextstate = -1;
	condition = 1;
	question = "What cities have you been to?";
	text1 = "_I can hardly remember all the cities I have worked in. All I know is that there will surely be many more._";

begintalknode 12;
	state = 11;
	personality = 1;
	nextstate = 11;
	condition = 1;
	question = "I would like to buy some missile weapons.";
	text1 = "You finish shopping.";
	code =
		begin_shop_mode("Rippel's Fletching","Rippel's archery supplies and missile weapons are not of very high quality, but they will function.",3,3,3);
	break;

begintalknode 15;
	state = -1;
	personality = 2;
	nextstate = 21;
	condition = 1;
	question = "Walner";
	text1 = "A heavy set man sits behind the counter, wearing the traditional blue robes of an apprentice mage. The robes show a bit of wear and tear, as if he's been travelling for some time.";
	text2 = "He nods in greeting. _I am called Walner._";
	text5 = "Walner smiles weakly at you, picking nervously at the loose threads of his worn robes. He looks like he could use some sleep.";
	action = INTRO;

begintalknode 16;
	state = 21;
	personality = 2;
	nextstate = 22;
	condition = 1;
	question = "Are you a wizard?";
	text1 = "_Not quite. I have not achieved that lofty title. I am, I'm quite proud to say, a sage with no small experience. Whether in the fields of alchemy or identification, I can be of great assistance to you._";

begintalknode 17;
	state = 22;
	personality = 2;
	nextstate = -1;
	condition = 1;
	question = "You say you have had a lot of experience?";
	text1 = "_Adventures. Wars. Hordes of rampaging demons. I've seen it all._";

begintalknode 18;
	state = 22;
	personality = 2;
	nextstate = -1;
	condition = 1;
	question = "Could you identify my items?";
	text1 = "He looks over your items with a practiced eye. It only takes a moment to figure out what each one is. With a smile, he says _No problem. Each identification will be a mere 10 gold._";
	action = ID 10;

begintalknode 19;
	state = 22;
	personality = 2;
	nextstate = -1;
	condition = 1;
	question = "Can I purchase some potions?";
	text1 = "You finish shopping.";
	code =
		begin_shop_mode("Walner's potions","Walner has sold most of his stock to passing adventurers, but he does has a few useful items left.",4,4,2);
	break;

begintalknode 20;
	state = 21;
	personality = 2;
	nextstate = -1;
	condition = 1;
	question = "You look like you have traveled a long way to be here.";
	text1 = "He sighs. _Yes, I have started to look rather run down. Don't think, because of that, I have nothing to offer. I do have skills, I assure you._";

begintalknode 24;
	state = -1;
	personality = 3;
	nextstate = 31;
	condition = 1;
	question = "Marian";
	text1 = "You interrupt a priestess. She concludes her chanting, turns, and bows to you. The ankh around her neck indicates some proficiency in the healing arts.";
	text2 = "_I am Marian. Welcome to the Shrine of Divine Health._";
	text5 = "Marian the healer waits patiently to see if you need assistance.";
	action = INTRO;

begintalknode 25;
	state = 31;
	personality = 3;
	nextstate = 32;
	condition = 1;
	question = "Tell me about this place?";
	text1 = "_The Shrine of Divine Health is dedicated to all of the healing arts. It certainly comes in handy here in Warrior's Grove._";
	text2 = "_I can fully restore anyone traveling with you for 300 coins. I can heal your wounds, remove the curse from anything nasty you are wearing, and even bring an unfortunate soul back from beyond the wall of death._";

begintalknode 26;
	state = 32;
	personality = 3;
	nextstate = -1;
	condition = 1;
	question = "Someone with me requires healing. (Pay 300 coins.)";
	text1 = "Marian looks sad. _I would love to help you, even though you don't have money. However, maintaining a shrine like this is expensive._";
	text3 = "_I am glad to hear that none of you needs help after all._";
	text5 = "Marian kneels and prays fervently. You feel a powerful holy energy fill the shrine. After an hour, the power reaches its apex and, with a flash of light, your friend is restored.";
	code =
		clear_strings();
		if (coins_amount() < 300) 
			add_string(1);
			else if (run_select_a_pc(1) == 0)
				add_string(3);
				else {
					play_sound(24);
					add_string(5);
					restore_pc(get_selected_pc());
					change_coins(-300);
					}
				
	break;

begintalknode 27;
	state = 31;
	personality = 3;
	nextstate = -1;
	condition = 1;
	question = "You are a priestess in thie shrine?";
	text1 = "_Yes. We priests and priestesses of healing dedicate ourselves to the restoration of those who fall ill, break bones, are gnawed on by monsters, that sort of thing._";

begintalknode 28;
	state = 32;
	personality = 3;
	nextstate = -1;
	condition = 1;
	question = "What can you tell me about Warrior's Grove?";
	text1 = "_I don't know what's going on outside these walls. However, considering the number of mutilated people that have been coming back lately, it must be unpleasant._";

begintalknode 29;
	state = 32;
	personality = 3;
	nextstate = -1;
	condition = 1;
	question = "I do not require any healing.";
	text1 = "_I am glad to hear it. If you ever do need to be healed, I will be here waiting. now, if you will excuse me, I must return to my prayers._";
	action = END_TALK;

begintalknode 31;
	state = -1;
	personality = 4;
	nextstate = 41;
	condition = 1;
	question = "Gonski";
	text1 = "You meet this shop's proprietor, a scarred, withered old man. His leathery skin shows the signs of many years under the sun, and his arms bear a number of long, thin scars.";
	text2 = "_I'm Gonski,_ he grunts. He is surrounded by a variety of newly made weapons and pieces of armor.";
	text5 = "Gonski looks like he wishes he was doing something else. He slowly passes a hammer from one hand to the other.";
	action = INTRO;

begintalknode 32;
	state = 41;
	personality = 4;
	nextstate = 42;
	condition = 1;
	question = "What do you sell here?";
	text1 = "He pats a nearby greatsword. _We got armor. We got weapons. We got shields. You can sell me your old stuff too._";

begintalknode 33;
	state = 42;
	personality = 4;
	nextstate = 43;
	condition = 1;
	question = "That's a nice greatsword.";
	text1 = "_Not for sale. We only got one, and it's mine. We got all sorts of weapons here. You'll need to be well equipped when you leave town._";

begintalknode 34;
	state = 43;
	personality = 4;
	nextstate = -1;
	condition = 1;
	question = "What is outside town?";
	text1 = "_There's plenty of monsters out there._ He snorts. _Probably too much for the likes of you. But itf you want to have a chance, you want some of my weapons._";

begintalknode 35;
	state = 41;
	personality = 4;
	nextstate = -1;
	condition = 1;
	question = "Can I buy some weapons?";
	text1 = "You finish shopping.";
	code =
		begin_shop_mode("Gonski's Weapons","Gonski's weapons show signs of having been hastily made. There must be a high demand for blades around here.",1,3,3);
	break;

begintalknode 36;
	state = 41;
	personality = 4;
	nextstate = -1;
	condition = 1;
	question = "Can I buy some armor?";
	text1 = "You finish shopping.";
	code =
		begin_shop_mode("Gonski's Armor","Gonski's armor shows dents and other signs of use. They may have already been used by less successful adventurers.",0,3,3);
	break;

begintalknode 39;
	state = 41;
	personality = 4;
	nextstate = -1;
	condition = 1;
	question = "Do you buy used equipment?";
	text1 = "He looks over your surplus goods. _A pretty sorry lot. Still, I might be able to offer you a little for it._";
	text2 = "(You call sell items while on the store screen. An item has to be identified to sell it. To have items identified, find Walner.)";

begintalknode 42;
	state = -1;
	personality = 5;
	nextstate = 51;
	condition = 1;
	question = "Ella";
	text1 = "You walk up to the counter and look across at the innkeeper. She doesn't seem surprised to see adventurers in her bar.";
	text2 = "She smiles. _I'm Ella, owner of the Warrior's Arms. How may I help you?_";
	text5 = "Ella makes small talk with you and cleans the counter of the bar. _Do you need anything?_";
	action = INTRO;

begintalknode 43;
	state = 51;
	personality = 5;
	nextstate = 52;
	condition = 1;
	question = "What services do you offer?";
	text1 = "_We have all the things adventurers need. We can give you a room to rest in for the night, for only 5 coins. We have cheap rations available. And, of course, a tankard of beer is only a coin._";

begintalknode 44;
	state = 51;
	personality = 5;
	nextstate = -1;
	condition = 1;
	question = "Do a lot of adventurers pass through town?";
	text1 = "_Lots of them. Some of them even survive._";

begintalknode 45;
	state = 52;
	personality = 5;
	nextstate = -1;
	condition = 1;
	question = "I'll take a room for the night. (Pay 5 coins.)";
	text1 = "She shows you to your room and wishes you a pleasant night.";
	text3 = "She shakes her head. _Sorry, but that's 5 gold._";
	text5 = "You can't stay in an inn when on horseback.";
	action = INN 5 32 37;

begintalknode 46;
	state = 52;
	personality = 5;
	nextstate = -1;
	condition = 1;
	question = "I need some rations.";
	text1 = "You finish shopping.";
	code =
		begin_shop_mode("Fine Rations","The food at the inn is simple and edible. It's expensive though, probably because of high demand.",5,5,-1);
	break;

begintalknode 47;
	state = 52;
	personality = 5;
	nextstate = -1;
	condition = 1;
	question = "I would like some ale. (Pay 1 coin.)";
	text1 = "She serves up the beer. It's refreshing, in a nasty sort of way.";
	text3 = "She looks pityingly upon you. _Not a gold piece to your name. How sad._";
	code =
		clear_strings();
		if (coins_amount() < 1) 
			add_string(3);
			else {
				set_party_status(28,15,FALSE);								
				add_string(1);
				change_coins(-1);
				}
				
	break;

begintalknode 48;
	state = 52;
	personality = 5;
	nextstate = -1;
	condition = 1;
	question = "Anything special adventurers usually need?";
	text1 = "_Yes. Which reminds me, please bandage your wounds before going to your room. It's a great pain to clean the blood out of the blankets._";

begintalknode 49;
	state = 52;
	personality = 5;
	nextstate = -1;
	condition = 1;
	question = "I don't need anything.";
	text1 = "_All right. When you do, we'll still be here. I hope._";
	action = END_TALK;

