Fallout Wiki
Advertisement
Fallout Wiki
Details
Type Decompiled script
SCRIPTS.LST comment Guard for Lorenzo in the Hub
MSG file CLEO.MSG
Transcript

procedure start;
procedure combat;
procedure critter_p_proc;
procedure pickup_p_proc;
procedure talk_p_proc;
procedure destroy_p_proc;
procedure look_at_p_proc;
procedure Cleo00;
procedure Cleo01;
procedure Cleo02;
procedure Cleo03;
procedure Cleo04;
procedure Cleo05;
procedure Cleo06;
procedure Cleo07;
procedure Cleo08;
procedure Cleo09;
procedure Cleo10;
procedure Cleo11;
procedure Cleo12;
procedure Cleo13;
procedure Cleo14;
procedure Cleo15;
procedure Cleo16;
procedure Cleo17;
procedure Cleo18;
procedure Cleo19;
procedure Cleo20;
procedure Cleo21;
procedure Cleo22;
procedure CleoEnd;
variable hostile;
variable Only_Once := 1;
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
                Only_Once := 0;
                critter_add_trait(self_obj, 1, 6, 39);
                critter_add_trait(self_obj, 1, 5, 52);
        end
        if (script_action == 21) then begin
                call look_at_p_proc;
        end
        else begin
                if (script_action == 4) then begin
                        call pickup_p_proc;
                end
                else begin
                        if (script_action == 11) then begin
                                call talk_p_proc;
                        end
                        else begin
                                if (script_action == 12) then begin
                                        call critter_p_proc;
                                end
                                else begin
                                        if (script_action == 18) then begin
                                                call destroy_p_proc;
                                        end
                                end
                        end
                end
        end
end
procedure combat
begin
        hostile := 1;
end
procedure critter_p_proc
begin
        if (hostile) then begin
                hostile := 0;
                attack_complex(dude_obj, 0, 1, 0, 0, 30000, 0, 0);
        end
end
procedure pickup_p_proc
begin
        if (source_obj == dude_obj) then begin
                hostile := 1;
        end
end
procedure talk_p_proc
begin
        call get_reaction;
        if (map_var(1) == 1) then begin
                call Cleo01;
        end
        else begin
                if (global_var(107) != 2) then begin
                        start_gdialog(560, self_obj, 4, -1, -1);
                        gsay_start;
                        call Cleo02;
                        gsay_end;
                        end_dialogue;
                end
                else begin
                        start_gdialog(560, self_obj, 4, -1, -1);
                        gsay_start;
                        call Cleo03;
                        gsay_end;
                        end_dialogue;
                end
        end
end
procedure destroy_p_proc
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(159, global_var(159) + 1);
                if ((global_var(159) % 2) == 0) then begin
                        set_global_var(155, global_var(155) - 1);
                end
        end
end
procedure look_at_p_proc
begin
        script_overrides;
        display_msg(message_str(560, 100));
end
procedure Cleo00
begin
        if (get_critter_stat(dude_obj, 34) == 0) then begin
                float_msg(self_obj, message_str(560, 101), 2);
        end
        else begin
                float_msg(self_obj, message_str(560, 102), 2);
        end
        call combat;
end
procedure Cleo01
begin
        float_msg(self_obj, message_str(560, 103), 2);
end
procedure Cleo02
begin
        gsay_reply(560, 104);
        if (map_var(2) == 1) then begin
                giq_option(4, 560, 106, Cleo05, 50);
        end
        if (global_var(207) == 1) then begin
                giq_option(4, 560, 105, Cleo04, 50);
        end
        giq_option(4, 560, 107, Cleo06, 50);
        if (global_var(219) == 1) then begin
                giq_option(4, 560, 108, Cleo07, 50);
        end
        if (global_var(106) == 1) then begin
                giq_option(4, 560, 109, Cleo08, 50);
        end
        giq_option(4, 560, 110, Cleo09, 50);
        giq_option(-3, 560, 111, Cleo10, 50);
end
procedure Cleo03
begin
        gsay_reply(560, 112);
        if (global_var(207) == 1) then begin
                giq_option(4, 560, 113, Cleo11, 50);
        end
        if (map_var(2) == 1) then begin
                giq_option(4, 560, 114, Cleo05, 50);
        end
        giq_option(4, 560, 115, Cleo12, 50);
        if (global_var(219) == 1) then begin
                giq_option(4, 560, 116, Cleo13, 50);
        end
        if (global_var(106) == 1) then begin
                giq_option(4, 560, 117, Cleo14, 50);
        end
        giq_option(4, 560, 119, Cleo09, 50);
        giq_option(-3, 560, 120, Cleo10, 50);
end
procedure Cleo04
begin
        gsay_reply(560, 121);
        if (map_var(2) == 1) then begin
                giq_option(4, 560, 122, Cleo05, 50);
        end
        giq_option(4, 560, 123, Cleo06, 50);
        if (global_var(219) == 1) then begin
                giq_option(4, 560, 124, Cleo07, 50);
        end
        if (global_var(106) == 1) then begin
                giq_option(4, 560, 125, Cleo08, 50);
        end
        giq_option(4, 560, 126, Cleo09, 50);
        giq_option(-3, 560, 127, Cleo10, 50);
