×
Create a new article
Write your page title here:
We currently have 64,822 articles on Fallout Wiki. Type your article name above or click on one of the titles below and start writing!



Fallout Wiki
64,822Articles
Tardis Banner.webp
FO76 ui roleplay team.pngThis is the transcript of a script file, which runs certain tasks in the game upon execution.
Details
Type Decompiled script
SCRIPTS.LST comment boy who works for Dan the Brahmin Man
MSG file BILLY.MSG
Transcript.png

procedure start;
procedure combat;
procedure critter_p_proc;
procedure pickup_p_proc;
procedure talk_p_proc;
procedure destroy_p_proc;
procedure damage_p_proc;
procedure look_at_p_proc;
procedure combat_p_proc;
procedure timed_event_p_proc;
procedure Billy00;
procedure Billy01;
procedure Billy02;
procedure Billy03;
procedure Billy04;
procedure Billy05;
procedure Billy06;
procedure Billy07;
procedure Billy08;
procedure Billy09;
procedure Billy10;
procedure Billy11;
procedure Billy12;
procedure Billy13;
procedure Billy14;
procedure Billy14a;
procedure Billy15;
procedure Billy15a;
procedure Billy16;
procedure Billy17;
procedure Billy18;
procedure Billy19;
procedure Billy20;
procedure Billy21;
procedure Billy22;
procedure Billy23;
procedure BillyRunAway;
procedure SendToStart;
procedure SendToLeft;
procedure SendToRight;
procedure SendToLower;
procedure SendToSleep;
procedure BillyEnd;
variable hostile;
variable Only_Once := 1;
variable Once_Which_One;
variable Runaway;
variable Sleeping;
variable SetDayNight;
import variable Billy_ptr;
import variable Dan_ptr;
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, 62);
                critter_add_trait(self_obj, 1, 5, 51);
                Billy_ptr := self_obj;
        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
                                        else begin
                                                if (script_action == 13) then begin
                                                        call combat_p_proc;
                                                end
                                                else begin
                                                        if (script_action == 22) then begin
                                                                call timed_event_p_proc;
                                                        end
                                                end
                                        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
        if (Runaway == 0) then begin
                if (global_var(280) == 1) then begin
                        call BillyRunAway;
                end
                if ((game_time_hour >= 600) and (game_time_hour < 700)) then begin
                        if (SetDayNight != 1) then begin
                                add_timer_event(self_obj, game_ticks(10), 1);
                                SetDayNight := 1;
                        end
                end
        end
end
procedure pickup_p_proc
begin
        if (source_obj == dude_obj) then begin
                call Billy11;
        end
end
procedure talk_p_proc
begin
        call get_reaction;
        if (local_var(6) == 1) then begin
                call Billy10;
        end
        else begin
                if (obj_can_see_obj(self_obj, Dan_ptr) or obj_can_hear_obj(self_obj, Dan_ptr)) then begin
                        if (map_var(0) != 2) then begin
                                set_map_var(0, 1);
                        end
                end
                if (local_var(4) == 1) then begin
                        if (map_var(1) == 1) then begin
                                call Billy21;
                        end
                        else begin
                                if (map_var(0) == 2) then begin
                                        call Billy14;
                                end
                                else begin
                                        call Billy23;
                                end
                        end
                end
                else begin
                        call Billy00;
                end
        end
end
procedure destroy_p_proc
begin
        if (source_obj == dude_obj) then begin
                set_global_var(158, global_var(158) + 1);
                set_global_var(155, global_var(155) - 1);
        end
        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 damage_p_proc
begin
        variable LVar0 := 0;
        LVar0 := obj_pid(source_obj);
        if (party_member_obj(LVar0) != 0) then begin
                set_global_var(248, 1);
        end
end
procedure look_at_p_proc
begin
        script_overrides;
        display_msg(message_str(556, 100));
end
procedure combat_p_proc
begin
        set_local_var(6, 1);
end
procedure timed_event_p_proc
begin
        if (Runaway == 0) then begin
                if ((game_time_hour >= 600) and (game_time_hour < 700) or ((game_time_hour >= 700) and (game_time_hour < 1800))) then begin
                        if (Sleeping == 1) then begin
                                reg_anim_func(2, self_obj);
                                reg_anim_func(1, 1);
                                reg_anim_obj_move_to_tile(self_obj, 13889, -1);
                                reg_anim_func(3, 0);
                                add_timer_event(self_obj, game_ticks(60 * 5), 2);
                                Sleeping := 0;
                        end
                        else begin
                                if (fixed_param == 1) then begin
                                        call SendToStart;
                                end
                                if (fixed_param == 2) then begin
                                        call SendToRight;
                                end
                                if (fixed_param == 3) then begin
                                        call SendToLeft;
                                end
                                if (fixed_param == 4) then begin
                                        call SendToLower;
                                end
                        end
                end
                else begin
                        call SendToSleep;
                end
        end
