Fallout Wiki
Advertisement
Fallout Wiki
Details
Type Decompiled script
SCRIPTS.LST comment Talus, Rombus's second in command.
MSG file TALUS.MSG
Transcript

procedure start;
procedure do_dialogue;
procedure weapon_check;
procedure set_requisition;
procedure Talus00;
procedure Talus01;
procedure Talus02;
procedure Talus05;
procedure Talus06;
procedure Talus07;
procedure Talus08;
procedure Talus09;
procedure Talus10;
procedure Talus11;
procedure Talus12;
procedure Talus13;
procedure Talus14;
procedure Talus14a;
procedure Talus15;
procedure Talus16;
procedure Talus17;
procedure Talus18;
procedure Talus19;
procedure Talus20;
procedure Talus21;
procedure Talus22;
procedure Talus23;
procedure Talus24;
procedure Talus25;
procedure Talus26;
procedure Talus27;
procedure Talus28;
procedure Talus29;
procedure Talus30;
procedure Talus31;
procedure Talus31a;
procedure Talus32;
procedure Talus33;
procedure Talus34;
procedure Talus35;
procedure Talus37;
procedure Talus38;
procedure Talus39;
procedure Talus40;
procedure Talus41;
procedure Talus42;
procedure Talus43;
procedure Talus44;
procedure Talus45;
procedure Talus46;
procedure Talus47;
procedure Talus49;
procedure Talus50;
procedure Talus51;
procedure Talus51a;
procedure Talus51b;
procedure Talus51c;
procedure Talus51d;
procedure Talus53;
procedure Talus54;
procedure Talus55;
procedure TalusBackground;
procedure TalusAmmo;
procedure TalusEnd;
procedure critter_p_proc;
procedure pickup_p_proc;
procedure talk_p_proc;
procedure destroy_p_proc;
procedure look_at_p_proc;
variable armed;
variable temp;
variable flag1;
variable flag5;
variable who_vree;
variable who_rhombus;
variable who_maxson;
variable line16flag;
variable Only_Once := 1;
variable Hostile;
variable drugs;
variable awardex;
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 Talus36;
procedure start
begin
        if (Only_Once) then begin
                Only_Once := 0;
                critter_add_trait(self_obj, 1, 6, 44);
                critter_add_trait(self_obj, 1, 5, 65);
                add_timer_event(self_obj, game_ticks(30), 2);
        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 == 22) then begin
                                        if (global_var(250) == 0) then begin
                                                call TalusBackground;
                                        end
                                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
end
procedure do_dialogue
begin
        call weapon_check;
        if (armed) then begin
                if (local_var(6) == 0) then begin
                        call Talus11;
                end
                else begin
                        if (local_var(6) == 1) then begin
                                call Talus12;
                        end
                        else begin
                                call Talus13;
                        end
                end
        end
        else begin
                if ((global_var(109) == 2) and (local_var(8) == 0)) then begin
                        if (local_var(7) == 0) then begin
                                call Talus49;
                        end
                        else begin
                                call Talus47;
                        end
                end
                else begin
                        if (local_var(7) == 0) then begin
                                call Talus00;
                        end
                        else begin
                                if (local_var(1) == 1) then begin
                                        call Talus22;
                                end
                                else begin
                                        call Talus14;
                                end
                        end
                end
        end
        set_local_var(7, 1);
end
procedure weapon_check
begin
        if ((obj_item_subtype(critter_inven_obj(dude_obj, 1)) == 3) or (obj_item_subtype(critter_inven_obj(dude_obj, 2)) == 3)) then begin
                armed := 1;
        end
        else begin
                armed := 0;
        end
end
procedure set_requisition
begin
        set_local_var(5, 1);
        set_map_var(17, 1);
        set_map_var(9, 4);
        set_map_var(14, 1);
        set_map_var(10, 3);
end
procedure Talus00
begin
        gsay_reply(318, 101);
        giq_option(8, 318, 102, Talus01, 50);
        giq_option(4, 318, 103, Talus02, 50);
        if (local_var(5) == 0) then begin
                giq_option(4, 318, 104, Talus07, 50);
        end
        giq_option(4, 318, 401, Talus28, 50);
        giq_option(4, 318, 402, Talus28, 50);
        giq_option(-3, 318, 105, TalusEnd, 50);
