Fallout Wiki
Fallout Wiki
Details
Type Decompiled script
SCRIPTS.LST comment Beth who runs the general store in the Hub
MSG file HBETH.MSG

/*******************************************************

  • Some unreferenced imported varables found. *
  • Because of it it is impossible to specify *
  • the real names of global variables. *
                                                                                                              • /

variable GVar0;
variable GVar1 := 1;
variable GVar2;
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 Beth00;
procedure Beth01;
procedure Beth02;
procedure Beth02a;
procedure Beth02b;
procedure Beth03;
procedure Beth03a;
procedure Beth04;
procedure Beth05;
procedure Beth06;
procedure Beth07;
procedure Beth08;
procedure Beth09;
procedure Beth10;
procedure Beth11;
procedure Beth12;
procedure Beth13;
procedure Beth14;
procedure Beth15;
procedure Beth15a;
procedure Beth16;
procedure Beth16a;
procedure Beth17;
procedure Beth17a;
procedure Beth17b;
procedure Beth18;
procedure Beth19;
procedure Beth20;
procedure Beth21;
procedure Beth22;
procedure Beth23;
procedure Beth24;
procedure Beth25;
procedure Beth26;
procedure Beth27;
procedure Beth27a;
procedure Beth28;
procedure Beth29;
procedure Beth30;
procedure Beth31;
procedure Beth32;
procedure Beth33;
procedure Beth34;
procedure Beth35;
procedure Beth35a;
procedure Beth36;
procedure Beth37;
procedure Beth38;
procedure Beth39;
procedure Beth40;
procedure Beth40a;
procedure Beth41;
procedure Beth42;
procedure Beth43;
procedure Beth44;
procedure Beth45;
procedure Beth46;
procedure Beth47;
procedure Beth48;
procedure Beth49;
procedure Beth50;
procedure Beth52;
procedure Beth52a;
procedure Beth53;
procedure Beth54;
procedure Beth55;
procedure Beth56;
procedure Beth57;
procedure Beth58;
procedure Beth59;
procedure Beth60;
procedure Beth61;
procedure Beth62;
procedure Beth63;
procedure Beth64;
procedure Beth65;
procedure Beth66;
procedure Beth67;
procedure Beth68;
procedure Beth69;
procedure BethEnd;
procedure Get_Stuff;
procedure Put_Stuff;
/* ?import? variable hostile; */
/* ?import? variable Only_Once; */
/* ?import? variable Sid_Ptr; */
import variable Beth_Ptr;
import variable Beth_Box_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;
/* ?import? variable exit_line; */
procedure Beth02c;
procedure start
begin
        variable LVar0 := 0;
        if (GVar1) then begin
                GVar1 := 0;
                Beth_Ptr := self_obj;
                critter_add_trait(self_obj, 1, 6, 37);
                critter_add_trait(self_obj, 1, 5, 50);
        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
        GVar0 := 1;
end
procedure critter_p_proc
begin
        if (GVar0) then begin
                GVar0 := 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
                GVar0 := 1;
        end
