beginoutdoorscript;

variables;

int choice;

body;

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

beginstate START_STATE;

break;

beginstate 10;
        if (get_flag(0,2) == 0) {
                reset_dialog();
                add_dialog_str(0,"You walk into a field of rubble, and investigate what happened. It looks like a party of humans made landfall and established a camp. Shortly afterwards, a bunch of monsters destroyed the camp.",0);
                add_dialog_str(1,"The boat they used to get here is still on the shore, but one or several of the monsters tore up the sails and wrecked most of the other equipment. You can't use this boat to get off Cherayeng Island.",0);
                run_dialog(1);
                set_flag(0,2,1);
                }
break;

beginstate 11;
        if (get_flag(0,5) == 0) {
                reset_dialog();
                add_dialog_str(0,"Near this pool, you find a patch of mandrake. Some of the mandrake is ready for picking.",0);
                add_dialog_choice(0,"Take.");
                add_dialog_choice(1,"Leave.");
                choice = run_dialog(0);
                        if (choice == 1) {
                                set_flag(0,5,2);
                                reward_give(219);
                                end();
                         }
                        if (choice == 2)
                                end();
        }
        if (get_flag(0,5) == 1) {
                reset_dialog();
                add_dialog_str(0,"Near this pool, you find a patch of mandrake. Unfortunately, none of the mandrake is ready for picking.",0);
                run_dialog(0);
        }
        if (get_flag(0,5) == 2) {
                set_flag(0,5,1);
        }
break;

beginstate 12;
        if (get_flag(0,16) < 4) {
                reset_dialog();
                add_dialog_str(0,"There is an old, decaying stone bridge here. It's safe to cross for a moment, however. As you cross the bridge, you suddenly get the feeling that you left something important undone behind you.",0);
                run_dialog(0);
        }
break;