end
procedure Talus01
begin
        gsay_reply(318, 106);
        giq_option(4, 318, 107, Talus05, 50);
        call Goodbyes;
        giq_option(4, 0, exit_line, TalusEnd, 50);
end
procedure Talus02
begin
        gsay_reply(318, 108);
        giq_option(4, 318, 107, Talus05, 50);
        call Goodbyes;
        giq_option(4, 0, exit_line, TalusEnd, 50);
end
procedure Talus05
begin
        gsay_reply(318, 110);
        giq_option(7, 318, 111, Talus06, 50);
        if (local_var(5) == 0) then begin
                giq_option(4, 318, 112, Talus07, 50);
        end
        giq_option(4, 318, 401, Talus28, 50);
        giq_option(4, 318, 402, Talus28, 50);
        call Goodbyes;
        giq_option(4, 0, exit_line, TalusEnd, 50);
end
procedure Talus06
begin
        gsay_reply(318, 113);
        giq_option(4, 318, 115, TalusEnd, 50);
        if (local_var(5) == 0) then begin
                giq_option(4, 318, 112, Talus07, 50);
        end
end
procedure Talus07
begin
        gsay_reply(318, 116);
        call set_requisition;
        giq_option(4, 318, 118, Talus08, 50);
        giq_option(4, 318, 119, Talus42, 51);
        giq_option(4, 318, 159, TalusEnd, 50);
end
procedure Talus08
begin
        gsay_reply(318, 406);
        if (global_var(109) != 2) then begin
                giq_option(4, 318, 109, Talus32, 50);
        end
        giq_option(4, 318, 121, Talus09, 51);
        giq_option(4, 318, 193, TalusEnd, 50);
end
procedure Talus09
begin
        set_local_var(11, 1);
        call DownReact;
        gsay_message(318, 122, 51);
end
procedure Talus10
begin
        gsay_message(318, 123, 50);
        gsay_message(318, 124, 50);
        gsay_reply(318, 125);
        giq_option(4, 318, 126, TalusEnd, 50);
end
procedure Talus11
begin
        gsay_message(318, 127, 50);
        set_local_var(6, local_var(6) + 1);
end
procedure Talus12
begin
        gsay_message(318, 128, 50);
        set_local_var(6, local_var(6) + 1);
end
procedure Talus13
begin
        gsay_message(318, 129, 51);
end
procedure Talus14
begin
        gsay_reply(318, message_str(318, 130) + proto_data(obj_pid(dude_obj), 1) + message_str(318, 131));
        if (not(line16flag)) then begin
                giq_option(5, 318, 132, Talus16, 50);
        end
        else begin
                giq_option(5, 318, 133, Talus17, 50);
        end
        if (local_var(5) == 0) then begin
                giq_option(4, 318, 134, Talus15, 50);
        end
        else begin
                giq_option(4, 318, 135, TalusAmmo, 50);
        end
        if (local_var(11) == 1) then begin
                giq_option(4, 318, 403, Talus44, 51);
        end
        giq_option(4, 318, 404, Talus29, 50);
        giq_option(4, 318, 136, TalusEnd, 50);
        giq_option(-3, 318, 105, TalusEnd, 50);
end
procedure Talus14a
begin
        call Talus34;
end
procedure Talus15
begin
        gsay_message(318, 137, 50);
        gsay_reply(318, 138);
        call set_requisition;
        giq_option(4, 318, 118, Talus08, 50);
end
procedure Talus16
begin
        line16flag := 1;
        gsay_message(318, 141, 50);
        call Talus18;
end
procedure Talus17
begin
        gsay_message(318, 142, 50);
        call Talus18;
end
procedure Talus18
begin
        gsay_reply(318, 143);
        giq_option(4, 318, 144, Talus19, 50);
        giq_option(4, 318, 145, Talus20, 50);
        giq_option(4, 318, 146, Talus21, 50);
end
procedure Talus19
begin
        who_rhombus := 1;
        gsay_message(318, 147, 50);
        gsay_reply(318, 148);
        if (who_vree == 0) then begin
                giq_option(4, 318, 145, Talus20, 50);
        end
        if (who_maxson == 0) then begin
                giq_option(4, 318, 146, Talus21, 50);
        end
        giq_option(4, 318, 151, TalusEnd, 50);
