//Outdoor Script for x = 1  y = 0

beginoutdoorscript;

variables;

int choice;

body;

beginstate INIT_STATE;
break;

beginstate START_STATE;
break;

beginstate 10;
	reset_dialog();
	add_dialog_str(0,"This is the border of Riverrod. Through here you can leave and try continue your traveling. 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 wouln'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 11;
	message_dialog("This is one of the guarding towers watching over the Burlington river. You climb up, finding some soldiers and archers. You make small talk with them.","When you finished talking, they say goodbye and wish you luck. You descend from the tower and leave.");
break;

beginstate 12;
if (get_flag(18,1) == 1 && get_flag(110,3) == 0) {
		message_dialog("The guards you come across are very alert, and they look at you suspiciously. When you greet them, they draw their weapons. You don't. Eventually they see you are no bad guys, and leave you.","The attack on the Empire HQ certainly stirred up the security here.");
		outdoor_enc_result(1);
		set_flag(110,3,1);
		end();
		}

if (get_flag(5,12) == 0 && get_flag(110,4) == 0) {
		message_dialog("You run across a small patrol of guards. They ask you to come closer to them.","_Their leader leans forward to you. _Let me give you some advice. Riverrod province is under attack. It is not wise to just move around like this. Go to safety, which is in the neighbouring province._ After that, the soldiers leave you.");
    	outdoor_enc_result(1);
	set_flag(110,4,1);
    	end();
    	}

if (get_flag(5,12) != 0 && get_flag(110,5) == 0) {
    	message_dialog("You pass these guards. They are very friendly, and greet you with pleasure. You wave and smile back. Both of you continue on your journey after having a small chat.","");
		outdoor_enc_result(1);
		set_flag(110,5,1);
		end();
		}

outdoor_enc_result(1);
break;