// OUTDOOR SECTION SCRIPT
//    Section: X = 1, Y = 6: Lava Ocean

beginoutdoorscript;

variables;

int choice,i,j,k;
string dlgstr;

body;

beginstate INIT_STATE;
// This state called whenever this section is loaded into memory.
break;

beginstate START_STATE;
// Starting state of the section, called every turn the party 
// stands inside this section until you change the state.
break;

beginstate 10;
if (get_skill_total(16) < 16) {
	message_dialog("You find some strange-looking plants. Unfortunately, you don't know enough about Nature Lore to know what they are or how they might be used.","");
	end();
	}
	
if (get_flag(226,0) == 0) {
	reset_dialog();
	add_dialog_str(0,"You find a patch of Spiritual Herbs! Your knowledge of Nature Lore extends to how to pick them so that they will keep their vital parts that are useful in potions. Do you wish to pick them?",0);
	add_dialog_choice(0,"No. (Leave them alone.)");
	add_dialog_choice(1,"Yes. (Pick them.)");
	if (run_dialog(1) == 2) {
		set_flag(226,0,reward_give(215));
		reward_give(215);
		}
	}
else
	message_dialog("Spiritual Herbs grow back slowly, and these have not yet grown back.","");
break;

beginstate 11;
if (get_skill_total(16) < 17) {
	message_dialog("You find some strange-looking rocks. Unfortunately, you don't know enough about Nature Lore to know what they are or how they might be used.","");
	end();
	}
	
if (get_flag(226,1) < 5) {
	reset_dialog();
	add_dialog_str(0,"You find a large pile of rubble, and your sense of Nature Lore leads you to investigate. You find several bars of silver! Do you wish to take them?",0);
	add_dialog_choice(0,"No. (Leave them alone.)");
	add_dialog_choice(1,"Yes. (Take them.)");
	if (run_dialog(1) == 2) {
		i = 1;
		while ((i) && (get_flag(226,1) < 5)) {
			i = reward_give(202);
			inc_flag(226,1,i);
			}
		if (get_flag(226,1) < 5)
			message_dialog("You can't carry all of the silver, so you leave some of it behind to pick up later.","");
		}
	}
else
	message_dialog("You return to the pile of rubble, but you find no more useful bars of silver.","");
break;