ANDREW.INT

*This image comes from* Fallout Mod *or from websites created and owned by Game publisher or Game developer, who hold the copyright of* Fallout Mod*. All trademarks and registered trademarks present in the image are proprietary to Game publisher.
The use of images to illustrate articles concerning the subject of the images in question is believed to qualify as **fair use** under United States copyright law, as such display does not significantly impede the right of the copyright holder to sell the copyrighted material.*

Template:Scriptfile

Template:Scriptbox

File:Transcript.png
procedure start;

procedure combat\_p\_proc;

procedure critter\_p\_proc;

procedure look\_at\_p\_proc;

procedure pickup\_p\_proc;

procedure talk\_p\_proc;

procedure timed\_event\_p\_proc;

procedure damage\_p\_proc;

procedure destroy\_p\_proc;

procedure Andrew01;

procedure Andrew02;

procedure Andrew03;

procedure Andrew04;

procedure Andrew05;

procedure Andrew06;

variable hostile;

variable round\_counter;

variable moving\_flag := 1;

import variable jail\_door\_ptr;

procedure map\_enter\_p\_proc;

procedure start

begin

        if (script\_action == 13) then begin

                call combat\_p\_proc;

        end

        else begin

                if (script\_action == 12) then begin

                        call critter\_p\_proc;

                end

                else begin

                        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

                                                        call timed\_event\_p\_proc;

                                                end

                                        end

                                end

                        end

                end

        end

end

procedure combat\_p\_proc

begin

        if (fixed\_param == 4) then begin

                round\_counter := round\_counter + 1;

        end

        if (round\_counter > 3) then begin

                if (global\_var(247) == 0) then begin

                        set\_global\_var(247, 1);

                        set\_global\_var(155, global\_var(155) - 5);

                end

        end

end

procedure critter\_p\_proc

begin

        if (hostile) then begin

                hostile := 0;

                attack\_complex(dude\_obj, 0, 1, 0, 0, 30000, 0, 0);

        end

        else begin

                if ((map\_var(1) == 1) and ((game\_time / (10 \* 60 \* 60 \* 24)) > map\_var(5))) then begin

                        if (jail\_door\_ptr != 0) then begin

                                obj\_unlock(jail\_door\_ptr);

                                use\_obj(jail\_door\_ptr);

                                moving\_flag := 0;

                                rm\_timer\_event(self\_obj);

                                add\_timer\_event(self\_obj, game\_ticks(5), 1);

                        end

                        set\_map\_var(1, 0);

                        float\_msg(self\_obj, message\_str(172, 101), 3);

                end

                else begin

                        if (map\_var(3) == 1) then begin

                                set\_map\_var(3, map\_var(3) + 1);

                                float\_msg(self\_obj, message\_str(172, 116), 2);

                        end

                        else begin

                                if (map\_var(3) == 3) then begin

                                        if (jail\_door\_ptr != 0) then begin

                                                obj\_unlock(jail\_door\_ptr);

                                        end

                                        hostile := 1;

                                end

                                else begin

                                        if (moving\_flag == 1) then begin

                                                if (tile\_num(self\_obj) != local\_var(1)) then begin

                                                        animate\_move\_obj\_to\_tile(self\_obj, local\_var(1), 0);

                                                end

                                        end

                                        if ((global\_var(247) == 1) and obj\_can\_see\_obj(self\_obj, dude\_obj)) then begin

                                                dialogue\_system\_enter;

                                        end

                                end

                        end

                end

        end

end

procedure look\_at\_p\_proc

begin

        if (local\_var(0) == 1) then begin

                script\_overrides;

                display\_msg(message\_str(172, 100));

        end

end

procedure pickup\_p\_proc

begin

        hostile := 1;

end

procedure talk\_p\_proc

begin

        if (global\_var(247) == 1) then begin

                float\_msg(self\_obj, message\_str(172, 102), 2);

                hostile := 1;

        end

        else begin

                start\_gdialog(172, self\_obj, 4, -1, -1);

                gsay\_start;

                call Andrew01;

                gsay\_end;

                end\_dialogue;

        end

end

procedure timed\_event\_p\_proc

begin

        if (fixed\_param == 1) then begin

                obj\_close(jail\_door\_ptr);

                rm\_timer\_event(self\_obj);

                add\_timer\_event(self\_obj, game\_ticks(10), 2);

        end

        else begin

                if (fixed\_param == 2) then begin

                        moving\_flag := 1;

                end

        end

end

procedure damage\_p\_proc

begin

        if (source\_obj == dude\_obj) then begin

                set\_global\_var(247, 1);

        end

end

procedure destroy\_p\_proc

begin

        if (source\_obj == dude\_obj) then begin

                set\_global\_var(247, 1);

                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

end

procedure Andrew01

begin

        gsay\_reply(172, 103);

        giq\_option(4, 172, 104, Andrew02, 50);

        giq\_option(4, 172, 105, Andrew03, 50);

        giq\_option(4, 172, 106, Andrew04, 50);

        giq\_option(-3, 172, 113, Andrew06, 50);

end

procedure Andrew02

begin

        set\_local\_var(0, 1);

        gsay\_reply(172, 107);

        giq\_option(4, 172, 105, Andrew03, 50);

        giq\_option(4, 172, 106, Andrew04, 50);

end

procedure Andrew03

begin

        gsay\_reply(172, 108);

        giq\_option(6, 172, 109, Andrew05, 50);

        giq\_option(4, 172, 110, Andrew04, 50);

end

procedure Andrew04

begin

        gsay\_message(172, 111, 50);

end

procedure Andrew05

begin

        gsay\_reply(172, 112);

        giq\_option(4, 172, 110, Andrew04, 50);

end

procedure Andrew06

begin

        if (get\_critter\_stat(dude\_obj, 34) == 0) then begin

                gsay\_message(172, 114, 50);

        end

        else begin

                gsay\_message(172, 115, 50);

        end

end

procedure map\_enter\_p\_proc

begin

        if (global\_var(15) == 1) then begin

                kill\_critter(self\_obj, 49);

        end

        critter\_add\_trait(self\_obj, 1, 6, 12);

        critter\_add\_trait(self\_obj, 1, 5, 17);

        if (local\_var(1) == 0) then begin

                set\_local\_var(1, tile\_num(self\_obj));

        end

end