ARMDOOR.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 use\_p\_proc;

procedure use\_skill\_on\_p\_proc;

procedure look\_at\_p\_proc;

procedure use\_obj\_on\_p\_proc;

procedure map\_update\_p\_proc;

procedure damage\_p\_proc;

import variable Cur\_Door\_Ptr;

procedure start

begin

        if ((script\_action == 21) or (script\_action == 3)) then begin

                call look\_at\_p\_proc;

        end

        else begin

                if (script\_action == 6) then begin

                        call use\_p\_proc;

                end

                else begin

                        if (script\_action == 8) then begin

                                call use\_skill\_on\_p\_proc;

                        end

                        else begin

                                if (script\_action == 7) then begin

                                        call use\_obj\_on\_p\_proc;

                                end

                                else begin

                                        if (script\_action == 14) then begin

                                                call damage\_p\_proc;

                                        end

                                        else begin

                                                if (script\_action == 23) then begin

                                                        call map\_update\_p\_proc;

                                                end

                                        end

                                end

                        end

                end

        end

end

procedure use\_p\_proc

begin

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

                obj\_lock(self\_obj);

        end

        else begin

                obj\_unlock(self\_obj);

        end

        if ((local\_var(0) == 0) and (source\_obj == dude\_obj)) then begin

                script\_overrides;

                display\_msg(message\_str(63, 104));

        end

end

procedure use\_skill\_on\_p\_proc

begin

        variable LVar0 := 0;

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

                if (action\_being\_used == 9) then begin

                        script\_overrides;

                        LVar0 := roll\_vs\_skill(dude\_obj, 9, -40);

                        if (is\_success(LVar0)) then begin

                                set\_local\_var(0, 1);

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

                                display\_msg(message\_str(766, 103) + "65" + message\_str(766, 104));

                                give\_exp\_points(65);

                        end

                        else begin

                                if (is\_critical(LVar0)) then begin

                                        jam\_lock(self\_obj);

                                        display\_msg(message\_str(63, 110));

                                end

                                else begin

                                        display\_msg(message\_str(63, 103));

                                end

                        end

                end

        end

        else begin

                display\_msg(message\_str(63, 109));

        end

end

procedure look\_at\_p\_proc

begin

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

                script\_overrides;

                display\_msg(message\_str(63, 104));

        end

end

procedure use\_obj\_on\_p\_proc

begin

        variable LVar0 := 0;

        variable LVar1 := 0;

        LVar0 := obj\_being\_used\_with;

        LVar1 := roll\_vs\_skill(dude\_obj, 9, -20);

        if (obj\_pid(LVar0) == 77) then begin

                script\_overrides;

                if (is\_success(LVar1)) then begin

                        set\_local\_var(0, 1);

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

                        display\_msg(message\_str(766, 103) + "65" + message\_str(766, 104));

                        give\_exp\_points(65);

                end

                else begin

                        if (is\_critical(LVar1)) then begin

                                rm\_obj\_from\_inven(dude\_obj, LVar0);

                                destroy\_object(LVar0);

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

                        end

                        else begin

                                display\_msg(message\_str(63, 103));

                        end

                end

        end

end

procedure map\_update\_p\_proc

begin

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

                obj\_lock(self\_obj);

        end

        else begin

                obj\_unlock(self\_obj);

        end

end

procedure damage\_p\_proc

begin

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

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

                set\_obj\_visibility(self\_obj, 1);

                set\_local\_var(1, 1);

        end

end