AVERY.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;

procedure critter\_p\_proc;

procedure pickup\_p\_proc;

procedure talk\_p\_proc;

procedure destroy\_p\_proc;

procedure look\_at\_p\_proc;

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, 73);

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

        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 (get\_critter\_stat(dude\_obj, 34) == 0) then begin

                float\_msg(self\_obj, message\_str(554, 101), 2);

        end

        else begin

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

        end

        call combat;

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(160, global\_var(160) + 1);

                if ((global\_var(160) % 6) == 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(554, 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