end
procedure talk_p_proc
begin
        variable LVar0 := 0;
        call Get_Stuff;
        call get_reaction;
        if ((((game_time / (10 * 60 * 60 * 24)) - local_var(16)) >= 1) or (local_var(16) == 0)) then begin
                set_local_var(16, game_time / (10 * 60 * 60 * 24));
                set_local_var(17, 1000 + random(0, 1000));
                LVar0 := item_caps_adjust(self_obj, local_var(17));
        end
        else begin
                LVar0 := item_caps_adjust(self_obj, local_var(17));
        end
        if (map_var(10) == 1) then begin
                gdialog_set_barter_mod(5);
        end
        else begin
                gdialog_set_barter_mod(-10);
        end
        set_map_var(33, 1);
        if (local_var(11) == 0) then begin
                set_local_var(11, game_time / (10 * 60 * 60));
        end
        if ((game_time_hour >= 1900) or (game_time_hour < 600)) then begin
                float_msg(self_obj, message_str(617, 361), 2);
        end
        else begin
                if ((obj_item_subtype(critter_inven_obj(dude_obj, 1)) == 3) or (obj_item_subtype(critter_inven_obj(dude_obj, 2)) == 3) and (local_var(14) == 0)) then begin
                        call Beth55;
                end
                else begin
                        if ((obj_item_subtype(critter_inven_obj(dude_obj, 1)) == 3) or (obj_item_subtype(critter_inven_obj(dude_obj, 2)) == 3) and (local_var(14) == 1)) then begin
                                call Beth56;
                        end
                        else begin
                                if (local_var(4) == 1) then begin
                                        start_gdialog(617, self_obj, 4, -1, -1);
                                        gsay_start;
                                        if (local_var(1) > 1) then begin
                                                call Beth64;
                                        end
                                        else begin
                                                call Beth65;
                                        end
                                        gsay_end;
                                        end_dialogue;
                                end
                                else begin
                                        set_local_var(4, 1);
                                        start_gdialog(617, self_obj, 4, -1, -1);
                                        gsay_start;
                                        call Beth00;
                                        gsay_end;
                                        end_dialogue;
                                end
                        end
                end
        end
        set_local_var(11, game_time / (10 * 60 * 60));
        LVar0 := item_caps_adjust(self_obj, -1 * item_caps_total(self_obj));
        call Put_Stuff;
end
procedure destroy_p_proc
begin
        move_obj_inven_to_obj(Beth_Box_Ptr, 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 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(617, 100));
end
procedure Beth00
begin
        gsay_reply(617, 101);
        call Beth01;
end
procedure Beth01
begin
        giq_option(4, 617, 102, Beth09, 50);
        giq_option(4, 617, 104, Beth62, 49);
        giq_option(4, 617, 398, Beth68, 50);
        giq_option(4, 617, 105, Beth63, 50);
        giq_option(4, 617, 106, Beth06, 50);
        giq_option(4, 617, 107, BethEnd, 50);
        giq_option(-3, 617, 108, Beth04, 50);
end
procedure Beth02
begin
        if (map_var(41) == 1) then begin
                giq_option(4, 617, 109, Beth36, 50);
        end
        if (global_var(226) >= 1) then begin
                giq_option(4, 617, 110, Beth02a, 50);
        end
        if (global_var(219) == 1) then begin
                giq_option(4, 617, 112, Beth02b, 50);
        end
        giq_option(4, 617, 398, Beth69, 50);
        giq_option(4, 617, 113, Beth23, 50);
        giq_option(4, 617, 114, Beth03a, 50);
        giq_option(4, 617, 115, BethEnd, 50);
end
procedure Beth02a
begin
        if (global_var(226) == 5) then begin
                call Beth37;
        end
        else begin
                call Beth38;
        end
end
procedure Beth02b
begin
        if (global_var(203) != 0) then begin
                call Beth66;
        end
        else begin
                call Beth14;
        end
