Fallout Wiki
Advertisement
Fallout Wiki
Details
Type Decompiled script
SCRIPTS.LST comment foul-mouthed doc from the Children
MSG file DOCWU.MSG
Transcript

procedure start;
procedure do_dialogue;
procedure social_skills;
procedure DocWu00;
procedure DocWu01;
procedure DocWu02;
procedure DocWu03;
procedure DocWu04;
procedure DocWu05;
procedure DocWu06;
procedure DocWu06a;
procedure DocWu07;
procedure DocWu08;
procedure DocWu09;
procedure DocWu10;
procedure DocWu10a;
procedure DocWu10b;
procedure DocWu10c;
procedure DocWu11;
procedure DocWu12;
procedure DocWu13;
procedure DocWu14;
procedure DocWu15;
procedure DocWu16;
procedure DocWu17;
procedure DocWu17a;
procedure DocWu17b;
procedure DocWu18;
procedure DocWu19;
procedure DocWu19a;
procedure DocWu19b;
procedure DocWu20;
procedure DocWu20a;
procedure DocWu20b;
procedure DocWu21;
procedure DocWu21a;
procedure DocWu22;
procedure DocWu23;
procedure DocWu24;
procedure DocWu24a;
procedure DocWu24b;
procedure DocWuOpts1;
procedure DocWuOpts2;
procedure DocWuOpts3;
procedure DocWuOpts4;
procedure DocWuOpts5;
procedure DocWuOpts5a;
procedure DocWuEnd;
variable healing;
variable Only_Once := 1;
variable hostile;
procedure get_reaction;
procedure ReactToLevel;
procedure LevelToReact;
procedure UpReact;
procedure DownReact;
procedure BottomReact;
procedure TopReact;
procedure BigUpReact;
procedure BigDownReact;
procedure UpReactLevel;
procedure DownReactLevel;
procedure Goodbyes;
variable exit_line;
procedure start
begin
        if (Only_Once) then begin
                critter_add_trait(self_obj, 1, 6, 20);
                critter_add_trait(self_obj, 1, 5, 69);
                Only_Once := 0;
        end
        if (script_action == 11) then begin
                call do_dialogue;
        end
        else begin
                if (script_action == 18) then begin
                        if (source_obj == dude_obj) then begin
                                if (((global_var(160) + global_var(159)) >= 25) and ((global_var(159) > (2 * global_var(160))) or (global_var(156) == 1))) then begin
                                        set_global_var(156, 1);
                                        set_global_var(157, 0);
                                end
                                if (((global_var(160) + global_var(159)) >= 25) and ((global_var(160) > (3 * global_var(159))) or (global_var(157) == 1))) then begin
                                        set_global_var(157, 1);
                                        set_global_var(156, 0);
                                end
                                set_global_var(160, global_var(160) + 1);
                                if ((global_var(160) % 6) == 0) then begin
                                        set_global_var(155, global_var(155) + 1);
                                end
                        end
                end
                else begin
                        if (script_action == 12) then begin
                                if (hostile) then begin
                                        hostile := 0;
                                        attack_complex(dude_obj, 0, 1, 0, 0, 30000, 0, 0);
                                end
                        end
                        else begin
                                if ((script_action == 21) or (script_action == 3)) then begin
                                end
                                else begin
                                        if (script_action == 4) then begin
                                                hostile := 1;
                                        end
                                        else begin
                                                if (script_action == 22) then begin
                                                        if (fixed_param == 1) then begin
                                                                if ((healing == 1) or (healing == 3)) then begin
                                                                        float_msg(dude_obj, message_str(400, 138), 2);
                                                                end
                                                                else begin
                                                                        if (healing == 2) then begin
                                                                                float_msg(dude_obj, message_str(400, 152), 2);
                                                                        end
                                                                        else begin
                                                                                if (healing == 4) then begin
                                                                                        float_msg(dude_obj, message_str(400, 175), 2);
                                                                                end
                                                                                else begin
                                                                                        if (healing == 5) then begin
                                                                                                float_msg(self_obj, message_str(400, 150), 8);
                                                                                        end
                                                                                        else begin
                                                                                                if (healing == 6) then begin
                                                                                                        float_msg(self_obj, message_str(400, 178), 8);
                                                                                                end
                                                                                        end
                                                                                end
                                                                        end
                                                                end
                                                                add_timer_event(self_obj, game_ticks(3), 2);
                                                        end
                                                        else begin
                                                                if (fixed_param == 2) then begin
                                                                        if (healing < 4) then begin
                                                                                float_msg(self_obj, message_str(400, 139), 8);
                                                                        end
                                                                        else begin
                                                                                if (healing == 4) then begin
                                                                                        float_msg(self_obj, message_str(400, 176), 8);
                                                                                end
                                                                        end
                                                                        add_timer_event(self_obj, game_ticks(3), 3);
                                                                end
                                                                else begin
                                                                        if (fixed_param == 3) then begin
                                                                                if (healing == 1) then begin
                                                                                        if (get_critter_stat(dude_obj, 34) == 0) then begin
                                                                                                float_msg(self_obj, message_str(400, 140), 8);
                                                                                        end
                                                                                        else begin
                                                                                                float_msg(self_obj, message_str(400, 141), 8);
                                                                                        end
                                                                                end
                                                                                else begin
                                                                                        if (healing == 2) then begin
                                                                                                float_msg(self_obj, message_str(400, 153), 8);
                                                                                        end
                                                                                        else begin
                                                                                                if (healing == 3) then begin
                                                                                                        if (get_critter_stat(dude_obj, 34) == 0) then begin
                                                                                                                float_msg(self_obj, message_str(400, 167), 8);
                                                                                                        end
                                                                                                        else begin
                                                                                                                float_msg(self_obj, message_str(400, 168), 8);
                                                                                                        end
                                                                                                end
                                                                                        end
                                                                                end
                                                                        end
                                                                end
                                                        end
                                                end
                                        end
                                end
                        end
                end
        end
