//Outdoor Script for x = 4  y = 2

beginoutdoorscript;

variables;

int choice;

body;

beginstate INIT_STATE;
break;

beginstate START_STATE;
break;

beginstate 10;
if (get_flag(37,2) == 0) {
		block_entry(1);
		end();
		}
break;

beginstate 11;
if (get_flag(5,18) == 0) {
		if (get_flag(141,12) == 0) {
				message_dialog("You walk to the west when you see a large hill with an enormous structure on it. This must be Thralni's castle. This must be the place he is hiding in.","As you didn't see Mayor Ruth yet, going to Thralni's castle from the front gate is probably the stupidest thing to do. You turn back.");
				set_flag(141,12,1);
				block_entry(1);
				end();
				}
		}

if (get_flag(31,8) > 1)
		end();

if (get_flag(31,8) == 1) {
		message_dialog("Now that you know for sure that you have no alternative, you could try to enter through the front gate. You don't know what to expect. It may be difficult, and it may not be difficult.","As you start approaching the castle, you hear sounds of shouting and clanking of armor. You look around. Then you spot people fighting. This is your chance to get into the castle.");
		set_flag(31,8,2);
		end();
		}
	if (get_flag(141,12) == 0) {
			message_dialog("You walk to the west when you see a large hill with an enormous structure on it. This must be Thralni's castle. This must be the place he is hiding in.","However, it may be better not to just charge in like that. It would be better if you could go in through the tunnel you used to get out.");
			set_flag(141,12,1);
			block_entry(1);
			end();
			}
		message_dialog("This is the way to Thralni's castle. It would probably be better not to just barge in like that. Maybe you could see if you can follow the tunnel through which you got out to get in again?","");
		block_entry(1);
break;

beginstate 12;
if (get_flag(142,1) == 1) {
		if (get_flag(43,0) == 1) {
				message_dialog("You already know its not safe there with all these waterfalls. It would be foolish to go there a second time. You are clever enough to stay where you are.","");
				block_entry(1);
				end();
				}
		end();
		}
	message_dialog("You escaped from the Senarti capital, and are now on your way to tell Mayor Ruth of Voughton what had happened. However, while you happily float on this nice river, you also hear a distant sound of falling water.","");
	set_flag(142,1,1);
break;

beginstate 13;
if (get_flag(142,2) == 1)
		end();
	message_dialog("You sail on, and the sound of falling water gets louder. This sounds worrying. But then again, after being at Thralni's castle, these waterfalls are better, right?","");
	set_flag(142,2,1);
break;