AGATHA.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 critter\_p\_proc;

procedure description\_p\_proc;

procedure destroy\_p\_proc;

procedure look\_at\_p\_proc;

procedure talk\_p\_proc;

procedure timed\_event\_p\_proc;

procedure Agatha00;

procedure Agatha01;

procedure Agatha02;

procedure Agatha03;

procedure Agatha04;

procedure Agatha05;

procedure Agatha06;

procedure Agatha07;

procedure Agatha08;

procedure Agatha09;

procedure Agatha10;

procedure Agatha11;

procedure Agatha12;

procedure Agatha13;

procedure Agatha14;

procedure Agatha15;

procedure Agatha16;

procedure Agatha17;

procedure Agatha18;

procedure Agatha19;

procedure Agatha20;

procedure AgathaEnd;

variable initialized;

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 (not(initialized)) then begin

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

                initialized := 1;

        end

        else begin

                if (script\_action == 12) then begin

                        call critter\_p\_proc;

                end

                else begin

                        if (script\_action == 3) then begin

                                call description\_p\_proc;

                        end

                        else begin

                                if (script\_action == 18) then begin

                                        call destroy\_p\_proc;

                                end

                                else begin

                                        if (script\_action == 21) then begin

                                                call look\_at\_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

end

procedure critter\_p\_proc

begin

end

procedure description\_p\_proc

begin

        if (is\_success(do\_check(dude\_obj, 1, has\_trait(0, dude\_obj, 0)))) then begin

                script\_overrides;

                display\_msg(message\_str(663, 102));

        end

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(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;

        if (local\_var(4)) then begin

                display\_msg(message\_str(663, 101));

        end

        else begin

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

        end

end

procedure talk\_p\_proc

begin

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

        gsay\_start;

        if (local\_var(4)) then begin

                if (local\_var(5)) then begin

                        call Agatha14;

                end

                else begin

                        if (local\_var(1) > 1) then begin

                                call Agatha16;

                        end

                        else begin

                                call AgathaEnd;

                        end

                end

        end

        else begin

                call Agatha08;

        end

        gsay\_end;

        end\_dialogue;

end

procedure timed\_event\_p\_proc

begin

end

procedure Agatha00

begin

        float\_msg(self\_obj, message\_str(663, 103), 0);

end

procedure Agatha01

begin

        gsay\_reply(663, 104);

        giq\_option(-3, 663, 105, Agatha02, 49);

        giq\_option(4, 663, 106, AgathaEnd, 50);

        giq\_option(5, 663, 107, Agatha03, 50);

        giq\_option(4, 663, 108, Agatha04, 50);

end

procedure Agatha02

begin

        gsay\_message(663, 109, 49);

end

procedure Agatha03

begin

        gsay\_reply(663, 110);

        giq\_option(5, 663, 111, AgathaEnd, 49);

        giq\_option(6, 663, 112, Agatha04, 50);

        giq\_option(5, 663, 113, AgathaEnd, 50);

end

procedure Agatha04

begin

        gsay\_reply(663, 114);

        giq\_option(5, 663, 115, AgathaEnd, 49);

end

procedure Agatha05

begin

        gsay\_message(663, 116, 50);

end

procedure Agatha06

begin

        call UpReact;

        gsay\_message(663, 117, 49);

end

procedure Agatha07

begin

        gsay\_message(663, 118, 50);

end

procedure Agatha08

begin

        gsay\_reply(663, 119);

        giq\_option(-3, 663, 120, Agatha09, 50);

        giq\_option(4, 663, 121, Agatha10, 50);

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

                giq\_option(5, 663, 122, Agatha13, 50);

        end

        else begin

                giq\_option(7, 663, 123, Agatha13, 50);

        end

        giq\_option(4, 663, 124, Agatha09, 51);

end

procedure Agatha09

begin

        gsay\_message(663, 125, 50);

end

procedure Agatha10

begin

        gsay\_reply(663, 126);

        giq\_option(4, 663, 127, Agatha11, 50);

        giq\_option(4, 663, 128, AgathaEnd, 50);

        giq\_option(6, 663, 129, Agatha12, 49);

end

procedure Agatha11

begin

        gsay\_message(663, 130, 50);

end

procedure Agatha12

begin

        call UpReact;

        gsay\_message(663, 131, 50);

end

procedure Agatha13

begin

        gsay\_message(663, 132, 50);

end

procedure Agatha14

begin

        gsay\_reply(663, 133);

        giq\_option(-3, 663, 134, AgathaEnd, 50);

        giq\_option(4, 663, 135, AgathaEnd, 50);

        giq\_option(6, 663, 136, Agatha15, 50);

end

procedure Agatha15

begin

        gsay\_message(663, 137, 50);

end

procedure Agatha16

begin

        gsay\_reply(663, 138);

        giq\_option(-3, 663, 139, Agatha17, 50);

        giq\_option(4, 663, 140, Agatha20, 50);

        giq\_option(6, 663, 141, Agatha18, 50);

        giq\_option(4, 663, 142, AgathaEnd, 50);

end

procedure Agatha17

begin

        gsay\_message(663, 143, 50);

end

procedure Agatha18

begin

        gsay\_reply(663, 144);

        giq\_option(5, 663, 145, Agatha20, 50);

        giq\_option(5, 663, 146, Agatha19, 51);

end

procedure Agatha19

begin

        call DownReactLevel;

        call DownReactLevel;

        gsay\_message(663, 147, 51);

end

procedure Agatha20

begin

end

procedure AgathaEnd

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