end
procedure Beth03
begin
        if (local_var(10) == 1) then begin
                if ((local_var(5) == 0) and (global_var(203) == 2)) then begin
                        set_local_var(5, 1);
                        set_global_var(219, 1);
                        gsay_reply(617, 123);
                end
                else begin
                        if ((local_var(6) == 0) and (global_var(203) == 2)) then begin
                                set_local_var(5, 1);
                                gsay_reply(617, 124);
                        end
                        else begin
                                if ((local_var(7) == 0) and (global_var(112) == 2)) then begin
                                        set_local_var(5, 1);
                                        gsay_reply(617, 125);
                                end
                                else begin
                                        if ((local_var(8) == 0) and (global_var(18) == 1)) then begin
                                                set_local_var(5, 1);
                                                gsay_reply(617, 126);
                                        end
                                        else begin
                                                if ((local_var(9) == 0) and (global_var(17) == 1)) then begin
                                                        set_local_var(5, 1);
                                                        gsay_reply(617, 127);
                                                end
                                        end
                                end
                        end
                end
        end
        else begin
                set_local_var(10, 1);
                if ((local_var(5) == 0) and (global_var(203) == 2)) then begin
                        set_local_var(5, 1);
                        set_global_var(219, 1);
                        gsay_reply(617, 117);
                end
                else begin
                        if ((local_var(6) == 0) and (global_var(203) == 2)) then begin
                                set_local_var(5, 1);
                                gsay_reply(617, 118);
                        end
                        else begin
                                if ((local_var(7) == 0) and (global_var(112) == 2)) then begin
                                        set_local_var(5, 1);
                                        gsay_reply(617, 119);
                                end
                                else begin
                                        if ((local_var(8) == 0) and (global_var(18) == 1)) then begin
                                                set_local_var(5, 1);
                                                gsay_reply(617, 121);
                                        end
                                        else begin
                                                if ((local_var(9) == 0) and (global_var(17) == 1)) then begin
                                                        set_local_var(5, 1);
                                                        gsay_reply(617, 122);
                                                end
                                        end
                                end
                        end
                end
        end
        giq_option(4, 617, 128, Beth03a, 50);
        giq_option(4, 617, 129, Beth39, 50);
        giq_option(4, 617, 130, BethEnd, 50);
end
procedure Beth03a
begin
        if ((local_var(5) == 0) and (global_var(203) == 2) or ((local_var(6) == 0) and (global_var(203) == 2)) or ((local_var(7) == 0) and (global_var(112) == 2)) or ((local_var(8) == 0) and (global_var(18) == 1)) or ((local_var(9) == 0) and (global_var(17) == 1))) then begin
                call Beth03;
        end
        else begin
                call Beth12;
        end
end
procedure Beth04
begin
        gsay_reply(617, 131);
        giq_option(-3, 617, 132, Beth05, 50);
        giq_option(-3, 617, 133, Beth05, 50);
end
procedure Beth05
begin
        gsay_message(617, 134, 50);
end
procedure Beth06
begin
        gsay_reply(617, 135);
        giq_option(4, 617, 136, BethEnd, 50);
end
procedure Beth07
begin
        gsay_reply(617, 137);
        giq_option(4, 617, 138, Beth08, 50);
        giq_option(4, 617, 139, Beth11, 50);
end
procedure Beth08
begin
        gsay_reply(617, 140);
        call Beth01;
end
procedure Beth09
begin
        gsay_reply(617, 141);
        call Beth02;
end
procedure Beth10
begin
        gsay_reply(617, 142);
        call Beth02;
end
procedure Beth11
begin
        gsay_message(617, 143, 50);
end
procedure Beth12
begin
        gsay_reply(617, 144);
        giq_option(4, 617, 145, Beth08, 50);
        giq_option(4, 617, 146, Beth13, 50);
end
procedure Beth13
begin
        gsay_message(617, 147, 50);
end
procedure Beth14
begin
        gsay_reply(617, 148);
        giq_option(4, 617, 149, Beth15, 50);
        giq_option(4, 617, 150, Beth20, 50);
end
procedure Beth15
begin
        set_global_var(219, 1);
        gsay_reply(617, 151);
        giq_option(4, 617, 152, Beth16, 50);
        if ((map_var(46) >= 4) or (map_var(46) >= 4)) then begin
                giq_option(4, 617, 153, Beth15a, 51);
        end
        giq_option(4, 617, 154, BethEnd, 50);
end
procedure Beth15a
begin
        call BigDownReact;
        call Beth21;
end
procedure Beth16
begin
        set_map_var(48, 1);
        gsay_reply(617, 155);
        if ((map_var(46) >= 5) or (map_var(46) >= 5)) then begin
                giq_option(4, 617, 156, Beth16a, 51);
        end
        giq_option(4, 617, 157, Beth17, 50);
        giq_option(4, 617, 158, Beth18, 50);
        giq_option(4, 617, 159, Beth18, 50);
end
procedure Beth16a
begin
        call BottomReact;
        call Beth22;
