//Outdoor Script for x = 2  y = 1

beginoutdoorscript;

variables;

int a,choice;

body;

beginstate INIT_STATE;

if (get_flag(16,0) == 9) {
		// no longer used
		}

break;

beginstate START_STATE;

if (get_flag(16,0) == 9) {
		// no longer used
		}

break;

beginstate 10;
if (get_flag(121,0) == 1) {
		set_flag(18,0,0);
		}
break;

beginstate 11;
	reset_dialog();
	add_dialog_str(0,"This is the border of Riverrod. Through here you can leave and try continue your travelling. But do you really want to do that?",0);
	add_dialog_str(1,"If you have deposited any money in the Banka Riverrod, you must first go back to Voughton and get your money back, as you won't get it back when leaving the scenario!",0);
	add_dialog_choice(0,"Not yet.");
	add_dialog_choice(1,"I'd like to leave now.");
	choice = run_dialog(1);
	
	if (get_flag(5,12) == 0) {
			if (choice == 1) {
					message_dialog("That is good news for Riverrod. Many people will thank you for this stay.","");
					block_entry(1);
					}
				if (choice == 2) {
						message_dialog("The people here will have to find somebody else to clean up their mess. That is, if this mess was really made by themselves. In any case, they are disappointed you have to leave already.","You wave this province goodbye, hoping never to return.");
						end_scenario(0);
						}
				}
	
	if (get_flag(5,12) == 1) {
			if (choice == 1) {
					message_dialog("Riverrod is pleased that you decided to stay longer. People honor you, and a celebrity in their midst is always pleasant.","");
					block_entry(1);
					}
				if (choice == 2) {
						message_dialog("You have saved the province. Saved many lives. Riverrod wouldn't have existed much longer without your help. Mayor Ruth gave you a healthy amount of cash, and your experience has been raised.","While you walk through the border gates, a tear drops on the ground. This province is filled with memories, filled with pain, suffering and death. you are pleased that you can leave it.");
						message_dialog("In the next years, trade will start to flourish once again and people will return to their homes. You just hope that this province will really survive until that time. It is a beautiful place.","This is the end of Thralni, the man who loved his province so much that he was prepared to kill it to get it back; to riddle it with enemies, to see it lie in front of his castle once again.");
						message_dialog("THE END","");
						end_scenario(1);
						}
				}
break;

beginstate 12;
if (get_flag(121,0) == 1) {
		set_flag(18,0,1);
		}
break;

beginstate 13;
if (get_flag(26,1) == 0) {
		block_entry(1);
		end();
		}
	if (get_flag(121,1) == 1)
			end();
		message_dialog("You stand at the triangle of stones, mentioned in that note you found in the mine. You notice a small crack in the wall to the north of the most northern stone. It appears to be a secret entrance! You quickly walk through it.","");
		set_flag(121,1,1);
break;

beginstate 14;
	message_dialog("You stand at the entrance of a mine. Many people are working inside the mine, hacking away on stones. You look at one of the miners. He is busy hacking a stone loose. The stone finally falls. It's a diamond.","So this is one of the Riverrod diamond and crystal mines. That's good to know.");
break;