variable ProtoOfItemGiven := 0;
variable ValueOfRollCheck := 1;
variable Scenery_Creation := 0;
variable Scenery_Creation_Hex := 0;
variable Scenery_Creation_Count := 0;
variable Temp_Scenery_Creation_Hex := 0;
variable Scenery_Creation_Ptr := 0;
variable How_Many_Party_Members_Are_Injured := 0;
variable How_Many_Party_Members_Armed := 0;
variable PartyHealingItem := 0;
procedure checkPartyMembersNearDoor;
variable global_temp := 0;
variable dest_tile := 0;
variable step_tile := 0;
variable in_dialog := 0;
variable forced_node := 0;
variable restock_amt := 0;
variable restock_obj := 0;
variable restock_trash := 0;
variable removed_qty := 0;
procedure start;
procedure use_p_proc;
procedure timed_event_p_proc;
procedure map_enter_p_proc;
procedure pickup_p_proc;
procedure destroy_p_proc;
procedure look_at_p_proc;
procedure description_p_proc;
procedure Node001;
procedure Node002;
procedure Node003;
procedure Node004;
procedure Node005;
procedure Node006;
procedure Node007;
procedure Node008;
procedure checkPartyMembersNearDoor
begin
if (op_party_member_obj(16777278) != 0) then
begin
if (op_tile_distance_objs(op_self_obj(), op_party_member_obj(16777278)) <= 5) then
return(1);
end
if (op_party_member_obj(16777376) != 0) then
begin
if (op_tile_distance_objs(op_self_obj(), op_party_member_obj(16777376)) <= 5) then
return(1);
end
if (op_party_member_obj(16777377) != 0) then
begin
if (op_tile_distance_objs(op_self_obj(), op_party_member_obj(16777377)) <= 5) then
return(1);
end
if (op_party_member_obj(16777305) != 0) then
begin
if (op_tile_distance_objs(op_self_obj(), op_party_member_obj(16777305)) <= 5) then
return(1);
end
if (op_party_member_obj(16777313) != 0) then
begin
if (op_tile_distance_objs(op_self_obj(), op_party_member_obj(16777313)) <= 5) then
return(1);
end
if (op_party_member_obj(16777323) != 0) then
begin
if (op_tile_distance_objs(op_self_obj(), op_party_member_obj(16777323)) <= 5) then
return(1);
end
if (op_party_member_obj(16777352) != 0) then
begin
if (op_tile_distance_objs(op_self_obj(), op_party_member_obj(16777352)) <= 5) then
return(1);
end
if (op_party_member_obj(16777378) != 0) then
begin
if (op_tile_distance_objs(op_self_obj(), op_party_member_obj(16777378)) <= 5) then
return(1);
end
if (op_party_member_obj(16777368) != 0) then
begin
if (op_tile_distance_objs(op_self_obj(), op_party_member_obj(16777368)) <= 5) then
return(1);
end
if (op_party_member_obj(16777379) != 0) then
begin
if (op_tile_distance_objs(op_self_obj(), op_party_member_obj(16777379)) <= 5) then
return(1);
end
if (op_party_member_obj(16777380) != 0) then
begin
if (op_tile_distance_objs(op_self_obj(), op_party_member_obj(16777380)) <= 5) then
return(1);
end
if (op_party_member_obj(16777295) != 0) then
begin
if (op_tile_distance_objs(op_self_obj(), op_party_member_obj(16777295)) <= 5) then
return(1);
end
if (op_party_member_obj(16777381) != 0) then
begin
if (op_tile_distance_objs(op_self_obj(), op_party_member_obj(16777381)) <= 5) then
return(1);
end
if (op_party_member_obj(16777407) != 0) then
begin
if (op_tile_distance_objs(op_self_obj(), op_party_member_obj(16777407)) <= 5) then
return(1);
end
if (op_party_member_obj(16777411) != 0) then
begin
if (op_tile_distance_objs(op_self_obj(), op_party_member_obj(16777411)) <= 5) then
return(1);
end
if (op_party_member_obj(16777412) != 0) then
begin
if (op_tile_distance_objs(op_self_obj(), op_party_member_obj(16777412)) <= 5) then
return(1);
end
if (op_party_member_obj(16777413) != 0) then
begin
if (op_tile_distance_objs(op_self_obj(), op_party_member_obj(16777413)) <= 5) then
return(1);
end
if (op_party_member_obj(16777481) != 0) then
begin
if (op_tile_distance_objs(op_self_obj(), op_party_member_obj(16777481)) <= 5) then
return(1);
end
if (op_party_member_obj(16777558) != 0) then
begin
if (op_tile_distance_objs(op_self_obj(), op_party_member_obj(16777558)) <= 5) then
return(1);
end
if (op_party_member_obj(16777600) != 0) then
begin
if (op_tile_distance_objs(op_self_obj(), op_party_member_obj(16777600)) <= 5) then
return(1);
end
return(0);
end
procedure start
begin
end
procedure use_p_proc
begin
if (op_get_critter_stat(op_dude_obj(), 4) < 4) then
begin
op_display_msg(op_msg_string(14, 965));
end
else if ((op_get_critter_stat(op_dude_obj(), 4) >= 4) and (op_get_critter_stat(op_dude_obj(), 4) < 6)) then
begin
if (op_has_trait(0, op_dude_obj(), 106) == 0) then
begin
if ((op_get_critter_stat(op_dude_obj(), 5) >= 5) and (op_has_skill(op_dude_obj(), 1) >= 75) and (op_has_skill(op_dude_obj(), 0) >= 75)) then
begin
op_display_msg(op_msg_string(14, 967));
call Node008();
end
else if ((op_get_critter_stat(op_dude_obj(), 5) <= 5) or (op_has_skill(op_dude_obj(), 1) < 75) or (op_has_skill(op_dude_obj(), 0) < 75)) then
begin
if ((op_has_skill(op_dude_obj(), 1) <= 95) and (op_has_trait(0, op_dude_obj(), 81) == 0)) then
begin
op_display_msg(op_msg_string(14, 957));
call Node001();
end
else if ((op_has_skill(op_dude_obj(), 1) >= 95) and (op_has_trait(0, op_dude_obj(), 81) == 0)) then
begin
op_display_msg(op_msg_string(14, 956));
call Node007();
end
else if ((op_has_skill(op_dude_obj(), 1) <= 105) and (op_has_trait(0, op_dude_obj(), 81) >= 1)) then
begin
op_display_msg(op_msg_string(14, 957));
call Node004();
end
else if ((op_has_skill(op_dude_obj(), 1) >= 105) and (op_has_trait(0, op_dude_obj(), 81) >= 1)) then
begin
op_display_msg(op_msg_string(14, 956));
call Node007();
end
end
end
else if (op_has_trait(0, op_dude_obj(), 106) >= 1) then
begin
if ((op_has_skill(op_dude_obj(), 1) <= 95) and (op_has_trait(0, op_dude_obj(), 81) == 0)) then
begin
op_display_msg(op_msg_string(14, 957));
call Node001();
end
else if ((op_has_skill(op_dude_obj(), 1) >= 95) and (op_has_trait(0, op_dude_obj(), 81) == 0)) then
begin
op_display_msg(op_msg_string(14, 956));
call Node007();
end
else if ((op_has_skill(op_dude_obj(), 1) <= 105) and (op_has_trait(0, op_dude_obj(), 81) >= 1)) then
begin
op_display_msg(op_msg_string(14, 957));
call Node004();
end
else if ((op_has_skill(op_dude_obj(), 1) >= 105) and (op_has_trait(0, op_dude_obj(), 81) >= 1)) then
begin
op_display_msg(op_msg_string(14, 956));
call Node007();
end
end
end
else if ((op_get_critter_stat(op_dude_obj(), 4) >= 6) and (op_get_critter_stat(op_dude_obj(), 4) <= 8)) then
begin
if (op_has_trait(0, op_dude_obj(), 106) == 0) then
begin
if ((op_get_critter_stat(op_dude_obj(), 5) >= 5) and (op_has_skill(op_dude_obj(), 1) >= 70) and (op_has_skill(op_dude_obj(), 0) >= 70)) then
begin
op_display_msg(op_msg_string(14, 967));
call Node008();
end
else if ((op_get_critter_stat(op_dude_obj(), 5) <= 5) or (op_has_skill(op_dude_obj(), 1) < 70) or (op_has_skill(op_dude_obj(), 0) < 70)) then
begin
if ((op_has_skill(op_dude_obj(), 1) <= 100) and (op_has_trait(0, op_dude_obj(), 81) == 0)) then
begin
op_display_msg(op_msg_string(14, 957));
call Node002();
end
else if ((op_has_skill(op_dude_obj(), 1) >= 100) and (op_has_trait(0, op_dude_obj(), 81) == 0)) then
begin
op_display_msg(op_msg_string(14, 956));
call Node007();
end
else if ((op_has_skill(op_dude_obj(), 1) <= 110) and (op_has_trait(0, op_dude_obj(), 81) >= 1)) then
begin
op_display_msg(op_msg_string(14, 957));
call Node005();
end
else if ((op_has_skill(op_dude_obj(), 1) >= 110) and (op_has_trait(0, op_dude_obj(), 81) >= 1)) then
begin
op_display_msg(op_msg_string(14, 956));
call Node007();
end
end
end
else if (op_has_trait(0, op_dude_obj(), 106) >= 1) then
begin
if ((op_has_skill(op_dude_obj(), 1) <= 100) and (op_has_trait(0, op_dude_obj(), 81) == 0)) then
begin
op_display_msg(op_msg_string(14, 957));
call Node002();
end
else if ((op_has_skill(op_dude_obj(), 1) >= 100) and (op_has_trait(0, op_dude_obj(), 81) == 0)) then
begin
op_display_msg(op_msg_string(14, 956));
call Node007();
end
else if ((op_has_skill(op_dude_obj(), 1) <= 110) and (op_has_trait(0, op_dude_obj(), 81) >= 1)) then
begin
op_display_msg(op_msg_string(14, 957));
call Node005();
end
else if ((op_has_skill(op_dude_obj(), 1) >= 110) and (op_has_trait(0, op_dude_obj(), 81) >= 1)) then
begin
op_display_msg(op_msg_string(14, 956));
call Node007();
end
end
end
else if ((op_get_critter_stat(op_dude_obj(), 4) >= 8) and (op_get_critter_stat(op_dude_obj(), 4) <= 10)) then
begin
if (op_has_trait(0, op_dude_obj(), 106) == 0) then
begin
if ((op_get_critter_stat(op_dude_obj(), 5) >= 5) and (op_has_skill(op_dude_obj(), 1) >= 65) and (op_has_skill(op_dude_obj(), 0) >= 65)) then
begin
op_display_msg(op_msg_string(14, 967));
call Node008();
end
else if ((op_get_critter_stat(op_dude_obj(), 5) <= 5) or (op_has_skill(op_dude_obj(), 1) < 65) or (op_has_skill(op_dude_obj(), 0) < 65)) then
begin
if ((op_has_skill(op_dude_obj(), 1) <= 105) and (op_has_trait(0, op_dude_obj(), 81) == 0)) then
begin
op_display_msg(op_msg_string(14, 957));
call Node003();
end
else if ((op_has_skill(op_dude_obj(), 1) >= 105) and (op_has_trait(0, op_dude_obj(), 81) == 0)) then
begin
op_display_msg(op_msg_string(14, 956));
call Node007();
end
else if ((op_has_skill(op_dude_obj(), 1) <= 115) and (op_has_trait(0, op_dude_obj(), 81) >= 1)) then
begin
op_display_msg(op_msg_string(14, 957));
call Node006();
end
else if ((op_has_skill(op_dude_obj(), 1) >= 115) and (op_has_trait(0, op_dude_obj(), 81) >= 1)) then
begin
op_display_msg(op_msg_string(14, 956));
call Node007();
end
end
end
else if (op_has_trait(0, op_dude_obj(), 106) >= 1) then
begin
if ((op_has_skill(op_dude_obj(), 1) <= 105) and (op_has_trait(0, op_dude_obj(), 81) == 0)) then
begin
op_display_msg(op_msg_string(14, 957));
call Node003();
end
else if ((op_has_skill(op_dude_obj(), 1) >= 105) and (op_has_trait(0, op_dude_obj(), 81) == 0)) then
begin
op_display_msg(op_msg_string(14, 956));
call Node007();
end
else if ((op_has_skill(op_dude_obj(), 1) <= 115) and (op_has_trait(0, op_dude_obj(), 81) >= 1)) then
begin
op_display_msg(op_msg_string(14, 957));
call Node006();
end
else if ((op_has_skill(op_dude_obj(), 1) >= 115) and (op_has_trait(0, op_dude_obj(), 81) >= 1)) then
begin
op_display_msg(op_msg_string(14, 956));
call Node007();
end
end
end
end
procedure timed_event_p_proc
begin
end
procedure map_enter_p_proc
begin
end
procedure pickup_p_proc
begin
end
procedure destroy_p_proc
begin
end
procedure look_at_p_proc
begin
end
procedure description_p_proc
begin
end
procedure Node001
begin
op_gfade_out(600);
op_gfade_in(600);
op_critter_mod_skill(op_dude_obj(), 1, 3);
op_game_time_advance(240 * (60 * 10));
op_rm_obj_from_inven(op_source_obj(), op_self_obj());
op_destroy_object(op_self_obj());
end
procedure Node002
begin
op_gfade_out(600);
op_gfade_in(600);
op_critter_mod_skill(op_dude_obj(), 1, 4);
op_game_time_advance(240 * (60 * 10));
op_rm_obj_from_inven(op_source_obj(), op_self_obj());
op_destroy_object(op_self_obj());
end
procedure Node003
begin
op_gfade_out(600);
op_gfade_in(600);
op_critter_mod_skill(op_dude_obj(), 1, 5);
op_game_time_advance(240 * (60 * 10));
op_rm_obj_from_inven(op_source_obj(), op_self_obj());
op_destroy_object(op_self_obj());
end
procedure Node004
begin
op_gfade_out(600);
op_gfade_in(600);
op_critter_mod_skill(op_dude_obj(), 1, 6);
op_game_time_advance(240 * (60 * 10));
op_rm_obj_from_inven(op_source_obj(), op_self_obj());
op_destroy_object(op_self_obj());
end
procedure Node005
begin
op_gfade_out(600);
op_gfade_in(600);
op_critter_mod_skill(op_dude_obj(), 1, 8);
op_game_time_advance(240 * (60 * 10));
op_rm_obj_from_inven(op_source_obj(), op_self_obj());
op_destroy_object(op_self_obj());
end
procedure Node006
begin
op_gfade_out(600);
op_gfade_in(600);
op_critter_mod_skill(op_dude_obj(), 1, 10);
op_game_time_advance(240 * (60 * 10));
op_rm_obj_from_inven(op_source_obj(), op_self_obj());
op_destroy_object(op_self_obj());
end
procedure Node007
begin
op_gfade_out(600);
op_gfade_in(600);
op_game_time_advance(60 * (60 * 10));
end
procedure Node008
begin
op_gfade_out(600);
op_gfade_in(600);
op_critter_add_trait(op_dude_obj(), 0, 106, 1);
op_game_time_advance(120 * (60 * 10));
op_rm_obj_from_inven(op_source_obj(), op_self_obj());
op_destroy_object(op_self_obj());
end