// SCENARIO SCRIPT

// This is the special script for your entire scenario. It contains
// special encounters and code accessable from anywhere in the scenario. it also
// contains the code that initializes important special things in the
// scenario (like shops and names and descriptions of special items).

// You can create your own states, but you should give all of them numbers greater than
// or equal to 10.

beginscenarioscript;

variables;
short poem_choice;

body;

// This is the state that is called every time the scenario is loaded,
// even when a save file in the scenario is loaded. Some things that should go here:
//    Names and descriptions of special items.
//    Names and effects of custom special abilities.
beginstate LOAD_SCEN_STATE;
	init_quest(0,"Get Training And Rest","With civilization distanced unreasonably from you, you should probably go to Ashton, the nearby city, to get some R&R and train for journeys ahead.");
	init_quest(1,"Deliver Flowers to Grave","As a favor for the now in-debt Hana, you are to deliver some Beautiful Flowers to Kurojutsu's grave in the graveyard to the south of Ashton.");
	init_quest(2,"Slay Kurojutsu","Kurojutsu has turned out to be a murderous Vampire, along with his fair wife, Hana.  In order to protect Ashton Vale, you must slay Kurojutsu and Hana.");

	set_creature_type_level(4,99);

	break;

// This is the state that is called only once at the very beginning of 
// the scenario. Some things that should go here:
//    The stuff in shops.
//    Creating horses and boats.
beginstate START_SCEN_STATE;

	toggle_quest(0,1);

	// Initialize a few shops.
	
	// Shop 0 - armor
	add_item_to_shop(0,25,25);
	add_item_to_shop(0,26,20);
	add_item_to_shop(0,30,20);
	add_item_to_shop(0,31,10);
	add_item_to_shop(0,35,10);
	add_item_to_shop(0,121,15);
	add_item_to_shop(0,122,15);
	add_item_to_shop(0,126,3);
	add_item_to_shop(0,131,2);
	add_item_to_shop(0,111,15);
	add_item_to_shop(0,16,10);
	add_item_to_shop(0,136,10);
	add_item_to_shop(0,137,10);
	add_item_to_shop(0,141,5);
	
	// Shop 1 - weapons
	add_item_to_shop(1,45,25);
	add_item_to_shop(1,46,20);
	add_item_to_shop(1,50,15);
	add_item_to_shop(1,51,10);
	add_item_to_shop(1,55,5);
	add_item_to_shop(1,65,20);
	add_item_to_shop(1,66,10);
	add_item_to_shop(1,70,5);
	
	// Shop 2 - tools
	add_item_to_shop(2,170,500);
	add_item_to_shop(2,171,500);
	add_item_to_shop(2,172,30);
	add_item_to_shop(2,174,500);
	add_item_to_shop(2,177,500);
	
	// Shop 3 - missiles
	add_item_to_shop(3,85,500);
	add_item_to_shop(3,86,10);
	add_item_to_shop(3,90,10);
	add_item_to_shop(3,95,3);
	add_item_to_shop(3,100,20);
	add_item_to_shop(3,101,10);
	add_item_to_shop(3,105,10);

	// Shop 4 - potions
	add_item_to_shop(4,220,4);
	add_item_to_shop(4,221,3);
	add_item_to_shop(4,222,3);
	add_item_to_shop(4,223,2);

	// Shop 5 - food
	add_item_to_shop(5,4,500);
	add_item_to_shop(5,6,500);
	add_item_to_shop(5,7,500);

	// Shop 6 - Hana's Training
	add_item_to_shop(6,5008,3);
	add_item_to_shop(6,5026,2);
	add_item_to_shop(6,5023,2);
	add_item_to_shop(6,5001,1);

	// Shop 7 - Katherine O'Flaherty's Roses
	add_item_to_shop(7,450,500);

	// Shop 8 - Clark's Iron
	add_item_to_shop(8,46,5);
	add_item_to_shop(8,51,5);
	add_item_to_shop(8,56,5);
	add_item_to_shop(8,61,5);
	add_item_to_shop(8,66,5);
	add_item_to_shop(8,71,5);
	add_item_to_shop(8,26,5);
	add_item_to_shop(8,31,5);
	add_item_to_shop(8,36,5);
	add_item_to_shop(8,41,5);
	add_item_to_shop(8,122,5);
	add_item_to_shop(8,127,5);
	add_item_to_shop(8,132,5);
	add_item_to_shop(8,137,5);
	add_item_to_shop(8,142,5);
	add_item_to_shop(8,146,5);
	add_item_to_shop(8,148,5);

	// Shop 9 - Thieve's Guild

	add_item_to_shop(9,47,2);
	add_item_to_shop(9,86,15);
	add_item_to_shop(9,90,2);
	add_item_to_shop(9,91,1);
	add_item_to_shop(9,100,4);
	add_item_to_shop(9,101,3);
	add_item_to_shop(9,47,3);
	add_item_to_shop(9,112,2);
	add_item_to_shop(9,115,3);
	add_item_to_shop(9,174,2);
	add_item_to_shop(9,186,1);
	add_item_to_shop(9,223,4);
	add_item_to_shop(9,224,4);
	add_item_to_shop(9,223,3);
	add_item_to_shop(9,274,1);
	add_item_to_shop(9,396,1);

	// Shop 10 - BoE Press

	add_item_to_shop(10,451,500);
	add_item_to_shop(10,452,500);
	add_item_to_shop(10,453,500);
	add_item_to_shop(10,454,500);
	add_item_to_shop(10,455,500);
	add_item_to_shop(10,456,500);