end
procedure do_dialogue
begin
        call get_reaction;
        start_gdialog(400, self_obj, 4, -1, -1);
        gsay_start;
        healing := 0;
        if (local_var(5) == 1) then begin
                call DocWu00;
        end
        else begin
                if (local_var(6) == 1) then begin
                        call DocWu01;
                end
                else begin
                        if (local_var(7) == 1) then begin
                                call DocWu02;
                        end
                        else begin
                                call DocWu03;
                        end
                end
        end
        gsay_end;
        end_dialogue;
        if (healing) then begin
                use_obj(dude_obj);
                add_timer_event(self_obj, game_ticks(2), 1);
        end
end
procedure social_skills
begin
        call get_reaction;
        dialogue_system_enter;
end
procedure DocWu00
begin
        variable LVar0 := 0;
        set_local_var(4, 1);
        set_local_var(5, 1);
        if (get_critter_stat(dude_obj, 34) == 0) then begin
                gsay_reply(400, message_str(400, 102));
        end
        else begin
                gsay_reply(400, message_str(400, 103));
        end
        giq_option(7, 400, 106, DocWu04, 50);
        call DocWuOpts1;
        giq_option(4, 400, 109, DocWu07, 50);
        call DocWuOpts2;
        giq_option(4, 400, 111, DocWu09, 50);
        call DocWuOpts3;
end
procedure DocWu01
begin
        set_local_var(6, 1);
        gsay_reply(400, 113);
        giq_option(7, 400, 114, DocWu11, 50);
        call DocWuOpts1;
        giq_option(4, 400, 115, DocWu12, 50);
        call DocWuOpts2;
        giq_option(4, 400, 116, DocWu09, 50);
        call DocWuOpts3;
end
procedure DocWu02
begin
        set_local_var(7, 1);
        gsay_reply(400, 117);
        giq_option(7, 400, 118, DocWu13, 50);
        call DocWuOpts1;
        giq_option(4, 400, 119, DocWu12, 50);
        call DocWuOpts2;
        giq_option(4, 400, 120, DocWu14, 50);
        call DocWuOpts3;
end
procedure DocWu03
begin
        set_local_var(5, 0);
        set_local_var(6, 0);
        set_local_var(7, 0);
        gsay_reply(400, 121);
        giq_option(7, 400, 122, DocWu15, 50);
        call DocWuOpts1;
        giq_option(4, 400, 123, DocWu12, 50);
        call DocWuOpts2;
        giq_option(4, 400, 124, DocWu14, 50);
        call DocWuOpts3;
end
procedure DocWu04
begin
        gsay_reply(400, 125);
        giq_option(7, 400, 126, DocWu16, 50);
        call DocWuOpts4;
end
procedure DocWu05
begin
        gsay_reply(400, 130);
        giq_option(0, 400, 101, DocWuEnd, 50);
end
procedure DocWu06
begin
        gsay_reply(400, 131);
        giq_option(0, 400, 100, DocWu06a, 50);
end
procedure DocWu06a
begin
        healing := 1;
end
procedure DocWu07
begin
        gsay_reply(400, 142);
        call DocWuOpts4;
end
procedure DocWu08
begin
        gsay_reply(400, 143);
        giq_option(0, 400, 101, DocWuEnd, 50);