end
procedure Cleo05
begin
        gsay_reply(560, 128);
        if (global_var(207) == 1) then begin
                giq_option(4, 560, 129, Cleo04, 50);
        end
        giq_option(4, 560, 131, Cleo06, 50);
        if (global_var(219) == 1) then begin
                giq_option(4, 560, 132, Cleo07, 50);
        end
        if (global_var(106) == 1) then begin
                giq_option(4, 560, 133, Cleo08, 50);
        end
        giq_option(4, 560, 134, Cleo09, 50);
        giq_option(-3, 560, 135, Cleo10, 50);
end
procedure Cleo06
begin
        gsay_reply(560, 136);
        if (global_var(207) == 1) then begin
                giq_option(4, 560, 137, Cleo04, 50);
        end
        if (map_var(2) == 1) then begin
                giq_option(4, 560, 138, Cleo05, 50);
        end
        if (global_var(219) == 1) then begin
                giq_option(4, 560, 139, Cleo07, 50);
        end
        if (global_var(106) == 1) then begin
                giq_option(4, 560, 140, Cleo08, 50);
        end
        giq_option(4, 560, 141, Cleo09, 50);
        giq_option(-3, 560, 142, Cleo10, 50);
end
procedure Cleo07
begin
        gsay_reply(560, 143);
        if (global_var(207) == 1) then begin
                giq_option(4, 560, 144, Cleo04, 50);
        end
        if (map_var(2) == 1) then begin
                giq_option(4, 560, 145, Cleo05, 50);
        end
        giq_option(4, 560, 146, Cleo06, 50);
        if (global_var(106) == 1) then begin
                giq_option(4, 560, 147, Cleo08, 50);
        end
        giq_option(4, 560, 148, Cleo09, 50);
        giq_option(-3, 560, 149, Cleo10, 50);
end
procedure Cleo08
begin
        gsay_reply(560, 150);
        if (global_var(207) == 1) then begin
                giq_option(4, 560, 151, Cleo04, 50);
        end
        if (map_var(2) == 1) then begin
                giq_option(4, 560, 152, Cleo05, 50);
        end
        giq_option(4, 560, 153, Cleo06, 50);
        if (global_var(219) == 1) then begin
                giq_option(4, 560, 154, Cleo07, 50);
        end
        giq_option(4, 560, 155, Cleo09, 50);
        giq_option(-3, 560, 156, Cleo10, 50);
end
procedure Cleo09
begin
        gsay_message(560, 157, 50);
end
procedure Cleo10
begin
        gsay_message(560, 158, 50);
end
procedure Cleo11
begin
        gsay_reply(560, 159);
        if (map_var(2) == 1) then begin
                giq_option(4, 560, 160, Cleo05, 50);
        end
        giq_option(4, 560, 161, Cleo12, 50);
        if (global_var(219) == 1) then begin
                giq_option(4, 560, 162, Cleo13, 50);
        end
        if (global_var(106) == 1) then begin
                gsay_message(560, 4, 50);
        end
        giq_option(4, 560, 165, Cleo09, 50);
        giq_option(-3, 560, 166, Cleo10, 50);
end
procedure Cleo12
begin
        gsay_reply(560, 167);
        if (global_var(207) == 1) then begin
                giq_option(4, 560, 168, Cleo11, 50);
        end
        if (map_var(2) == 1) then begin
                giq_option(4, 560, 169, Cleo05, 50);
        end
        if (global_var(219) == 1) then begin
                giq_option(4, 560, 170, Cleo13, 50);
        end
        if (global_var(106) == 1) then begin
                giq_option(4, 560, 171, Cleo14, 50);
        end
        giq_option(4, 560, 173, Cleo09, 50);
        giq_option(-3, 560, 174, Cleo10, 50);
end
procedure Cleo13
begin
        gsay_message(560, 175, 50);
end
procedure Cleo14
begin
        set_global_var(219, 1);
        gsay_reply(560, 176);
        giq_option(4, 560, 177, Cleo15, 50);
        giq_option(4, 560, 178, Cleo16, 50);
        giq_option(4, 560, 179, Cleo17, 50);
        giq_option(4, 560, 180, Cleo18, 50);
end
procedure Cleo15
begin
        gsay_message(560, 181, 50);
end
procedure Cleo16
begin
        gsay_message(560, 182, 50);
end
procedure Cleo17
begin
        gsay_reply(560, 183);
        giq_option(4, 560, 184, Cleo20, 50);
        giq_option(4, 560, 185, Cleo20, 50);
        giq_option(4, 560, 186, Cleo21, 50);
        giq_option(4, 560, 187, Cleo22, 50);
end
procedure Cleo18
begin
        gsay_message(560, 188, 50);
end
procedure Cleo19
begin
        gsay_message(560, 189, 50);
end
procedure Cleo20
begin
        gsay_message(560, 190, 50);
end
procedure Cleo21
begin
        gsay_message(560, 191, 50);
end
procedure Cleo22
begin
        gsay_message(560, 192, 50);
end
procedure CleoEnd
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