end
procedure Beth17
begin
        gsay_reply(617, 160);
        giq_option(4, 617, 161, Beth18, 50);
        giq_option(4, 617, 162, Beth17a, 51);
        giq_option(4, 617, 163, Beth17b, 51);
end
procedure Beth17a
begin
        call DownReact;
        call Beth19;
end
procedure Beth17b
begin
        call BigDownReact;
        call Beth19;
end
procedure Beth18
begin
        gsay_reply(617, 164);
        call Beth02;
end
procedure Beth19
begin
        gsay_message(617, 165, 51);
end
procedure Beth20
begin
        gsay_reply(617, 166);
        call Beth02;
end
procedure Beth21
begin
        gsay_message(617, 167, 51);
end
procedure Beth22
begin
        gsay_message(617, 168, 51);
end
procedure Beth23
begin
        gsay_reply(617, 169);
        call Beth24;
end
procedure Beth24
begin
        giq_option(4, 617, 170, Beth25, 50);
        giq_option(4, 617, 172, Beth30, 50);
        giq_option(4, 617, 173, Beth33, 50);
        giq_option(4, 617, 174, Beth42, 50);
        giq_option(4, 617, 175, BethEnd, 50);
end
procedure Beth25
begin
        gsay_reply(617, 177);
        giq_option(4, 617, 178, Beth27, 50);
        if (map_var(41) == 1) then begin
                giq_option(4, 617, 179, Beth34, 50);
        end
        giq_option(4, 617, 180, Beth26, 50);
        giq_option(4, 617, 181, BethEnd, 50);
end
procedure Beth26
begin
        gsay_reply(617, 182);
        call Beth24;
end
procedure Beth27
begin
        gsay_reply(617, 183);
        giq_option(4, 617, 184, Beth28, 50);
        giq_option(4, 617, 185, Beth27a, 51);
        giq_option(4, 617, 186, Beth26, 50);
        giq_option(4, 617, 187, BethEnd, 50);
end
procedure Beth27a
begin
        call BigDownReact;
        call BethEnd;
end
procedure Beth28
begin
        gsay_reply(617, 188);
        giq_option(4, 617, 189, Beth29, 50);
        giq_option(4, 617, 190, Beth26, 50);
        giq_option(4, 617, 191, BethEnd, 50);
end
procedure Beth29
begin
        gsay_reply(617, 192);
        call Beth24;
end
procedure Beth30
begin
        gsay_reply(617, 193);
        giq_option(4, 617, 194, Beth32, 50);
        giq_option(4, 617, 195, Beth31, 50);
        giq_option(4, 617, 196, Beth26, 50);
        giq_option(4, 617, 197, BethEnd, 50);
end
procedure Beth31
begin
        gsay_reply(617, 198);
        giq_option(4, 617, 199, Beth32, 50);
        giq_option(4, 617, 200, Beth26, 50);
        giq_option(4, 617, 201, BethEnd, 50);
end
procedure Beth32
begin
        gsay_reply(617, 202);
        giq_option(4, 617, 203, Beth31, 50);
        giq_option(4, 617, 204, Beth26, 50);
        giq_option(4, 617, 205, BethEnd, 50);
end
procedure Beth33
begin
        gsay_reply(617, 206);
        call Beth24;
end
procedure Beth34
begin
        gsay_reply(617, 207);
        call Beth35;
end
procedure Beth35
begin
        if (map_var(41) == 1) then begin
                giq_option(4, 617, 208, Beth40, 50);
        end
        if (global_var(226) >= 1) then begin
                giq_option(4, 617, 209, Beth46, 50);
        end
        if (map_var(41) == 1) then begin
                giq_option(4, 617, 212, Beth35a, 50);
        end
        giq_option(4, 617, 213, Beth24, 50);
        giq_option(4, 617, 214, BethEnd, 50);
end
procedure Beth35a
begin
        if (obj_pid(critter_inven_obj(dude_obj, 0)) == 3) then begin
                call Beth54;
        end
        else begin
                call Beth53;
        end
end
procedure Beth36
begin
        gsay_reply(617, 215);
        call Beth35;
