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,7) == 0) {
                reset_dialog();
                add_dialog_str(0,"A group of eyebeasts is here, watching the ocean. They initially don't seem to be aware of you, but as soon as you get close, they swarm you.",0);
                run_dialog(0);
        }
break;

beginstate 11;
        reset_dialog();
        add_dialog_str(0,"The fighting finished, you search what remains of the eyebeasts. They weren't carrying much, and most of what they were was destroyed,",0);
        if (reward_give(450) == 1) {
        add_dialog_str(1,"You find a scroll near one of the bodies, which you take.",0);
                set_flag(0,7,2);
        }
        else
                add_dialog_str(1,"You find a scroll near one of the bodies, but you don't have enough space in your inventory to take it.",0);
        run_dialog(0);
break;

beginstate 12;
        if (get_flag(0,7) == 1) {
                reset_dialog();
                add_dialog_str(0,"The scroll you found earlier is still here.",0);
                add_dialog_choice(0,"Take the scroll.");
                add_dialog_choice(1,"Leave the scroll.");
                choice = run_dialog(0);
                if (choice == 1) {
                        if (reward_give(450)) {
                                set_flag(0,7,2);
                        }
                        else {
                                print_str_color("You can't carry the scroll.",0);
                        }
                }
        end();
        }
break;

beginstate 13;
        if (get_flag(0,8) == 0) {
                reset_dialog();
                add_dialog_str(0,"When you get close to one of these plants, you notice that it is growing several sprigs of graymold. Some of the graymold is ripe for the taking.",0);
                add_dialog_choice(0,"Take.");
                add_dialog_choice(1,"Leave.");
                choice = run_dialog(0);
                if (choice == 1) {
                        if (reward_give(217)) {
                                set_flag(0,8,2);
                         }
                if (choice == 2)
                                end();
                }
        }
        if (get_flag(0,8) == 1) {
                reset_dialog();
                add_dialog_str(0,"One of these plants is growing graymold, but none of it is ready to be picked.",0);
                run_dialog(0);
        }
        if (get_flag(0,8) == 2) {
                set_flag(0,8,1);
        }
break;