begintownscript;

variables;

int i,j,choice;

body;

beginstate INIT_STATE;
        // This state called whenever this town is entered.
        set_name(6,"Cerund");
        set_name(7,"Inala");
        set_name(8,"Danor");
        change_spell_level(6,0,0,7);
        change_spell_level(6,0,1,7);
        change_spell_level(6,0,2,7);
        change_spell_level(6,0,3,7);
        change_spell_level(6,0,4,7);
        change_spell_level(6,0,5,6);
        change_spell_level(6,0,6,6);
        change_spell_level(6,0,7,6);
        change_spell_level(6,0,8,6);
        change_spell_level(6,0,9,6);
        change_spell_level(6,0,10,5);
        change_spell_level(6,0,11,5);
        change_spell_level(6,0,12,5);
        change_spell_level(6,0,13,5);
        change_spell_level(6,0,14,5);
        change_spell_level(6,0,15,4);
        change_spell_level(6,0,16,4);
        change_spell_level(6,0,17,4);
        change_spell_level(6,0,18,4);
        change_spell_level(6,0,19,4);
break;

beginstate EXIT_STATE;
        // Always called when the town is left.
break;

beginstate START_STATE;
        // This state is called every turn the party is in this town.
break;

beginstate 10;
        reset_dialog();
        add_dialog_str(0,"If you don't feel like exploring the island any further, you could take one of the liferafts out to sea, and hope someone sees you.",0);
        add_dialog_choice(0,"Remain on the island.");
        add_dialog_choice(1,"Leave the island.");
        choice = run_dialog(0);
        if (choice == 1) {
                end();
        }
        if (choice == 2) {
                add_dialog_str(0,"You leave the island, choosing to leave the exploration to someone else. The remaining members of the team follow you off.",0);
                add_dialog_str(1,"After about two weeks of paddling, a passing merchant vessel spots and rescues you.",0);
                add_dialog_str(2,"The team soon reports to the Empire. The Empire commander is glad that you got off the island, but disappointed that you didn't completely survey it.",0);
                add_dialog_str(3,"You don't get any reward for participating.",0);
                run_dialog(0);
                end_scenario(0);
        }
break;