end
procedure Beth37
begin
        gsay_reply(617, 216);
        call Beth35;
end
procedure Beth38
begin
        gsay_reply(617, 217);
        call Beth35;
end
procedure Beth39
begin
        gsay_reply(617, 218);
        call Beth02;
end
procedure Beth40
begin
        gsay_reply(617, 219);
        giq_option(4, 617, 220, Beth43, 50);
        giq_option(4, 617, 221, Beth44, 50);
        giq_option(4, 617, 222, Beth35, 50);
        giq_option(4, 617, 223, Beth23, 50);
        giq_option(4, 617, 224, Beth40a, 51);
        giq_option(4, 617, 225, BethEnd, 50);
end
procedure Beth40a
begin
        call BigDownReact;
        call Beth41;
end
procedure Beth41
begin
        gsay_message(617, 226, 51);
end
procedure Beth42
begin
        gsay_reply(617, 227);
        call Beth24;
end
procedure Beth43
begin
        gsay_reply(617, 228);
        giq_option(4, 617, 229, Beth44, 50);
        giq_option(4, 617, 230, Beth35, 50);
        giq_option(4, 617, 231, Beth23, 50);
        giq_option(4, 617, 232, BethEnd, 50);
end
procedure Beth44
begin
        gsay_reply(617, 233);
        giq_option(4, 617, 234, Beth44, 50);
        giq_option(4, 617, 235, Beth35, 50);
        giq_option(4, 617, 236, Beth23, 50);
        giq_option(4, 617, 237, Beth45, 51);
        giq_option(4, 617, 238, BethEnd, 50);
end
procedure Beth45
begin
        call BigDownReact;
        gsay_message(617, 239, 51);
end
procedure Beth46
begin
        gsay_reply(617, 240);
        giq_option(4, 617, 241, Beth47, 50);
        giq_option(4, 617, 242, Beth49, 51);
        giq_option(4, 617, 243, Beth47, 50);
        giq_option(4, 617, 244, Beth50, 50);
end
procedure Beth47
begin
        set_global_var(226, 2);
        gsay_reply(617, 245);
        giq_option(4, 617, 246, Beth48, 50);
        if (get_critter_stat(dude_obj, 34) == 0) then begin
                giq_option(4, 617, 247, Beth49, 51);
        end
        else begin
                giq_option(4, 617, 248, Beth49, 51);
        end
        giq_option(4, 617, 249, Beth35, 50);
        giq_option(4, 617, 250, Beth23, 50);
        giq_option(4, 617, 251, BethEnd, 50);
end
procedure Beth48
begin
        gsay_reply(617, 252);
        giq_option(4, 617, 253, Beth35, 50);
        giq_option(4, 617, 254, Beth23, 50);
        giq_option(4, 617, 255, BethEnd, 50);
end
procedure Beth49
begin
        gsay_message(617, 256, 51);
end
procedure Beth50
begin
        set_global_var(226, 2);
        gsay_reply(617, 257);
        giq_option(4, 617, 258, Beth35, 50);
        giq_option(4, 617, 259, Beth23, 50);
        giq_option(4, 617, 394, Beth48, 50);
        giq_option(4, 617, 260, BethEnd, 50);
end
procedure Beth52
begin
        gsay_reply(617, 266);
        giq_option(4, 617, 267, Beth35, 50);
        giq_option(4, 617, 268, Beth23, 50);
        giq_option(4, 617, 269, Beth52a, 51);
        giq_option(4, 617, 270, BethEnd, 50);
end
procedure Beth52a
begin
        call DownReact;
        call BethEnd;
end
procedure Beth53
begin
        gsay_reply(617, 271);
        if (global_var(108) == 2) then begin
                giq_option(4, 617, 272, Beth57, 50);
                giq_option(4, 617, 273, Beth59, 50);
        end
        else begin
                if (global_var(74) == 2) then begin
                        giq_option(4, 617, 274, Beth58, 50);
                end
                else begin
                        giq_option(4, 617, 275, Beth58, 50);
                end
        end