end
procedure DocWu09
begin
        gsay_reply(400, 144);
        giq_option(4, 400, 145, DocWu06, 50);
        giq_option(4, 400, 146, DocWu23, 50);
        giq_option(4, 400, 147, DocWu24, 50);
end
procedure DocWu10
begin
        gsay_reply(400, 148);
        giq_option(0, 400, 100, DocWu10a, 50);
end
procedure DocWu10a
begin
        gsay_reply(400, 151);
        giq_option(0, 400, 100, DocWu10c, 50);
end
procedure DocWu10b
begin
        healing := 5;
end
procedure DocWu10c
begin
        healing := 2;
end
procedure DocWu11
begin
        gsay_reply(400, 154);
        call DocWuOpts4;
end
procedure DocWu12
begin
        gsay_reply(400, 155);
        call DocWuOpts4;
end
procedure DocWu13
begin
        gsay_reply(400, 156);
        call DocWuOpts4;
end
procedure DocWu14
begin
        gsay_reply(400, 157);
        giq_option(4, 400, 158, DocWu06, 50);
        giq_option(4, 400, 159, DocWu23, 50);
        giq_option(4, 400, 160, DocWu24, 50);
end
procedure DocWu15
begin
        gsay_reply(400, 161);
        giq_option(4, 400, 162, DocWu06, 50);
        giq_option(4, 400, 163, DocWu23, 50);
        giq_option(4, 400, 160, DocWu24, 50);
end
procedure DocWu16
begin
        gsay_reply(400, 164);
        giq_option(4, 400, 162, DocWu06, 50);
        giq_option(4, 400, 163, DocWu23, 50);
        giq_option(4, 400, 160, DocWu24, 50);
end
procedure DocWu17
begin
        gsay_reply(400, 165);
        giq_option(0, 400, 100, DocWu17a, 50);
end
procedure DocWu17a
begin
        gsay_reply(400, 166);
        giq_option(0, 400, 100, DocWu17b, 50);
end
procedure DocWu17b
begin
        healing := 3;
end
procedure DocWu18
begin
        gsay_reply(400, 169);
        giq_option(0, 400, 101, DocWuEnd, 50);
end
procedure DocWu19
begin
        variable LVar0 := 0;
        variable LVar1 := 0;
        LVar1 := get_critter_stat(dude_obj, 7);
        LVar0 := get_critter_stat(dude_obj, 35);
        if (LVar0 == LVar1) then begin
                gsay_reply(400, 170);
                giq_option(0, 400, 101, DocWuEnd, 50);
        end
        else begin
                if (LVar0 > (LVar1 / 2)) then begin
                        call DocWu19a;
                end
                else begin
                        call DocWu19b;
                end
        end
end
procedure DocWu19a
begin
        gsay_reply(400, 171);
        giq_option(4, 400, 127, DocWu06, 50);
        giq_option(4, 400, 173, DocWu23, 50);
end
procedure DocWu19b
begin
        gsay_reply(400, 171);
        giq_option(4, 400, 127, DocWu06, 50);
        giq_option(4, 400, 173, DocWu18, 50);
end
procedure DocWu20
begin
        gsay_reply(400, 174);
        giq_option(0, 400, 100, DocWu20a, 50);
end
procedure DocWu20a
begin
        gsay_reply(400, 137);
        giq_option(0, 400, 100, DocWu20b, 50);
end
procedure DocWu20b
begin
        healing := 4;
end
procedure DocWu21
begin
        gsay_reply(400, 177);
        giq_option(0, 400, 100, DocWu21a, 50);
end
procedure DocWu21a
begin
        healing := 6;
end
procedure DocWu22
begin
        gsay_reply(400, 179);
        giq_option(0, 400, 101, DocWuEnd, 50);
end
procedure DocWu23
begin
        gsay_reply(400, 180);
        giq_option(0, 400, 101, DocWuEnd, 50);
end
procedure DocWu24
begin
        variable LVar0 := 0;
        variable LVar1 := 0;
        LVar1 := get_critter_stat(dude_obj, 7);
        LVar0 := get_critter_stat(dude_obj, 35);
        if (LVar0 == LVar1) then begin
                gsay_reply(400, 170);
                giq_option(0, 400, 101, DocWuEnd, 50);
        end
        else begin
                if (LVar0 > (LVar1 / 2)) then begin
                        call DocWu24a;
                end
                else begin
                        call DocWu24b;
                end
        end
end
procedure DocWu24a
begin
        gsay_reply(400, 181);
        giq_option(4, 400, 127, DocWu17, 50);
        giq_option(4, 400, 173, DocWu23, 50);
