![]() |
This is the transcript of a script file, which runs certain tasks in the game upon execution. |
---|
Details | |
---|---|
Type | Decompiled script |
SCRIPTS.LST comment | Paladin guard after invasion |
MSG file | SENTRYGN.MSG |
procedure start;
procedure start
begin
variable LVar0 := 0;
variable LVar1 := 0;
if (script_action == 2) then begin
if ((local_var(0) == 0) and (obj_type(source_obj) == dude_obj)) then begin
display_msg(message_str(304, 100));
set_local_var(0, 1);
end
if ((local_var(1) == 0) and (obj_type(source_obj) == dude_obj) and global_var(139) and global_var(140)) then begin
display_msg(message_str(304, 101));
set_local_var(1, 1);
add_timer_event(self_obj, game_ticks(7), 1);
end
end
else begin
if (script_action == 22) then begin
LVar0 := random(1, 6) + 2;
LVar1 := do_check(source_obj, 5, 0);
if (is_success(LVar1)) then begin
if (is_critical(LVar1)) then begin
if (obj_type(source_obj) == dude_obj) then begin
display_msg(message_str(304, 102));
end
end
else begin
if (obj_type(source_obj) == dude_obj) then begin
display_msg(message_str(304, 103));
end
critter_dmg(source_obj, LVar0, 0);
display_msg(message_str(304, 104) + LVar0 + message_str(304, 105));
end
end
else begin
if (is_critical(LVar1)) then begin
if (obj_type(source_obj) == dude_obj) then begin
display_msg(message_str(304, 106));
end
critter_dmg(source_obj, LVar0, 0);
display_msg(message_str(304, 107) + LVar0 + message_str(304, 108));
end
else begin
if (obj_type(source_obj) == dude_obj) then begin
display_msg(message_str(304, 109));
end
critter_dmg(source_obj, LVar0, 0);
display_msg(message_str(304, 110) + LVar0 + message_str(304, 111));
end
end
set_local_var(1, 0);
end
end
end