Fallout Wiki
Advertisement
Fallout Wiki
Details
Type Decompiled script
SCRIPTS.LST comment generic ghouls in Necrop Vault
MSG file VALTGLO.MSG
Transcript

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;
variable rndx;
procedure start
begin
        if (only_once) then begin
                only_once := 0;
                critter_add_trait(self_obj, 1, 6, 30);
                critter_add_trait(self_obj, 1, 5, 41);
        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 == 13) then begin
                                        if (fixed_param == 2) then begin
                                                rndx := random(1, 6) - 5;
                                                if (rndx < 0) then begin
                                                        rndx := 0;
                                                end
                                                if (rndx > 0) then begin
                                                        radiation_inc(target_obj, rndx);
                                                end
                                        end
                                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
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
        if ((global_var(30) != 0) and (global_var(31) != 2)) then begin
                float_msg(self_obj, message_str(792, 102), 2);
        end
        else begin
                display_msg(message_str(792, 101));
        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(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(792, 100));
end

Advertisement