end
procedure Billy00
begin
        set_local_var(4, 1);
        start_gdialog(556, self_obj, 4, -1, -1);
        gsay_start;
        gsay_reply(556, 101);
        giq_option(4, 556, 102, Billy04, 50);
        giq_option(4, 556, 103, Billy01, 50);
        giq_option(4, 556, 104, BillyEnd, 50);
        giq_option(-3, 556, 105, Billy06, 50);
        giq_option(-3, 556, 106, Billy06, 50);
        gsay_end;
        end_dialogue;
end
procedure Billy01
begin
        set_local_var(11, 1);
        gsay_reply(556, 107);
        giq_option(4, 556, 108, Billy02, 50);
        giq_option(4, 556, 109, Billy03, 50);
end
procedure Billy02
begin
        set_global_var(106, 1);
        gsay_message(556, 110, 50);
end
procedure Billy03
begin
        gsay_message(556, 111, 50);
end
procedure Billy04
begin
        set_local_var(10, 1);
        gsay_reply(556, 112);
        giq_option(4, 556, 113, Billy12, 50);
        giq_option(4, 556, 114, Billy05, 50);
end
procedure Billy05
begin
        gsay_reply(556, 115);
        giq_option(4, 556, 116, Billy08, 50);
        giq_option(4, 556, 117, Billy07, 49);
        giq_option(4, 556, 118, BillyEnd, 50);
end
procedure Billy06
begin
        gsay_message(556, 119, 50);
end
procedure Billy07
begin
        gsay_message(556, 120, 49);
end
procedure Billy08
begin
        gsay_reply(556, 121);
        giq_option(4, 556, 122, BillyEnd, 50);
        giq_option(4, 556, 123, Billy09, 49);
end
procedure Billy09
begin
        gsay_message(556, 124, 49);
end
procedure Billy10
begin
        if (Once_Which_One == 0) then begin
                Once_Which_One := 1;
                float_msg(self_obj, message_str(556, 125), 8);
        end
        else begin
                float_msg(self_obj, message_str(556, random(126, 129)), 8);
        end
        animate_move_obj_to_tile(self_obj, 15890, 1);
end
procedure Billy11
begin
        if (local_var(5) == 0) then begin
                set_local_var(5, 1);
                float_msg(self_obj, message_str(556, 130), 8);
        end
        else begin
                float_msg(self_obj, message_str(556, 131), 8);
        end
end
procedure Billy12
begin
        gsay_reply(556, 132);
        giq_option(4, 556, 133, Billy13, 50);
        giq_option(4, 556, 134, BillyEnd, 50);
end
procedure Billy13
begin
        gsay_message(556, 135, 50);
end
procedure Billy14
begin
        if (local_var(7) == 1) then begin
                float_msg(self_obj, message_str(556, 142), 8);
        end
        else begin
                set_local_var(7, 1);
                start_gdialog(556, self_obj, 4, -1, -1);
                gsay_start;
                gsay_reply(556, 136);
                giq_option(4, 556, 137, Billy15, 50);
                giq_option(4, 556, 138, Billy14a, 50);
                giq_option(4, 556, 139, BillyEnd, 50);
                giq_option(-3, 556, 140, Billy06, 50);
                giq_option(-3, 556, 141, Billy06, 50);
                gsay_end;
                end_dialogue;
        end
end
procedure Billy14a
begin
        if (item_caps_total(dude_obj) > 50) then begin
                item_caps_adjust(dude_obj, -50);
                item_caps_adjust(self_obj, 50);
                call Billy19;
        end
        else begin
                call Billy20;
        end
end
procedure Billy15
begin
        gsay_reply(556, 143);
        giq_option(4, 556, 144, Billy15a, 50);
        giq_option(4, 556, 145, Billy18, 51);
        giq_option(4, 556, 146, BillyEnd, 50);