end
procedure Talus20
begin
        who_vree := 1;
        gsay_message(318, 152, 50);
        gsay_reply(318, 153);
        if (who_rhombus == 0) then begin
                giq_option(4, 318, 144, Talus19, 50);
        end
        if (who_maxson == 0) then begin
                giq_option(4, 318, 146, Talus21, 50);
        end
        giq_option(4, 318, 156, TalusEnd, 50);
end
procedure Talus21
begin
        who_maxson := 1;
        gsay_reply(318, 157);
        if (who_rhombus == 0) then begin
                giq_option(4, 318, 144, Talus19, 50);
        end
        if (who_vree == 0) then begin
                giq_option(4, 318, 145, Talus20, 50);
        end
        giq_option(4, 318, 160, TalusEnd, 50);
end
procedure Talus22
begin
        gsay_reply(318, 161);
        giq_option(4, 318, 162, DownReact, 51);
        giq_option(4, 318, 163, TalusEnd, 50);
        if (local_var(5) == 1) then begin
                giq_option(4, 318, 135, TalusAmmo, 50);
        end
        giq_option(-3, 318, 164, Talus24, 51);
        giq_option(-3, 318, 165, TalusEnd, 50);
end
procedure Talus23
begin
        gsay_message(318, 166, 51);
        call DownReact;
end
procedure Talus24
begin
        gsay_message(318, 167, 51);
        call DownReact;
end
procedure Talus25
begin
        gsay_message(318, 168, 50);
        set_map_var(17, 1);
        temp := map_var(9) + 3;
        set_map_var(9, temp);
        temp := map_var(10) + 3;
        set_map_var(10, temp);
end
procedure Talus26
begin
        gsay_message(318, 169, 50);
end
procedure Talus27
begin
        gsay_message(318, 170, 50);
end
procedure Talus28
begin
        gsay_reply(318, 149);
        giq_option(4, 318, 102, Talus02, 50);
        giq_option(4, 318, 103, Talus07, 50);
        giq_option(4, 318, 150, TalusEnd, 50);
end
procedure Talus29
begin
        if (local_var(10) == 0) then begin
                set_local_var(10, 1);
                gsay_message(318, 154, 50);
        end
        else begin
                gsay_message(318, 155, 50);
        end
end
procedure Talus30
begin
        call BottomReact;
        gsay_reply(318, 171);
        giq_option(4, 318, 172, Talus37, 51);
        giq_option(4, 318, 173, Talus38, 50);
        giq_option(4, 318, 174, TalusEnd, 51);
end
procedure Talus31
begin
        gsay_reply(318, 175);
        giq_option(4, 318, 176, Talus35, 50);
        giq_option(4, 318, 177, BigDownReact, 51);
        giq_option(4, 318, 178, Talus31a, 50);
end
procedure Talus31a
begin
        if (local_var(9) == 0) then begin
                call Talus39;
        end
        else begin
                call TalusEnd;
        end
end
procedure Talus32
begin
        gsay_reply(318, 158);
        giq_option(4, 318, 176, Talus35, 50);
        giq_option(4, 318, 177, BigDownReact, 51);
        giq_option(4, 318, 178, Talus31a, 49);
end
procedure Talus33
begin
        gsay_reply(318, 179);
        giq_option(4, 318, 176, Talus35, 50);
        giq_option(4, 318, 177, BigDownReact, 51);
        giq_option(4, 318, 178, Talus31a, 49);
end
procedure Talus34
begin
        gsay_message(318, 180, 51);
end
procedure Talus35
begin
        set_global_var(109, 1);
        gsay_reply(318, 181);
        giq_option(4, 318, 182, Talus31a, 49);
        giq_option(4, 318, 183, Talus46, 50);
end
procedure Talus37
begin
        gsay_message(318, 185, 51);
end
procedure Talus38
begin
        gsay_message(318, 186, 51);
end
procedure Talus39
begin
        gsay_message(318, 187, 49);
end
procedure Talus40
begin
        gsay_reply(318, 191);
        giq_option(4, 318, 193, TalusEnd, 50);
end
procedure Talus41
begin
        gsay_message(318, 194, 50);
end
procedure Talus42
begin
        call DownReact;
        gsay_message(318, 195, 51);
end
procedure Talus43
begin
        gsay_reply(318, 196);
        giq_option(4, 318, 192, Talus41, 50);
        giq_option(4, 318, 193, TalusEnd, 50);