end
procedure DocWu24b
begin
        gsay_reply(400, 182);
        giq_option(4, 400, 183, DocWu06, 50);
        giq_option(4, 400, 173, DocWu23, 50);
end
procedure DocWuOpts1
begin
        giq_option(4, 400, 107, DocWu05, 50);
        giq_option(4, 400, 108, DocWu06, 50);
end
procedure DocWuOpts2
begin
        giq_option(4, 400, 110, DocWu08, 50);
end
procedure DocWuOpts3
begin
        giq_option(-3, 400, 112, DocWu10, 50);
        giq_option(-3, 400, 184, DocWuEnd, 50);
end
procedure DocWuOpts4
begin
        giq_option(4, 400, 127, DocWu17, 50);
        giq_option(4, 400, 128, DocWu18, 50);
        giq_option(4, 400, 129, DocWu19, 50);
end
procedure DocWuOpts5
begin
        gsay_reply(400, 132);
        giq_option(7, 400, 133, DocWuOpts5a, 50);
        giq_option(4, 400, 134, DocWu21, 50);
        giq_option(4, 400, 135, DocWu22, 50);
        giq_option(4, 400, 136, DocWuOpts5a, 50);
end
procedure DocWuOpts5a
begin
        if (is_success(roll_vs_skill(dude_obj, 14, 0))) then begin
                call DocWu20;
        end
        else begin
                call DocWu21;
        end
end
procedure DocWuEnd
begin
end
procedure get_reaction
begin
        if (local_var(2) == 0) then begin
                set_local_var(0, 50);
                set_local_var(1, 2);
                set_local_var(2, 1);
                set_local_var(0, local_var(0) + (5 * get_critter_stat(dude_obj, 3)) - 25);
                set_local_var(0, local_var(0) + (10 * has_trait(0, dude_obj, 10)));
                if (has_trait(0, dude_obj, 39)) then begin
                        if (global_var(155) > 0) then begin
                                set_local_var(0, local_var(0) + global_var(155));
                        end
                        else begin
                                set_local_var(0, local_var(0) - global_var(155));
                        end
                end
                else begin
                        if (local_var(3) == 1) then begin
                                set_local_var(0, local_var(0) - global_var(155));
                        end
                        else begin
                                set_local_var(0, local_var(0) + global_var(155));
                        end
                end
                if (global_var(158) > 2) then begin
                        set_local_var(0, local_var(0) - 30);
                end
                if (((global_var(160) + global_var(159)) >= 25) and ((global_var(160) > (3 * global_var(159))) or (global_var(157) == 1))) then begin
                        set_local_var(0, local_var(0) + 20);
                end
                if (((global_var(160) + global_var(159)) >= 25) and ((global_var(159) > (2 * global_var(160))) or (global_var(156) == 1))) then begin
                        set_local_var(0, local_var(0) - 20);
                end
                call ReactToLevel;
        end
end
procedure ReactToLevel
begin
        if (local_var(0) <= 25) then begin
                set_local_var(1, 1);
        end
        else begin
                if (local_var(0) <= 75) then begin
                        set_local_var(1, 2);
                end
                else begin
                        set_local_var(1, 3);
                end
        end
end
procedure LevelToReact
begin
        if (local_var(1) == 1) then begin
                set_local_var(0, random(1, 25));
        end
        else begin
                if (local_var(1) == 2) then begin
                        set_local_var(0, random(26, 75));
                end
                else begin
                        set_local_var(0, random(76, 100));
                end
        end
end
procedure UpReact
begin
        set_local_var(0, local_var(0) + 10);
        call ReactToLevel;
end
procedure DownReact
begin
        set_local_var(0, local_var(0) - 10);
        call ReactToLevel;
end
procedure BottomReact
begin
        set_local_var(1, 1);
        set_local_var(0, 1);
end
procedure TopReact
begin
        set_local_var(0, 100);
        set_local_var(1, 3);
end
procedure BigUpReact
begin
        set_local_var(0, local_var(0) + 25);
        call ReactToLevel;
end
procedure BigDownReact
begin
        set_local_var(0, local_var(0) - 25);
        call ReactToLevel;
end
procedure UpReactLevel
begin
        set_local_var(1, local_var(1) + 1);
        if (local_var(1) > 3) then begin
                set_local_var(1, 3);
        end
        call LevelToReact;
end
procedure DownReactLevel
begin
        set_local_var(1, local_var(1) - 1);
        if (local_var(1) < 1) then begin
                set_local_var(1, 1);
        end
        call LevelToReact;
end
procedure Goodbyes
begin
        exit_line := message_str(634, random(100, 105));
end

Advertisement