В общем, все, разобрался. Замена переменных помогла. Попутно исправил несколько мелких багов. Надо сказать, скриптер уж явно в спешке переносил из демки этого персонажа.
Вот итоговый рабочий исходник скрипта:
/*
* LENORE.SSL - Lenore, spouse of Phil, Fallout 1
* Changes
* Replace all wrong imported variables to MVAR:
* dog_is_angry => map_var(5)
* smartass => map_var(6)
* smartass2 => map_var(7)
* Some cleanup with known variables (home_tile)
* Changed MSG file from 375 (DEMOPEAS.MSG) to 890 (LENORE.MSG)
* Fixed bug when Lenore not respond when in Lenore04 node ("if" statement should be negated)
* Lenore after solving quest now Lenore, not simple Peasant ("You see Lenore" instead "You see peasant")
* winterheart, 12.04.2011
* thx to Wasteland Ghost from TeamX to clear darkness of F1 scripting
*/
variable GVar0; /* hostile? According PHIL.SSL, should be local var, not import */
variable GVar1; /* armed? */
variable GVar2; /* initialized? */
variable home_tile := 29081; /* home_tile */
procedure start;
procedure do_dialogue;
procedure go_inside;
procedure Lenore00;
procedure Lenore01;
procedure Lenore02;
procedure Lenore03;
procedure Lenore04;
procedure start
begin
if (not(GVar2)) then begin
critter_add_trait(self_obj, 1, 6, 5);
GVar2 := 1;
end
else begin
if (script_action == 11) then begin
call do_dialogue;
end
else begin
if (script_action == 18) then begin
if (source_obj == dude_obj) then begin
set_global_var(159, global_var(159) + 1);
if ((global_var(159) % 7) == 0) then begin
set_global_var(155, global_var(155) - 1);
end
end
end
else begin
if ((script_action == 21) or (script_action == 3)) then begin
script_overrides;
/* Added check that dog is still angry (most closes thing to Phils' conversation check */
if (map_var(5)) then begin
/* "You see peasant." */
display_msg(message_str(890, 100));
end
else begin
/* "You see Lenore." */
display_msg(message_str(890, 108));
end
end
else begin
if (script_action == 4) then begin
attack_complex(dude_obj, 0, 1, 0, 0, 30000, 0, 0);
end
else begin
if (script_action == 12) then begin
if (map_var(7)) then begin
call Lenore00;
end
if (not(map_var(5))) then begin
call go_inside;
end
end
else begin
if (script_action == 8) then begin
if (action_being_used == 14) then begin
dialogue_system_enter;
end
end
end
end
end
end
end
end
end
procedure do_dialogue
begin
if (global_var(5)) then begin
call Lenore02;
end
else begin
if (not(map_var(5))) then begin
call Lenore04;
end
else begin
/* If obj_dude is armed, show message */
if ((obj_item_subtype(critter_inven_obj(dude_obj, 1)) == 3) or (obj_item_subtype(critter_inven_obj(dude_obj, 2)) == 3)) then begin
call Lenore01;
end
else begin
call Lenore03;
end
end
end
end
procedure go_inside
begin
/* GO HOME, ye, smartass! */
animate_move_obj_to_tile(self_obj, home_tile, 0);
end
procedure Lenore00
begin
variable LVar0 := 0;
variable LVar1 := 0;
LVar0 := random(1, 3);
if (LVar0 == 1) then begin
/* "Oh, yeah, big man running from a scary dog. Phil, you sure showed it. Yep, you sure did." */
LVar1 := message_str(890, 101);
end
else begin
if (LVar0 == 2) then begin
/* "What are you doing, Phil? You're checking the tread on those sneakers, aren't you?" */
LVar1 := message_str(890, 102);
end
else begin
set_global_var(187, 1);
/* "Man, that dog looks hungry. It sure wants to eat you alive, Phil." */
LVar1 := message_str(890, 103);
end
end
if (map_var(5)) then begin
/* show float message */
float_msg(self_obj, LVar1, 0);
end
set_map_var(7, 0); /* smartass2 := 0; */
end
procedure Lenore01
begin
if (map_var(5)) then begin
/* That might be a little overkill for a poor defenseless animal, don'cha think? */
float_msg(self_obj, message_str(890, 104), 0);
end
end
procedure Lenore02
begin
if (not(map_var(5))) then begin
/* "That sure is a nice pooch you have there." */
float_msg(self_obj, message_str(890, 105), 0);
end
end
procedure Lenore03
begin
/* "I'm sure Phil would appreciate it if you were to get rid of his dog." */
float_msg(self_obj, message_str(890, 106), 0);
set_map_var(6, 1); /* smartass := 1 */
end
procedure Lenore04
begin
/* "Thanks for dealing with that dog." */
float_msg(self_obj, message_str(890, 107), 0);
end