ALYA.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 do\_dialogue;

procedure alya00;

procedure alya01;

procedure alya02;

procedure alya03;

procedure alya04;

procedure alya05;

procedure alya06;

procedure alya07;

procedure alya08;

procedure alya09;

procedure alya10;

procedure alyaend;

procedure talk\_p\_proc;

procedure combat;

procedure Critter\_Action;

procedure damage\_p\_proc;

variable HOSTILE;

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

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

                initialized := 1;

        end

        if (script\_action == 11) then begin

                call talk\_p\_proc;

        end

        else begin

                if (script\_action == 22) then begin

                        if (tile\_distance\_objs(self\_obj, dude\_obj) < 8) then begin

                                call combat;

                        end

                end

                else begin

                        if (script\_action == 4) then begin

                                HOSTILE := 1;

                        end

                        else begin

                                if (script\_action == 12) then begin

                                        call Critter\_Action;

                                        if (HOSTILE) then begin

                                                HOSTILE := 0;

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

                                        end

                                end

                                else begin

                                        if (script\_action == 21) then begin

                                                script\_overrides;

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

                                        end

                                        else begin

                                                if (script\_action == 14) then begin

                                                        call damage\_p\_proc;

                                                end

                                                else begin

                                                        if (script\_action == 18) then 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

                                                                set\_global\_var(254, 1);

                                                                set\_global\_var(611, 0);

                                                                set\_global\_var(115, global\_var(115) - 1);

                                                        end

                                                end

                                        end

                                end

                        end

                end

        end

end

procedure do\_dialogue

begin

        set\_local\_var(3, 1);

        call get\_reaction;

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

        gsay\_start;

        if (local\_var(4) == 5) then begin

                call alya10;

        end

        else begin

                set\_local\_var(4, local\_var(4) + 1);

                call alya00;

        end

        gsay\_end;

        end\_dialogue;

end

procedure alya00

begin

        gsay\_reply(143, 101);

        if ((global\_var(103) == 1) and (global\_var(218) == 1)) then begin

                giq\_option(4, 143, 102, alya01, 50);

        end

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

                giq\_option(4, 143, 103, alya02, 50);

        end

        giq\_option(4, 143, 104, alya03, 50);

        giq\_option(4, 143, 105, alyaend, 50);

        giq\_option(-3, 143, 106, alya05, 50);

end

procedure alya01

begin

        gsay\_message(143, 107, 50);

end

procedure alya02

begin

        gsay\_message(143, 108, 50);

        call combat;

end

procedure alya03

begin

        gsay\_reply(143, 109);

        giq\_option(4, 143, 110, alya04, 50);

        giq\_option(4, 143, 111, alya09, 50);

        giq\_option(4, 143, 112, alyaend, 50);

end

procedure alya04

begin

        gsay\_reply(143, 113);

        giq\_option(4, 143, 114, alya06, 50);

        giq\_option(4, 143, 115, alya08, 50);

        giq\_option(4, 143, 116, alyaend, 50);

end

procedure alya05

begin

        gsay\_message(143, 117, 50);

end

procedure alya06

begin

        gsay\_reply(143, 118);

        giq\_option(4, 143, 119, alya07, 50);

        giq\_option(4, 143, 120, combat, 50);

        giq\_option(4, 143, 121, alyaend, 50);

end

procedure alya07

begin

        gsay\_message(143, 122, 50);

        call combat;

end

procedure alya08

begin

        gsay\_message(143, 123, 50);

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

end

procedure alya09

begin

        gsay\_message(143, 124, 50);

end

procedure alya10

begin

        gsay\_message(143, 125, 50);

end

procedure alyaend

begin

end

procedure talk\_p\_proc

begin

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

                float\_msg(self\_obj, message\_str(136, random(102, 106)), 8);

        end

        else begin

                call do\_dialogue;

        end

end

procedure combat

begin

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

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

        end

        HOSTILE := 1;

end

procedure Critter\_Action

begin

        variable LVar0 := 0;

        if (global\_var(26) == 2) then begin

                set\_global\_var(254, 1);

        end

        else begin

                if (global\_var(116)) then begin

                        set\_global\_var(254, 0);

                        if (tile\_distance\_objs(self\_obj, dude\_obj) < 3) then begin

                                LVar0 := tile\_num\_in\_direction(tile\_num(self\_obj), random(0, 5), 3);

                                if (tile\_distance(tile\_num(self\_obj), LVar0) > 2) then begin

                                        if (random(0, 9) == 0) then begin

                                                float\_msg(self\_obj, message\_str(136, random(102, 106)), 8);

                                        end

                                        animate\_move\_obj\_to\_tile(self\_obj, LVar0, 0);

                                end

                        end

                end

                else begin

                        if (global\_var(213)) then begin

                                set\_global\_var(254, 1);

                        end

                        if (obj\_can\_see\_obj(self\_obj, dude\_obj)) then begin

                                if (global\_var(214)) then begin

                                        set\_global\_var(254, 1);

                                end

                        end

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

                                set\_global\_var(254, 1);

                        end

                end

        end

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

                HOSTILE := 1;

        end

        if (tile\_distance\_objs(self\_obj, dude\_obj) > 12) then begin

                HOSTILE := 0;

        end

end

procedure damage\_p\_proc

begin

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

                set\_global\_var(254, 1);

        end

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