end
procedure Beth54
begin
        gsay_reply(617, 276);
        if (global_var(108) == 2) then begin
                giq_option(4, 617, 277, Beth61, 50);
        end
        giq_option(4, 617, 278, Beth57, 50);
        giq_option(4, 617, 279, Beth58, 50);
end
procedure Beth55
begin
        set_local_var(14, 1);
        if (get_critter_stat(dude_obj, 34) == 0) then begin
                float_msg(self_obj, message_str(617, 280), 2);
        end
        else begin
                float_msg(self_obj, message_str(617, 281), 2);
        end
end
procedure Beth56
begin
        float_msg(self_obj, message_str(617, 282), 2);
end
procedure Beth57
begin
        gsay_reply(617, 283);
        call Beth60;
end
procedure Beth58
begin
        gsay_reply(617, 284);
        call Beth60;
end
procedure Beth59
begin
        gsay_reply(617, 285);
        call Beth60;
end
procedure Beth60
begin
        giq_option(4, 617, 286, Beth35, 50);
        giq_option(4, 617, 287, Beth23, 50);
        giq_option(4, 617, 288, BethEnd, 50);
end
procedure Beth61
begin
        gsay_reply(617, 289);
        call Beth60;
end
procedure Beth62
begin
        gsay_message(617, random(290, 295), 50);
        if (map_var(10) == 1) then begin
                gsay_message(617, 297, 49);
                gdialog_mod_barter(5);
                gsay_reply(617, 395);
                giq_option(4, 617, 396, BethEnd, 50);
                giq_option(-3, 617, 397, BethEnd, 50);
        end
        else begin
                gdialog_mod_barter(-10);
                gsay_reply(617, 395);
                giq_option(4, 617, 396, BethEnd, 50);
                giq_option(-3, 617, 397, BethEnd, 50);
        end
end
procedure Beth63
begin
        gsay_message(617, random(300, 305), 50);
        if (map_var(10) == 1) then begin
                gsay_message(617, 297, 49);
                gdialog_mod_barter(5);
                gsay_reply(617, 395);
                giq_option(4, 617, 396, BethEnd, 50);
                giq_option(-3, 617, 397, BethEnd, 50);
        end
        else begin
                gdialog_mod_barter(-10);
                gsay_reply(617, 395);
                giq_option(4, 617, 396, BethEnd, 50);
                giq_option(-3, 617, 397, BethEnd, 50);
        end