end
procedure Billy15a
begin
        if (is_success(roll_vs_skill(dude_obj, 14, 0))) then begin
                call Billy16;
        end
        else begin
                call Billy17;
        end
end
procedure Billy16
begin
        gsay_message(556, 147, 50);
end
procedure Billy17
begin
        gsay_message(556, 148, 51);
end
procedure Billy18
begin
        if (get_critter_stat(dude_obj, 34) == 0) then begin
                gsay_message(556, 149, 51);
        end
        else begin
                gsay_message(556, 150, 51);
        end
end
procedure Billy19
begin
        if (get_critter_stat(dude_obj, 34) == 0) then begin
                gsay_message(556, 151, 49);
        end
        else begin
                gsay_message(556, 152, 49);
        end
        call BillyRunAway;
end
procedure Billy20
begin
        gsay_message(556, 153, 49);
end
procedure Billy21
begin
        if (local_var(8) == 1) then begin
                float_msg(self_obj, message_str(556, random(158, 164)), 8);
        end
        else begin
                set_local_var(8, 1);
                start_gdialog(556, self_obj, 4, -1, -1);
                gsay_start;
                gsay_reply(556, 154);
                giq_option(4, 556, 155, Billy22, 50);
                giq_option(4, 556, 156, BillyEnd, 50);
                giq_option(-3, 556, 157, Billy06, 50);
                gsay_end;
                end_dialogue;
        end
end
procedure Billy22
begin
        gsay_message(556, 165, 50);
end
procedure Billy23
begin
        if (local_var(9) == 1) then begin
                float_msg(self_obj, message_str(556, random(172, 178)), 8);
        end
        else begin
                set_local_var(9, 1);
                start_gdialog(556, self_obj, 4, -1, -1);
                gsay_start;
                gsay_reply(556, 166);
                if (local_var(10) == 0) then begin
                        giq_option(4, 556, 167, Billy04, 50);
                end
                if (local_var(11) == 4) then begin
                        giq_option(4, 556, 168, Billy01, 50);
                end
                giq_option(4, 556, 169, BillyEnd, 50);
                giq_option(-3, 556, 170, Billy06, 50);
                giq_option(-3, 556, 171, Billy06, 50);
                gsay_end;
                end_dialogue;
        end
end
procedure BillyRunAway
begin
        Runaway := 1;
        animate_move_obj_to_tile(self_obj, 9858, 1);
end
procedure SendToStart
begin
        if (random(1, 10) >= 7) then begin
                reg_anim_func(2, self_obj);
                reg_anim_func(1, 1);
                reg_anim_obj_move_to_tile(self_obj, 13889, -1);
                reg_anim_func(3, 0);
        end
        else begin
                animate_move_obj_to_tile(self_obj, 13889, 1);
        end
        add_timer_event(self_obj, game_ticks(120), 2);
end
procedure SendToLeft
begin
        if (random(1, 10) >= 7) then begin
                reg_anim_func(2, self_obj);
                reg_anim_func(1, 1);
                reg_anim_obj_move_to_tile(self_obj, 13889, -1);
                reg_anim_func(3, 0);
        end
        else begin
                animate_move_obj_to_tile(self_obj, 13889, 1);
        end
        add_timer_event(self_obj, game_ticks(60), 4);
end
procedure SendToRight
begin
        if (random(1, 10) >= 7) then begin
                reg_anim_func(2, self_obj);
                reg_anim_func(1, 1);
                reg_anim_obj_move_to_tile(self_obj, 12072, -1);
                reg_anim_func(3, 0);
        end
        else begin
                animate_move_obj_to_tile(self_obj, 12072, 1);
        end
        add_timer_event(self_obj, game_ticks(60), 3);
end
procedure SendToLower
begin
        if (random(1, 10) >= 7) then begin
                reg_anim_func(2, self_obj);
                reg_anim_func(1, 1);
                reg_anim_obj_move_to_tile(self_obj, 13872, -1);
                reg_anim_func(3, 0);
        end
        else begin
                animate_move_obj_to_tile(self_obj, 13872, 1);
        end
        add_timer_event(self_obj, game_ticks(90), 1);
end
procedure SendToSleep
begin
        if (Sleeping == 0) then begin
                reg_anim_func(2, self_obj);
                reg_anim_func(1, 1);
                reg_anim_obj_move_to_tile(self_obj, 16285, -1);
                reg_anim_func(3, 0);
                Sleeping := 1;
                SetDayNight := 0;
        end
end
procedure BillyEnd
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