break;

// This state is called every tick wherever the party is in the scenario.
// You can use the set_state
beginstate START_STATE;

break;

// Place your own states below. Give each a number at least 10.
beginstate 10;
	large_draw_pic_dialog(552,"These roses look nice and give off a sweet but subtle scent.  Ahh, this makes you think of a poem...");
reset_dialog();
	add_dialog_str(0,"Which poem would you like to hear?",0);
	add_dialog_choice(0,"The First");
	add_dialog_choice(1,"The Second");
	add_dialog_choice(2,"None");
	poem_choice = run_dialog(1);
	if (poem_choice == 1)
		message_dialog("Roses are blue, Violets are red.","If you agree, You've got rocks in your head.");
	if (poem_choice == 2)
		message_dialog("Roses are red, Violets are blue.","Please flush the toilet After you're through.");
	if (poem_choice == 3)
		print_str("Good choice.");
		end();
break;

beginstate 11;
//	message_dialog("This book by Brett Bixler is about a man named Jonah who kills himself, walks around wearing blue-tinted glasses, falls in love with an infant who becomes his grandmother, and is tortured with gruesome pop lyrics by a brutal overlord sharing the name of the book's author.","It's a very bizarre text.");
	print_str_color("HINT: Buy Blades of Exile and play Quintessence!",2);
	print_str_color("It'll be much better than this dinky scenario.",2);
	break;

beginstate 12;
//	message_dialog("This book by Ian "Alcritas" Klinkhamer is about legendary heroes running about slaying the enemies of a mage named Xenophon, house-cleaning (hunh?), and crazy antics on the high seas.  It's an action-filled book that keeps you gripped and never lets go.","A must-read.");
	print_str_color("HINT: Buy Blades of Exile and play An Apology!",2);
	print_str_color("It'll be much better than this dinky scenario.",2);
	break;

beginstate 13;
//	message_dialog("This book by Jeremy "Terror's Martyr" LeVeque is about a General named Theodore Boston and his eleven troops (hunh?), sent by the Empire to fight off the Illithithids.  Indeed, many Ithillids are slain, including cannon-using Illidiths, dragon-riding Idithills, and more!","It's action-packed, even if it makes less sense than it should at points.");
	print_str_color("HINT: Buy Blades of Exile and play Echoes: Assault!",2);
	print_str_color("It'll be much better than this dinky scenario.",2);
	break;

beginstate 14;
//	message_dialog("This book by David "Zxquez" Sellinger is about...  Something.  Beginner maths problems, perhaps?  There's a little girl, some demons, and not much else that you can read.  Possibly because the text in this book was written with crayons?","You're not entirely sure that you understand the text, but sometimes, ignorance is bliss.");
	print_str_color("HINT: Buy Blades of Exile, but DON'T play A Little Girl!",1);
	print_str_color("It'll be much worse than this scenario.",2);
break;

beginstate 15;
//	message_dialog("This book by Chris "Drizzt" Risberg is about Drakes, and their Forsaken- the origin of the title.  It describes a festival taking place in a large city, a mountain range called the "Spine".  It's an interesting read, and plus, it has Beanie Babies!","Gotta love those Beanie Babies.");
	print_str_color("HINT: Buy Blades of Exile and play The Forsaken!",2);
	print_str_color("It'll be much better than this dinky scenario.",2);
	break;

beginstate 16;
//	message_dialog("This book by Andres Gonzales is about a group of adventurers much like yourselves trying to save the world by defeating a group of dragons, traveling to the future, traveling to the past and defeating some of the world's most powerful villains.  It's a fast-paced book that holds your interest until its very end!","Although the combat gets a bit repetitive at times...);
	print_str_color("HINT: Buy Blades of Exile and play Doom Moon II!",2);
	print_str_color("It'll be much better than this dinky scenario.",2);
	break;