Fallout Wiki
Advertisement
Fallout Wiki
Details
Type Decompiled script
SCRIPTS.LST comment Scribe in Brotherhood
MSG file GENSCRIB.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, 44);
                critter_add_trait(self_obj, 1, 5, 63);
        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 (global_var(250)) then begin
                hostile := 1;
        end
        if (tile_distance_objs(self_obj, dude_obj) > 12) then begin
                hostile := 0;
        end
        if (hostile) then begin
                set_global_var(250, 1);
                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
        rndx := random(101, 115);
        if (rndx == 104) then begin
                rndx := 107;
        end
        float_msg(self_obj, message_str(717, rndx), 2);
end
procedure destroy_p_proc
begin
        set_global_var(250, 1);
        rm_timer_event(self_obj);
        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;
        display_msg(message_str(717, 100));
end

Advertisement