end
procedure Talus44
begin
        call DownReact;
        gsay_message(318, 198, 51);
end
procedure Talus45
begin
        call BigDownReact;
        gsay_message(318, 199, 51);
end
procedure Talus46
begin
        gsay_message(318, 200, 50);
end
procedure Talus47
begin
        gsay_reply(318, message_str(318, 201) + proto_data(obj_pid(dude_obj), 1) + message_str(318, 202));
        giq_option(4, 318, 205, Talus51, 50);
        giq_option(-3, 318, 206, Talus50, 50);
end
procedure Talus49
begin
        gsay_reply(318, 207);
        giq_option(4, 318, 205, Talus51, 50);
        giq_option(-3, 318, 206, Talus50, 50);
end
procedure Talus50
begin
        gsay_message(318, 209, 50);
end
procedure Talus51
begin
        gsay_reply(318, 210);
        giq_option(4, 318, 212, Talus51a, 50);
        giq_option(4, 318, 213, Talus51b, 50);
        giq_option(4, 318, 214, Talus51c, 50);
        if (global_var(155) > 15) then begin
                giq_option(4, 318, 407, Talus51d, 50);
        end
        giq_option(4, 318, 215, TalusEnd, 50);
end
procedure Talus51a
begin
        set_map_var(9, map_var(9) + 1);
        set_map_var(12, 1);
        call Talus53;
end
procedure Talus51b
begin
        set_map_var(9, map_var(9) + 1);
        set_map_var(13, 1);
        call Talus53;
end
procedure Talus51c
begin
        set_map_var(9, map_var(9) + 1);
        set_map_var(20, 1);
        call Talus53;
end
procedure Talus51d
begin
        set_map_var(9, map_var(9) + 1);
        set_map_var(15, 1);
        call Talus53;
end
procedure Talus53
begin
        set_local_var(8, 1);
        awardex := 1;
        gsay_message(318, 216, 50);
end
procedure Talus54
begin
        set_local_var(9, 1);
        set_map_var(9, map_var(9) + 1);
        set_map_var(15, 1);
        gsay_message(318, message_str(318, 201) + proto_data(obj_pid(dude_obj), 1) + message_str(318, 217), 50);
end
procedure Talus55
begin
        set_local_var(9, 1);
        gsay_message(318, 218, 50);
end
procedure TalusBackground
begin
        variable LVar0 := 0;
        LVar0 := random(1, 5);
        if (LVar0 == 1) then begin
                LVar0 := message_str(318, 219);
        end
        else begin
                if (LVar0 == 2) then begin
                        LVar0 := message_str(318, 220);
                end
                else begin
                        if (LVar0 == 3) then begin
                                LVar0 := message_str(318, 221);
                        end
                        else begin
                                if (LVar0 == 4) then begin
                                        LVar0 := message_str(318, 222);
                                end
                                else begin
                                        if (LVar0 == 5) then begin
                                                LVar0 := message_str(318, 223);
                                        end
                                end
                        end
                end
        end
        float_msg(self_obj, LVar0, 0);
        add_timer_event(self_obj, game_ticks(180), 2);
end
procedure TalusAmmo
begin
        if (map_var(17) > 0) then begin
                call Talus27;
        end
        else begin
                call Talus25;
        end
end
procedure TalusEnd
begin
end
procedure critter_p_proc
begin
        if (global_var(250)) then begin
                Hostile := 1;
        end
        if (tile_distance_objs(self_obj, dude_obj) > 12) then begin
                Hostile := 0;
        end
        if (Hostile) then begin
                set_global_var(250, 1);
                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 (local_var(7) == 0) then begin
                if (local_var(1) == 1) then begin
                        set_local_var(1, 2);
                        call LevelToReact;
                end
        end
        start_gdialog(318, self_obj, 4, -1, -1);
        gsay_start;
        call do_dialogue;
        gsay_end;
        end_dialogue;
        if (awardex) then begin
                awardex := 0;
                temp := 1500;
                display_msg(message_str(318, 408) + temp + message_str(318, 409));
                set_global_var(155, global_var(155) + 1);
                give_exp_points(temp);
        end
end
procedure destroy_p_proc
begin
        set_global_var(250, 1);
        rm_timer_event(self_obj);
        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(318, 100));
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
procedure Talus36
begin
        gsay_message(318, 184, 51);
end

Advertisement