end
procedure Beth64
begin
        if ((get_critter_stat(dude_obj, 3) >= 7) and (get_critter_stat(dude_obj, 34) == 0)) then begin
                if ((((game_time / (10 * 60 * 60)) - local_var(11)) <= 1) and (get_critter_stat(dude_obj, 34) == 1)) then begin
                        gsay_reply(617, message_str(617, random(311, 314)) + " " + message_str(617, 315));
                end
                else begin
                        if (((game_time / (10 * 60 * 60)) - local_var(11)) <= 1) then begin
                                gsay_reply(617, message_str(617, random(311, 314)) + " " + message_str(617, 316));
                        end
                        else begin
                                if ((((game_time / (10 * 60 * 60)) - local_var(11)) > 1) and (((game_time / (10 * 60 * 60)) - local_var(11)) <= 96)) then begin
                                        gsay_reply(617, message_str(617, random(311, 314)) + " " + message_str(617, 317));
                                end
                                else begin
                                        if ((((game_time / (10 * 60 * 60)) - local_var(11)) > 96) and (((game_time / (10 * 60 * 60)) - local_var(11)) <= 168)) then begin
                                                gsay_reply(617, message_str(617, random(311, 314)) + " " + message_str(617, 318));
                                        end
                                        else begin
                                                if ((((game_time / (10 * 60 * 60)) - local_var(11)) > 168) and (((game_time / (10 * 60 * 60)) - local_var(11)) <= 336)) then begin
                                                        gsay_reply(617, message_str(617, random(311, 314)) + " " + message_str(617, 319));
                                                end
                                                else begin
                                                        if (((game_time / (10 * 60 * 60)) - local_var(11)) > 336) then begin
                                                                gsay_reply(617, message_str(617, random(311, 314)) + " " + message_str(617, 320));
                                                        end
                                                end
                                        end
                                end
                        end
                end
        end
        else begin
                if ((((game_time / (10 * 60 * 60)) - local_var(11)) <= 1) and (get_critter_stat(dude_obj, 34) == 1)) then begin
                        gsay_reply(617, message_str(617, random(311, 313)) + " " + message_str(617, 315));
                end
                else begin
                        if (((game_time / (10 * 60 * 60)) - local_var(11)) <= 1) then begin
                                gsay_reply(617, message_str(617, random(311, 313)) + " " + message_str(617, 316));
                        end
                        else begin
                                if ((((game_time / (10 * 60 * 60)) - local_var(11)) > 1) and (((game_time / (10 * 60 * 60)) - local_var(11)) <= 96)) then begin
                                        gsay_reply(617, message_str(617, random(311, 313)) + " " + message_str(617, 317));
                                end
                                else begin
                                        if ((((game_time / (10 * 60 * 60)) - local_var(11)) > 96) and (((game_time / (10 * 60 * 60)) - local_var(11)) <= 168)) then begin
                                                gsay_reply(617, message_str(617, random(311, 313)) + " " + message_str(617, 318));
                                        end
                                        else begin
                                                if ((((game_time / (10 * 60 * 60)) - local_var(11)) > 168) and (((game_time / (10 * 60 * 60)) - local_var(11)) <= 336)) then begin
                                                        gsay_reply(617, message_str(617, random(311, 313)) + " " + message_str(617, 319));
                                                end
                                                else begin
                                                        if (((game_time / (10 * 60 * 60)) - local_var(11)) > 336) then begin
                                                                gsay_reply(617, message_str(617, random(311, 313)) + " " + message_str(617, 320));
                                                        end
                                                end
                                        end
                                end
                        end
                end
        end
        call Beth01;
end
procedure Beth65
begin
        gsay_reply(617, random(322, 329));
        call Beth01;
end
procedure Beth66
begin
        if (local_var(12) == 0) then begin
                set_local_var(12, 1);
                gsay_reply(617, 330);
        end
        else begin
                gsay_reply(617, 331);
        end
        giq_option(4, 617, 332, Beth18, 50);
        if (local_var(13) == 0) then begin
                giq_option(4, 617, 333, Beth67, 50);
        end
end
procedure Beth67
begin
        variable LVar0 := 0;
        set_local_var(13, 1);
        if (get_critter_stat(dude_obj, 34) == 0) then begin
                gsay_message(617, 334, 49);
        end
        else begin
                gsay_message(617, 335, 49);
        end
        LVar0 := create_object_sid(40, 0, 0, -1);
        add_obj_to_inven(dude_obj, LVar0);
        LVar0 := create_object_sid(40, 0, 0, -1);
        add_obj_to_inven(dude_obj, LVar0);
        LVar0 := create_object_sid(40, 0, 0, -1);
        add_obj_to_inven(dude_obj, LVar0);
        LVar0 := create_object_sid(40, 0, 0, -1);
        add_obj_to_inven(dude_obj, LVar0);
        LVar0 := create_object_sid(40, 0, 0, -1);
        add_obj_to_inven(dude_obj, LVar0);
        LVar0 := create_object_sid(40, 0, 0, -1);
        add_obj_to_inven(dude_obj, LVar0);
end
procedure Beth68
begin
        set_global_var(219, 1);
        gsay_reply(617, 399);
        call Beth01;
end
procedure Beth69
begin
        set_global_var(219, 1);
        gsay_reply(617, 399);
        call Beth02;
end
procedure BethEnd
begin
end
procedure Get_Stuff
begin
        move_obj_inven_to_obj(Beth_Box_Ptr, self_obj);
end
procedure Put_Stuff
begin
        move_obj_inven_to_obj(self_obj, Beth_Box_Ptr);
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 (loca