diff --git a/scripts_src/generic/ziwoddor.ssl b/scripts_src/generic/ziwoddor.ssl index e3b0aba84..a419143c2 100644 --- a/scripts_src/generic/ziwoddor.ssl +++ b/scripts_src/generic/ziwoddor.ssl @@ -218,15 +218,15 @@ procedure. it will check to see if the door is trapped and locked. procedure use_p_proc begin /* Trap_Roll is a global variable to this script, defined at the beginning of the script. */ - + Traps_Roll:=roll_vs_skill(source_obj,SKILL_TRAPS,Trap_Bonus); - + if (local_var(LVAR_Trapped) == STATE_ACTIVE) then begin if (is_success(Traps_Roll)) then begin script_overrides; set_local_var(LVAR_Found_Trap,1); reg_anim_clear(source_obj); - + if (source_obj == dude_obj) then begin display_msg(mstr(204)); end @@ -234,7 +234,7 @@ procedure use_p_proc begin display_msg(mstr(205)); end end - + else begin if (obj_is_locked(self_obj)) then begin script_overrides; @@ -246,12 +246,12 @@ procedure use_p_proc begin end end end - + else if (obj_is_locked(self_obj)) then begin script_overrides; display_msg(mstr(203)); end - + //REMOVED FOLLOWING CODE SO WOODEN DOORS DONT AUTO CLOSE (Ed really hated this) -nbk //if (CLOSE_STATUS == STATE_DOOR_CLOSE) then begin // last_source_obj := source_obj; @@ -267,11 +267,11 @@ need to be in the description_p_proc procedure. procedure look_at_p_proc begin script_overrides; - + if (DOOR_STATUS == STATE_WOOD) then begin display_msg(mstr(100)); end - + else begin display_msg(mstr(101)); end @@ -289,19 +289,19 @@ procedure description_p_proc begin if ((obj_is_locked(self_obj)) and (local_var(LVAR_Trapped) == STATE_ACTIVE)) then begin call Look_Traps_And_Locks; end - + else if (local_var(LVAR_Trapped) == STATE_ACTIVE) then begin call Look_Traps; end - + else if (obj_is_locked(self_obj)) then begin call Look_Locks; end - + else if (DOOR_STATUS == STATE_WOOD) then begin display_msg(mstr(100)); end - + else begin display_msg(mstr(101)); end @@ -319,7 +319,7 @@ procedure use_skill_on_p_proc begin variable Skill_Used; ndebug("use_skill_on_p_proc"); Skill_Used:=action_being_used; - + if (Skill_Used == SKILL_LOCKPICK) then begin script_overrides; //added by killap if (obj_is_locked(self_obj)) then begin @@ -329,7 +329,7 @@ procedure use_skill_on_p_proc begin call Set_Lock; end end // End of Skill_Lockpick - + else if (Skill_Used == SKILL_TRAPS) then begin script_overrides; //added by killap if (local_var(LVAR_Trapped) == STATE_ACTIVE) then begin @@ -339,13 +339,13 @@ procedure use_skill_on_p_proc begin if (source_obj == dude_obj) then begin display_msg(mstr(195)); end - + else begin display_msg(obj_name(source_obj)+mstr(200)); end end end // End of Skill_Traps - + end @@ -356,7 +356,7 @@ be checked against a prototype. **********************************************************************************/ procedure use_obj_on_p_proc begin variable Tool; - + Tool:=obj_pid(obj_being_used_with); if (Tool == PID_CROWBAR) then begin script_overrides; @@ -366,7 +366,7 @@ procedure use_obj_on_p_proc begin script_overrides; call Set_Trap; end - + if (LOCK_STATUS == STATE_STANDARD_LOCK) then begin if (Tool == PID_LOCKPICKS) then begin script_overrides; @@ -387,7 +387,7 @@ procedure use_obj_on_p_proc begin end end end - + else if (LOCK_STATUS == STATE_ELECTRIC_LOCK) then begin if (Tool == PID_ELECTRONIC_LOCKPICKS) then begin script_overrides; @@ -408,7 +408,7 @@ procedure use_obj_on_p_proc begin end end end - + end @@ -420,9 +420,9 @@ free up the space. procedure damage_p_proc begin variable Trap_Damage; - + /************ Wood Door ****************/ - + if (weapon_dmg_type(target_obj) == DMG_explosion) then begin if (DOOR_STATUS == STATE_WOOD) then begin if (local_var(LVAR_Trapped) == STATE_ACTIVE) then begin @@ -433,7 +433,7 @@ procedure damage_p_proc begin call destroy_p_proc; destroy_object(self_obj); end - + else begin set_local_var(LVAR_Trapped, STATE_INACTIVE); obj_unlock(self_obj); @@ -441,9 +441,9 @@ procedure damage_p_proc begin destroy_object(self_obj); end end - + /************ Metal Door ****************/ - + else if (DOOR_STATUS == STATE_METAL) then begin set_local_var(LVAR_Explosion_Attempts,local_var(LVAR_Explosion_Attempts)+1); if (local_var(LVAR_Trapped) == STATE_ACTIVE) then begin @@ -451,7 +451,7 @@ procedure damage_p_proc begin Trap_Damage:=random(MIN_DAMAGE,MAX_DAMAGE); explosion(self_tile, self_elevation, Trap_Damage); end - + else if (local_var(LVAR_Explosion_Attempts) > DOOR_STRENGTH) then begin set_local_var(LVAR_Trapped, STATE_INACTIVE); obj_unlock(self_obj); @@ -459,9 +459,9 @@ procedure damage_p_proc begin destroy_object(self_obj); end end - + end - + else begin display_msg(mstr(193)); end @@ -483,7 +483,7 @@ procedure map_enter_p_proc begin obj_unlock(self_obj); set_local_var(LVAR_Trapped,TRAPPED_STATUS); end - + if (LOCKED_STATUS == STATE_ACTIVE) then begin obj_lock(self_obj); end else begin @@ -504,7 +504,7 @@ procedure map_update_p_proc begin if (obj_is_locked(self_obj)) then begin obj_lock(self_obj); end - + else begin obj_unlock(self_obj); end @@ -520,419 +520,419 @@ procedure Look_Traps_And_Locks begin variable Perception_Check; variable Traps_Check; variable Locks_Check; - + Perception_Check:=do_check(dude_obj,STAT_pe,0); Traps_Check:=roll_vs_skill(dude_obj,SKILL_TRAPS,0); Locks_Check:=roll_vs_skill(dude_obj,SKILL_LOCKPICK,0); - + if (is_success(Perception_Check)) then begin - + /*************************************************************************************************/ - + /* Critical Success of a Perception Check (Start)*/ - + if (is_critical(Perception_Check)) then begin - + if (is_success(Traps_Check)) then begin set_local_var(LVAR_Found_Trap,1); // player has found the trap - + /* Critical Success of a Traps Check (Start)*/ - + if (is_critical(Traps_Check)) then begin - + if (is_success(Locks_Check)) then begin if (is_critical(Locks_Check)) then begin display_msg(mstr(102)); end // critical success (Locks) - + else begin display_msg(mstr(103)); end // regular success (Locks) end - + else if (is_critical(Locks_Check)) then begin display_msg(mstr(104)); end // critical Failure (Locks) - + else begin display_msg(mstr(105)); end // end of regular failure (Locks) end // critical success (Traps) - + /* Success of a Traps Check (Start)*/ - + else begin if (is_success(Locks_Check)) then begin if (is_critical(Locks_Check)) then begin display_msg(mstr(106)); end // critical success (Locks) - + else begin display_msg(mstr(107)); end // regular success (Locks) end - + else if (is_critical(Locks_Check)) then begin display_msg(mstr(108)); end // critical Failure (Locks) - + else begin display_msg(mstr(109)); end // end of regular failure (Locks) end // regular success (Traps) end - + /* Critical Failure of a Traps Check (Start)*/ - + else if (is_critical(Traps_Check)) then begin if (is_success(Locks_Check)) then begin if (is_critical(Locks_Check)) then begin display_msg(mstr(110)); end // critical success (Locks) - + else begin display_msg(mstr(111)); end // regular success (Locks) end - + else if (is_critical(Locks_Check)) then begin display_msg(mstr(112)); end // critical Failure (Locks) - + else begin display_msg(mstr(113)); end // end of regular failure (Locks) end // critical Failure (Traps) - + /* Failure of a Traps Check (Start)*/ - + else begin if (is_success(Locks_Check)) then begin if (is_critical(Locks_Check)) then begin display_msg(mstr(114)); end // critical success (Locks) - + else begin display_msg(mstr(115)); end // regular success (Locks) end - + else if (is_critical(Locks_Check)) then begin display_msg(mstr(116)); end // critical Failure (Locks) - + else begin display_msg(mstr(117)); end // end of regular failure (Locks) end // regular failure (Traps) end // critical success (Stat_Pe) - + /* Critical Success of a Perception Check (Finish)*/ - + /*************************************************************************************************/ - + /* Success of a Perception Check (Start)*/ - + else begin if (is_success(Traps_Check)) then begin set_local_var(LVAR_Found_Trap,1); // player has found the trap - + /* Critical Success of a Traps Check (Start)*/ - + if (is_critical(Traps_Check)) then begin - + if (is_success(Locks_Check)) then begin if (is_critical(Locks_Check)) then begin display_msg(mstr(118)); end // critical success (Locks) - + else begin display_msg(mstr(119)); end // regular success (Locks) end - + else if (is_critical(Locks_Check)) then begin display_msg(mstr(120)); end // critical Failure (Locks) - + else begin display_msg(mstr(121)); end // end of regular failure (Locks) end // critical success (Traps) - + /* Success of a Traps Check (Start)*/ - + else begin if (is_success(Locks_Check)) then begin if (is_critical(Locks_Check)) then begin display_msg(mstr(122)); end // critical success (Locks) - + else begin display_msg(mstr(123)); end // regular success (Locks) end - + else if (is_critical(Locks_Check)) then begin display_msg(mstr(124)); end // critical Failure (Locks) - + else begin display_msg(mstr(125)); end // end of regular failure (Locks) end // regular success (Traps) end - + /* Critical Failure of a Traps Check (Start)*/ - + else if (is_critical(Traps_Check)) then begin if (is_success(Locks_Check)) then begin if (is_critical(Locks_Check)) then begin display_msg(mstr(126)); end // critical success (Locks) - + else begin display_msg(mstr(127)); end // regular success (Locks) end - + else if (is_critical(Locks_Check)) then begin display_msg(mstr(128)); end // critical Failure (Locks) - + else begin display_msg(mstr(129)); end // end of regular failure (Locks) end // critical Failure (Traps) - + /* Failure of a Traps Check (Start)*/ - + else begin if (is_success(Locks_Check)) then begin if (is_critical(Locks_Check)) then begin display_msg(mstr(130)); end // critical success (Locks) - + else begin display_msg(mstr(131)); end // regular success (Locks) end - + else if (is_critical(Locks_Check)) then begin display_msg(mstr(132)); end // critical Failure (Locks) - + else begin display_msg(mstr(133)); end // end of regular failure (Locks) end // regular failure (Traps) end // regular success (Stat_pe) end - + /* Success of a Perception Check (Finish)*/ - + /*************************************************************************************************/ - + /* Critical Failure of a Perception Check (Start)*/ - + else if (is_critical(Perception_Check)) then begin if (is_success(Traps_Check)) then begin set_local_var(LVAR_Found_Trap,1); // player has found the trap - + /* Critical Success of a Traps Check (Start)*/ - + if (is_critical(Traps_Check)) then begin - + if (is_success(Locks_Check)) then begin if (is_critical(Locks_Check)) then begin display_msg(mstr(134)); end // critical success (Locks) - + else begin display_msg(mstr(135)); end // regular success (Locks) end - + else if (is_critical(Locks_Check)) then begin display_msg(mstr(136)); end // critical Failure (Locks) - + else begin display_msg(mstr(137)); end // end of regular failure (Locks) end // critical success (Traps) - + /* Success of a Traps Check (Start)*/ - + else begin if (is_success(Locks_Check)) then begin if (is_critical(Locks_Check)) then begin display_msg(mstr(138)); end // critical success (Locks) - + else begin display_msg(mstr(139)); end // regular success (Locks) end - + else if (is_critical(Locks_Check)) then begin display_msg(mstr(140)); end // critical Failure (Locks) - + else begin display_msg(mstr(141)); end // end of regular failure (Locks) end // regular success (Traps) end - + /* Critical Failure of a Traps Check (Start)*/ - + else if (is_critical(Traps_Check)) then begin if (is_success(Locks_Check)) then begin if (is_critical(Locks_Check)) then begin display_msg(mstr(142)); end // critical success (Locks) - + else begin display_msg(mstr(143)); end // regular success (Locks) end - + else if (is_critical(Locks_Check)) then begin display_msg(mstr(144)); end // critical Failure (Locks) - + else begin display_msg(mstr(145)); end // end of regular failure (Locks) end // critical Failure (Traps) - + /* Failure of a Traps Check (Start)*/ - + else begin if (is_success(Locks_Check)) then begin if (is_critical(Locks_Check)) then begin display_msg(mstr(146)); end // critical success (Locks) - + else begin display_msg(mstr(147)); end // regular success (Locks) end - + else if (is_critical(Locks_Check)) then begin display_msg(mstr(148)); end // critical Failure (Locks) - + else begin display_msg(mstr(149)); end // end of regular failure (Locks) end // regular failure (Traps) end // Critical Failure (Stat_pe) - + /* Critical Failure of a Perception Check (Finish)*/ - + /*************************************************************************************************/ - + /* Failure of a Perception Check (Start)*/ - + else begin if (is_success(Traps_Check)) then begin set_local_var(LVAR_Found_Trap,1); // player has found the trap - + /* Critical Success of a Traps Check (Start)*/ - + if (is_critical(Traps_Check)) then begin - + if (is_success(Locks_Check)) then begin if (is_critical(Locks_Check)) then begin display_msg(mstr(150)); end // critical success (Locks) - + else begin display_msg(mstr(151)); end // regular success (Locks) end - + else if (is_critical(Locks_Check)) then begin display_msg(mstr(152)); end // critical Failure (Locks) - + else begin display_msg(mstr(153)); end // end of regular failure (Locks) end // critical success (Traps) - + /* Success of a Traps Check (Start)*/ - + else begin if (is_success(Locks_Check)) then begin if (is_critical(Locks_Check)) then begin display_msg(mstr(154)); end // critical success (Locks) - + else begin display_msg(mstr(155)); end // regular success (Locks) end - + else if (is_critical(Locks_Check)) then begin display_msg(mstr(156)); end // critical Failure (Locks) - + else begin display_msg(mstr(157)); end // end of regular failure (Locks) end // regular success (Traps) end - + /* Critical Failure of a Traps Check (Start)*/ - + else if (is_critical(Traps_Check)) then begin if (is_success(Locks_Check)) then begin if (is_critical(Locks_Check)) then begin display_msg(mstr(158)); end // critical success (Locks) - + else begin display_msg(mstr(159)); end // regular success (Locks) end - + else if (is_critical(Locks_Check)) then begin display_msg(mstr(160)); end // critical Failure (Locks) - + else begin display_msg(mstr(161)); end // end of regular failure (Locks) end // critical Failure (Traps) - + /* Failure of a Traps Check (Start)*/ - + else begin if (is_success(Locks_Check)) then begin if (is_critical(Locks_Check)) then begin display_msg(mstr(162)); end // critical success (Locks) - + else begin display_msg(mstr(163)); end // regular success (Locks) end - + else if (is_critical(Locks_Check)) then begin display_msg(mstr(164)); end // critical Failure (Locks) - + else begin display_msg(mstr(165)); end // end of regular failure (Locks) end // regular failure (Traps) end // Regular Failure (Stat_pe) - + /* Failure of a Perception Check (Finish)*/ - + end @@ -944,92 +944,92 @@ traps skill and perception to notice the trap. procedure Look_Traps begin variable Perception_Check; variable Traps_Check; - + Perception_Check:=do_check(dude_obj,STAT_pe,0); Traps_Check:=roll_vs_skill(dude_obj,SKILL_TRAPS,0); - + if (is_success(Perception_Check)) then begin if (is_critical(Perception_Check)) then begin if (is_success(Traps_Check)) then begin if (is_critical(Traps_Check)) then begin display_msg(mstr(104)); end // Critical Success (traps) - + else begin display_msg(mstr(108)); end // Regular Success (Traps) end - + else if (is_critical(Traps_Check)) then begin display_msg(mstr(112)); end // Critical Failure (Traps) - + else begin display_msg(mstr(116)); end // Regular Failure (Traps) end // Critical Success (Stat_Pe) - + else begin if (is_success(Traps_Check)) then begin if (is_critical(Traps_Check)) then begin display_msg(mstr(120)); end // Critical Success (traps) - + else begin display_msg(mstr(124)); end // Regular Success (Traps) end - + else if (is_critical(Traps_Check)) then begin display_msg(mstr(128)); end // Critical Failure (Traps) - + else begin display_msg(mstr(132)); end // Regular Failure (Traps) end // Regular Success (Stat_pe) end - + else if (is_critical(Perception_Check)) then begin if (is_success(Traps_Check)) then begin if (is_critical(Traps_Check)) then begin display_msg(mstr(136)); end // Critical Success (traps) - + else begin display_msg(mstr(140)); end // Regular Success (Traps) end - + else if (is_critical(Traps_Check)) then begin display_msg(mstr(144)); end // Critical Failure (Traps) - + else begin display_msg(mstr(148)); end // Regular Failure (Traps) end // Critical Failure (Stat_pe) - + else begin if (is_success(Traps_Check)) then begin if (is_critical(Traps_Check)) then begin display_msg(mstr(152)); end // Critical Success (traps) - + else begin display_msg(mstr(156)); end // Regular Success (Traps) end - + else if (is_critical(Traps_Check)) then begin display_msg(mstr(160)); end // Critical Failure (Traps) - + else begin display_msg(mstr(164)); end // Regular Failure (Traps) end // Regular Failure (Stat_Pe) - + end @@ -1041,87 +1041,87 @@ lockpick skill and perception to notice the lock. procedure Look_Locks begin variable Perception_Check; variable Locks_Check; - + Perception_Check:=do_check(dude_obj,STAT_pe,0); Locks_Check:=roll_vs_skill(dude_obj,SKILL_LOCKPICK,0); - + if (is_success(Perception_Check)) then begin if (is_critical(Perception_Check)) then begin if (is_success(Locks_Check)) then begin if (is_critical(Locks_Check)) then begin display_msg(mstr(114)); end // Critical Success (Locks) - + else begin display_msg(mstr(115)); end // Regular Success (Locks) end - + else if (is_critical(Locks_Check)) then begin display_msg(mstr(116)); end // Critical Failure (Locks) - + else begin display_msg(mstr(117)); end // Regular Failure (Locks) end // Critical Success (Stat_Pe) - + else begin if (is_success(Locks_Check)) then begin if (is_critical(Locks_Check)) then begin display_msg(mstr(130)); end // Critical Success (Locks) - + else begin display_msg(mstr(131)); end // Regular Success (Locks) end - + else if (is_critical(Locks_Check)) then begin display_msg(mstr(132)); end // Critical Failure (Locks) - + else begin display_msg(mstr(133)); end // Regular Failure (Locks) end // Regular Success (Stat_pe) end - + else if (is_critical(Perception_Check)) then begin if (is_success(Locks_Check)) then begin if (is_critical(Locks_Check)) then begin display_msg(mstr(146)); end // Critical Success (Locks) - + else begin display_msg(mstr(147)); end // Regular Success (Locks) end - + else if (is_critical(Locks_Check)) then begin display_msg(mstr(148)); end // Critical Failure (Locks) - + else begin display_msg(mstr(149)); end // Regular Failure (Locks) end // Critical Failure (Stat_pe) - + else begin if (is_success(Locks_Check)) then begin if (is_critical(Locks_Check)) then begin display_msg(mstr(162)); end // Critical Success (Locks) - + else begin display_msg(mstr(163)); end // Regular Success (Locks) end - + else if (is_critical(Locks_Check)) then begin display_msg(mstr(164)); end // Critical Failure (Locks) - + else begin display_msg(mstr(165)); end // Regular Failure (Locks) @@ -1137,9 +1137,9 @@ find and remove traps from the door. procedure Skill_Disarm_Traps begin /* Trap_Roll is a global variable to this script, defined at the beginning of the script. */ - + Traps_Roll:=roll_vs_skill(source_obj,SKILL_TRAPS,Trap_Bonus); - + call Disarm_Traps; end @@ -1160,11 +1160,11 @@ will need to be closed, as all traps are set to go off if the door is openned. procedure Set_Trap begin variable Explosive; variable Removal_Counter; - + /* Trap_Roll is a global variable to this script, defined at the beginning of the script. */ Traps_Roll:=roll_vs_skill(source_obj,SKILL_TRAPS,Trap_Set_Bonus); - + Explosive:=obj_being_used_with; if (obj_is_open(self_obj)) then begin @@ -1172,7 +1172,7 @@ procedure Set_Trap begin if (source_obj == dude_obj) then begin display_msg(mstr(206)); end - + else begin display_msg(obj_name(source_obj)+mstr(207)); end @@ -1191,7 +1191,7 @@ procedure Set_Trap begin display_msg(obj_name(source_obj)+mstr(210)); end end - + else if (is_critical(Traps_Roll)) then begin // crit fail, explode call real_explosion(Explosive); end else begin @@ -1199,7 +1199,7 @@ procedure Set_Trap begin if (source_obj == dude_obj) then begin display_msg(mstr(209)); end - + else begin display_msg(obj_name(source_obj)+mstr(211)); end @@ -1221,44 +1221,44 @@ procedure Disarm_Traps begin if (source_obj == dude_obj) then begin display_msg(mstr(194)); end - + else begin display_msg(mstr(199)); end - + if (local_var(LVAR_Gave_Traps_XP) == 0) then begin set_local_var(LVAR_Gave_Traps_XP,1); give_xp(Traps_Exp); end end - + else begin set_local_var(LVAR_Trapped,STATE_INACTIVE); if (source_obj == dude_obj) then begin display_msg(mstr(196)); end - + else begin display_msg(obj_name(source_obj)+mstr(201)); end end end - + else if (is_critical(Traps_Roll)) then begin call Damage_Critter; end - + else begin if (local_var(LVAR_Found_Trap) == 0) then begin if (source_obj == dude_obj) then begin display_msg(mstr(195)); end - + else begin display_msg(obj_name(source_obj)+mstr(200)); end end - + else begin display_msg(obj_name(source_obj)+mstr(202)); end @@ -1274,9 +1274,9 @@ can lockpick the door procedure Unlock_Lock begin /* Locks_Roll is a global variable to this script, defined at the beginning of the script. */ - + Locks_Roll:=roll_vs_skill(source_obj,SKILL_LOCKPICK,Lock_Bonus); - + call Lockpick_Door; end @@ -1291,7 +1291,7 @@ procedure Lockpick_Lock begin /* Locks_Roll is a global variable to this script, defined at the beginning of the script. */ Locks_Roll:=roll_vs_skill(source_obj,SKILL_LOCKPICK,Lockpick_Bonus); - + call Lockpick_Door; end @@ -1299,7 +1299,7 @@ procedure Super_Lockpick_Lock begin /* Locks_Roll is a global variable to this script, defined at the beginning of the script. */ Locks_Roll:=roll_vs_skill(source_obj,SKILL_LOCKPICK,Exd_Lockpick_Bonus); - + call Lockpick_Door; end @@ -1313,38 +1313,38 @@ procedure Lockpick_Door begin script_overrides; if (is_success(Locks_Roll)) then begin obj_unlock(self_obj); - + if (source_obj == dude_obj) then begin display_msg(mstr(170)); end - + else begin display_msg(obj_name(source_obj)+mstr(173)); end - + if (local_var(LVAR_Gave_Locks_XP) == 0) then begin set_local_var(LVAR_Gave_Locks_XP,1); give_xp(Lockpick_Exp); end end - + else if (is_critical(Locks_Roll)) then begin jam_lock(self_obj); - + if (source_obj == dude_obj) then begin display_msg(mstr(171)); end - + else begin display_msg(obj_name(source_obj)+mstr(174)); end end - + else begin if (source_obj == dude_obj) then begin display_msg(mstr(172)); end - + else begin display_msg(obj_name(source_obj)+mstr(175)); end @@ -1361,7 +1361,7 @@ procedure Set_Lock begin of the script. */ script_overrides; Locks_Roll:=roll_vs_skill(source_obj,SKILL_LOCKPICK,Lock_Bonus); - + call Lock_Door; end @@ -1374,18 +1374,18 @@ just unlocked using its lockpicks to accomplish this deed. procedure Set_Lockpick_Lock begin /* Locks_Roll is a global variable to this script, defined at the beginning of the script. */ - + Locks_Roll:=roll_vs_skill(source_obj,SKILL_LOCKPICK,Lockpick_Bonus); - + call Lock_Door; end procedure Super_Set_Lockpick_Lock begin /* Locks_Roll is a global variable to this script, defined at the beginning of the script. */ - + Locks_Roll:=roll_vs_skill(source_obj,SKILL_LOCKPICK,Exd_Lockpick_Bonus); - + call Lock_Door; end @@ -1399,26 +1399,26 @@ procedure Lock_Door begin script_overrides; if (is_success(Locks_Roll)) then begin obj_lock(self_obj); // engine unlock door - + if (source_obj == dude_obj) then begin display_msg(mstr(189)); end - + else begin display_msg(obj_name(source_obj)+mstr(191)); end - + if (local_var(LVAR_Gave_Locks_XP) == 0) then begin set_local_var(LVAR_Gave_Locks_XP,1); give_xp(Lockpick_Exp); end end - + else begin if (source_obj == dude_obj) then begin display_msg(mstr(190)); end - + else begin display_msg(obj_name(source_obj)+mstr(192)); end @@ -1481,12 +1481,12 @@ procedure Pry_Door begin end return; end - + // failure: damage pry_strain = roll_critical(); if pry_strain then begin critter_dmg(source_obj,Crowbar_Strain,(DMG_normal_dam BWOR DMG_BYPASS_ARMOR)); - + if (source_obj == dude_obj) then begin if (Crowbar_Strain == 1) then begin display_msg(mstr(177)); @@ -1495,7 +1495,7 @@ procedure Pry_Door begin display_msg(mstr(178)+Crowbar_Strain+mstr(179)); end end - + else begin if (is_male(source_obj)) then begin if (Crowbar_Strain == 1) then begin @@ -1505,7 +1505,7 @@ procedure Pry_Door begin display_msg(mstr(183)+Crowbar_Strain+mstr(184)); end end - + else begin if (Crowbar_Strain == 1) then begin display_msg(mstr(186)); diff --git a/scripts_src/headers/containers.h b/scripts_src/headers/containers.h index 8107f490d..bf03e142a 100644 --- a/scripts_src/headers/containers.h +++ b/scripts_src/headers/containers.h @@ -87,7 +87,7 @@ free up the space. procedure damage_p_proc begin variable Trap_Damage; /************ Wood Door ****************/ - + if (weapon_dmg_type(target_obj) == DMG_explosion) then begin if (DOOR_STATUS == STATE_WOOD) then begin if (local_var(LVAR_Trapped) == STATE_ACTIVE) then begin @@ -97,16 +97,16 @@ free up the space. explosion(self_tile, self_elevation, Trap_Damage); destroy_object(self_obj); end - + else begin set_local_var(LVAR_Trapped, STATE_INACTIVE); set_local_var(LVAR_Locked, STATE_INACTIVE); destroy_object(self_obj); end end - + /************ Metal Door ****************/ - + else if ((DOOR_STATUS == STATE_METAL) or (DOOR_STATUS == STATE_FRIDGE)) then begin set_local_var(LVAR_Explosion_Attempts,local_var(LVAR_Explosion_Attempts)+1); if (local_var(LVAR_Trapped) == STATE_ACTIVE) then begin @@ -114,7 +114,7 @@ free up the space. Trap_Damage:=random(MIN_DAMAGE,MAX_DAMAGE); explosion(self_tile, self_elevation, Trap_Damage); end - + else if (local_var(LVAR_Explosion_Attempts) > DOOR_STRENGTH) then begin set_local_var(LVAR_Trapped, STATE_INACTIVE); set_local_var(LVAR_Locked,STATE_INACTIVE); @@ -165,15 +165,15 @@ procedure. it will check to see if the door is trapped and locked. procedure use_p_proc begin /* Trap_Roll is a global variable to this script, defined at the beginning of the script. */ - + Traps_Roll:=roll_vs_skill(source_obj,SKILL_TRAPS,Trap_Bonus); - + if (local_var(LVAR_Trapped) == STATE_ACTIVE) then begin if (is_success(Traps_Roll)) then begin script_overrides; set_local_var(LVAR_Found_Trap,1); reg_anim_clear(source_obj); - + if (source_obj == dude_obj) then begin display_msg(my_mstr(204)); end @@ -181,7 +181,7 @@ procedure. it will check to see if the door is trapped and locked. display_msg(my_mstr(205)); end end - + else begin if (obj_is_locked(self_obj)) then begin script_overrides; @@ -193,12 +193,12 @@ procedure. it will check to see if the door is trapped and locked. end end end - + else if (obj_is_locked(self_obj)) then begin script_overrides; display_msg(my_mstr(203)); end end #endif - + #endif // CONTAINERS_H diff --git a/scripts_src/headers/doors.h b/scripts_src/headers/doors.h index ccbd0cb7b..809d26f4d 100644 --- a/scripts_src/headers/doors.h +++ b/scripts_src/headers/doors.h @@ -84,7 +84,7 @@ free up the space. procedure damage_p_proc begin variable Trap_Damage; /************ Wood Door ****************/ - + if (weapon_dmg_type(target_obj) == DMG_explosion) then begin if (DOOR_STATUS == STATE_WOOD) then begin if (local_var(LVAR_Trapped) == STATE_ACTIVE) then begin @@ -94,16 +94,16 @@ free up the space. explosion(self_tile, self_elevation, Trap_Damage); destroy_object(self_obj); end - + else begin set_local_var(LVAR_Trapped, STATE_INACTIVE); set_local_var(LVAR_Locked, STATE_INACTIVE); destroy_object(self_obj); end end - + /************ Metal Door ****************/ - + else if (DOOR_STATUS == STATE_METAL) then begin set_local_var(LVAR_Explosion_Attempts,local_var(LVAR_Explosion_Attempts)+1); if (local_var(LVAR_Trapped) == STATE_ACTIVE) then begin @@ -111,7 +111,7 @@ free up the space. Trap_Damage:=random(MIN_DAMAGE,MAX_DAMAGE); explosion(self_tile, self_elevation, Trap_Damage); end - + else if (local_var(LVAR_Explosion_Attempts) > DOOR_STRENGTH) then begin set_local_var(LVAR_Trapped, STATE_INACTIVE); set_local_var(LVAR_Locked,STATE_INACTIVE); @@ -170,7 +170,7 @@ determine how much information about the door will be given. end end end - + #endif #endif @@ -182,15 +182,15 @@ procedure. it will check to see if the door is trapped and locked. procedure use_p_proc begin /* Trap_Roll is a global variable to this script, defined at the beginning of the script. */ - + Traps_Roll:=roll_vs_skill(source_obj,SKILL_TRAPS,Trap_Bonus); - + if (local_var(LVAR_Trapped) == STATE_ACTIVE) then begin if (is_success(Traps_Roll)) then begin script_overrides; set_local_var(LVAR_Found_Trap,1); reg_anim_clear(source_obj); - + if (source_obj == dude_obj) then begin display_msg(my_mstr(204)); end @@ -198,7 +198,7 @@ procedure. it will check to see if the door is trapped and locked. display_msg(my_mstr(205)); end end - + else begin if (obj_is_locked(self_obj)) then begin script_overrides; @@ -210,7 +210,7 @@ procedure. it will check to see if the door is trapped and locked. end end end - + else if (obj_is_locked(self_obj)) then begin script_overrides; display_msg(my_mstr(203)); @@ -221,5 +221,5 @@ procedure. it will check to see if the door is trapped and locked. end end #endif - + #endif // DOORS_H diff --git a/scripts_src/headers/doors_containers.h b/scripts_src/headers/doors_containers.h index 8ef087f19..bebd2f62c 100644 --- a/scripts_src/headers/doors_containers.h +++ b/scripts_src/headers/doors_containers.h @@ -1,3 +1,6 @@ +/** @tra door.msg */ +// Also used in contaners: containr.msg + #ifndef DOORS_CONTAINERS_H #define DOORS_CONTAINERS_H @@ -293,7 +296,7 @@ end pry_strain = roll_critical(); if pry_strain then begin critter_dmg(source_obj,Crowbar_Strain,(DMG_normal_dam BWOR DMG_BYPASS_ARMOR)); - + if (source_obj == dude_obj) then begin if (Crowbar_Strain == 1) then begin display_msg(my_mstr(177)); @@ -302,7 +305,7 @@ end display_msg(my_mstr(178)+Crowbar_Strain+my_mstr(179)); end end - + else begin if (is_male(source_obj)) then begin if (Crowbar_Strain == 1) then begin @@ -312,7 +315,7 @@ end display_msg(my_mstr(183)+Crowbar_Strain+my_mstr(184)); end end - + else begin if (Crowbar_Strain == 1) then begin display_msg(my_mstr(186)); @@ -361,18 +364,18 @@ the coresponding varaibles for it. set_local_var(LVAR_Locked, STATE_ACTIVE); // Door is unlocked obj_lock(self_obj); // engine unlock door pcnpc_display_line(source_obj, 189, 191) - + if (local_var(LVAR_Gave_Locks_XP) == 0) then begin set_local_var(LVAR_Gave_Locks_XP,1); give_xp(Lockpick_Exp); end end - + else begin if (source_obj == dude_obj) then begin display_msg(my_mstr(190)); end - + else begin display_msg(obj_name(source_obj)+my_mstr(192)); end @@ -430,38 +433,38 @@ source_object will unlock the door and display the appropriate messages if (is_success(Locks_Roll)) then begin set_local_var(LVAR_Locked, STATE_INACTIVE); // Door is unlocked obj_unlock(self_obj); // engine unlock door - + if (source_obj == dude_obj) then begin display_msg(my_mstr(170)); end - + else begin display_msg(obj_name(source_obj)+my_mstr(173)); end - + if (local_var(LVAR_Gave_Locks_XP) == 0) then begin set_local_var(LVAR_Gave_Locks_XP,1); give_xp(Lockpick_Exp); end end - + else if (is_critical(Locks_Roll)) then begin jam_lock(self_obj); - + if (source_obj == dude_obj) then begin display_msg(my_mstr(171)); end - + else begin display_msg(obj_name(source_obj)+my_mstr(174)); end end - + else begin if (source_obj == dude_obj) then begin display_msg(my_mstr(172)); end - + else begin display_msg(obj_name(source_obj)+my_mstr(175)); end @@ -482,29 +485,29 @@ the player or NPC set off the trap or disarms it. if (source_obj == dude_obj) then begin display_msg(my_mstr(194)); end - + else begin display_msg(my_mstr(199)); end - + if (local_var(LVAR_Gave_Traps_XP) == 0) then begin set_local_var(LVAR_Gave_Traps_XP,1); give_xp(Traps_Exp); end end - + else begin set_local_var(LVAR_Trapped,STATE_INACTIVE); if (source_obj == dude_obj) then begin display_msg(my_mstr(196)); end - + else begin display_msg(obj_name(source_obj)+my_mstr(201)); end end end - + else if (is_critical(Traps_Roll)) then begin call Damage_Critter; end @@ -527,11 +530,11 @@ will need to be closed, as all traps are set to go off if the door is openned. procedure Set_Trap begin variable Explosive; variable Removal_Counter; - + /* Trap_Roll is a global variable to this script, defined at the beginning of the script. */ Traps_Roll:=roll_vs_skill(source_obj,SKILL_TRAPS,Trap_Set_Bonus); - + Explosive:=obj_being_used_with; if (obj_is_open(self_obj)) then begin @@ -539,7 +542,7 @@ will need to be closed, as all traps are set to go off if the door is openned. if (source_obj == dude_obj) then begin display_msg(my_mstr(206)); end - + else begin display_msg(obj_name(source_obj)+my_mstr(207)); end @@ -563,14 +566,14 @@ will need to be closed, as all traps are set to go off if the door is openned. display_msg(obj_name(source_obj)+my_mstr(210)); end end - + else if (is_critical(Traps_Roll)) then begin // crit fail, explode call real_explosion(Explosive); end else begin if (source_obj == dude_obj) then begin display_msg(my_mstr(209)); end - + else begin display_msg(obj_name(source_obj)+my_mstr(211)); end @@ -602,88 +605,88 @@ lockpick skill and perception to notice the lock. variable Perception_Check; variable perception_critical; variable Locks_Check; - + Perception_Check:=do_check(dude_obj,STAT_pe,0); perception_critical = roll_critical(); Locks_Check:=roll_vs_skill(dude_obj,SKILL_LOCKPICK,0); - + if (is_success(Perception_Check)) then begin if perception_critical then begin if (is_success(Locks_Check)) then begin if (is_critical(Locks_Check)) then begin display_msg(my_mstr(114)); end // Critical Success (Locks) - + else begin display_msg(my_mstr(115)); end // Regular Success (Locks) end - + else if (is_critical(Locks_Check)) then begin display_msg(my_mstr(116)); end // Critical Failure (Locks) - + else begin display_msg(my_mstr(117)); end // Regular Failure (Locks) end // Critical Success (Stat_Pe) - + else begin if (is_success(Locks_Check)) then begin if (is_critical(Locks_Check)) then begin display_msg(my_mstr(130)); end // Critical Success (Locks) - + else begin display_msg(my_mstr(131)); end // Regular Success (Locks) end - + else if (is_critical(Locks_Check)) then begin display_msg(my_mstr(132)); end // Critical Failure (Locks) - + else begin display_msg(my_mstr(133)); end // Regular Failure (Locks) end // Regular Success (Stat_pe) end - + else if perception_critical then begin if (is_success(Locks_Check)) then begin if (is_critical(Locks_Check)) then begin display_msg(my_mstr(146)); end // Critical Success (Locks) - + else begin display_msg(my_mstr(147)); end // Regular Success (Locks) end - + else if (is_critical(Locks_Check)) then begin display_msg(my_mstr(148)); end // Critical Failure (Locks) - + else begin display_msg(my_mstr(149)); end // Regular Failure (Locks) end // Critical Failure (Stat_pe) - + else begin if (is_success(Locks_Check)) then begin if (is_critical(Locks_Check)) then begin display_msg(my_mstr(162)); end // Critical Success (Locks) - + else begin display_msg(my_mstr(163)); end // Regular Success (Locks) end - + else if (is_critical(Locks_Check)) then begin display_msg(my_mstr(164)); end // Critical Failure (Locks) - + else begin display_msg(my_mstr(165)); end // Regular Failure (Locks) @@ -700,93 +703,93 @@ traps skill and perception to notice the trap. variable Perception_Check; variable perception_critical; variable Traps_Check; - + Perception_Check:=do_check(dude_obj,STAT_pe,0); perception_critical = roll_critical(); Traps_Check:=roll_vs_skill(dude_obj,SKILL_TRAPS,0); - + if (is_success(Perception_Check)) then begin if perception_critical then begin if (is_success(Traps_Check)) then begin if (is_critical(Traps_Check)) then begin display_msg(my_mstr(104)); end // Critical Success (traps) - + else begin display_msg(my_mstr(108)); end // Regular Success (Traps) end - + else if (is_critical(Traps_Check)) then begin display_msg(my_mstr(112)); end // Critical Failure (Traps) - + else begin display_msg(my_mstr(116)); end // Regular Failure (Traps) end // Critical Success (Stat_Pe) - + else begin if (is_success(Traps_Check)) then begin if (is_critical(Traps_Check)) then begin display_msg(my_mstr(120)); end // Critical Success (traps) - + else begin display_msg(my_mstr(124)); end // Regular Success (Traps) end - + else if (is_critical(Traps_Check)) then begin display_msg(my_mstr(128)); end // Critical Failure (Traps) - + else begin display_msg(my_mstr(132)); end // Regular Failure (Traps) end // Regular Success (Stat_pe) end - + else if perception_critical then begin if (is_success(Traps_Check)) then begin if (is_critical(Traps_Check)) then begin display_msg(my_mstr(136)); end // Critical Success (traps) - + else begin display_msg(my_mstr(140)); end // Regular Success (Traps) end - + else if (is_critical(Traps_Check)) then begin display_msg(my_mstr(144)); end // Critical Failure (Traps) - + else begin display_msg(my_mstr(148)); end // Regular Failure (Traps) end // Critical Failure (Stat_pe) - + else begin if (is_success(Traps_Check)) then begin if (is_critical(Traps_Check)) then begin display_msg(my_mstr(152)); end // Critical Success (traps) - + else begin display_msg(my_mstr(156)); end // Regular Success (Traps) end - + else if (is_critical(Traps_Check)) then begin display_msg(my_mstr(160)); end // Critical Failure (Traps) - + else begin display_msg(my_mstr(164)); end // Regular Failure (Traps) end // Regular Failure (Stat_Pe) - + end #endif @@ -800,420 +803,420 @@ on your lockpick and traps skills and perception to notice things. variable perception_critical; variable Traps_Check; variable Locks_Check; - + Perception_Check:=do_check(dude_obj,STAT_pe,0); perception_critical = roll_critical(); Traps_Check:=roll_vs_skill(dude_obj,SKILL_TRAPS,0); Locks_Check:=roll_vs_skill(dude_obj,SKILL_LOCKPICK,0); - + if (is_success(Perception_Check)) then begin - + /*************************************************************************************************/ - + /* Critical Success of a Perception Check (Start)*/ - + if perception_critical then begin - + if (is_success(Traps_Check)) then begin set_local_var(LVAR_Found_Trap,1); // player has found the trap - + /* Critical Success of a Traps Check (Start)*/ - + if (is_critical(Traps_Check)) then begin - + if (is_success(Locks_Check)) then begin if (is_critical(Locks_Check)) then begin display_msg(my_mstr(102)); end // critical success (Locks) - + else begin display_msg(my_mstr(103)); end // regular success (Locks) end - + else if (is_critical(Locks_Check)) then begin display_msg(my_mstr(104)); end // critical Failure (Locks) - + else begin display_msg(my_mstr(105)); end // end of regular failure (Locks) end // critical success (Traps) - + /* Success of a Traps Check (Start)*/ - + else begin if (is_success(Locks_Check)) then begin if (is_critical(Locks_Check)) then begin display_msg(my_mstr(106)); end // critical success (Locks) - + else begin display_msg(my_mstr(107)); end // regular success (Locks) end - + else if (is_critical(Locks_Check)) then begin display_msg(my_mstr(108)); end // critical Failure (Locks) - + else begin display_msg(my_mstr(109)); end // end of regular failure (Locks) end // regular success (Traps) end - + /* Critical Failure of a Traps Check (Start)*/ - + else if (is_critical(Traps_Check)) then begin if (is_success(Locks_Check)) then begin if (is_critical(Locks_Check)) then begin display_msg(my_mstr(110)); end // critical success (Locks) - + else begin display_msg(my_mstr(111)); end // regular success (Locks) end - + else if (is_critical(Locks_Check)) then begin display_msg(my_mstr(112)); end // critical Failure (Locks) - + else begin display_msg(my_mstr(113)); end // end of regular failure (Locks) end // critical Failure (Traps) - + /* Failure of a Traps Check (Start)*/ - + else begin if (is_success(Locks_Check)) then begin if (is_critical(Locks_Check)) then begin display_msg(my_mstr(114)); end // critical success (Locks) - + else begin display_msg(my_mstr(115)); end // regular success (Locks) end - + else if (is_critical(Locks_Check)) then begin display_msg(my_mstr(116)); end // critical Failure (Locks) - + else begin display_msg(my_mstr(117)); end // end of regular failure (Locks) end // regular failure (Traps) end // critical success (Stat_Pe) - + /* Critical Success of a Perception Check (Finish)*/ - + /*************************************************************************************************/ - + /* Success of a Perception Check (Start)*/ - + else begin if (is_success(Traps_Check)) then begin set_local_var(LVAR_Found_Trap,1); // player has found the trap - + /* Critical Success of a Traps Check (Start)*/ - + if (is_critical(Traps_Check)) then begin - + if (is_success(Locks_Check)) then begin if (is_critical(Locks_Check)) then begin display_msg(my_mstr(118)); end // critical success (Locks) - + else begin display_msg(my_mstr(119)); end // regular success (Locks) end - + else if (is_critical(Locks_Check)) then begin display_msg(my_mstr(120)); end // critical Failure (Locks) - + else begin display_msg(my_mstr(121)); end // end of regular failure (Locks) end // critical success (Traps) - + /* Success of a Traps Check (Start)*/ - + else begin if (is_success(Locks_Check)) then begin if (is_critical(Locks_Check)) then begin display_msg(my_mstr(122)); end // critical success (Locks) - + else begin display_msg(my_mstr(123)); end // regular success (Locks) end - + else if (is_critical(Locks_Check)) then begin display_msg(my_mstr(124)); end // critical Failure (Locks) - + else begin display_msg(my_mstr(125)); end // end of regular failure (Locks) end // regular success (Traps) end - + /* Critical Failure of a Traps Check (Start)*/ - + else if (is_critical(Traps_Check)) then begin if (is_success(Locks_Check)) then begin if (is_critical(Locks_Check)) then begin display_msg(my_mstr(126)); end // critical success (Locks) - + else begin display_msg(my_mstr(127)); end // regular success (Locks) end - + else if (is_critical(Locks_Check)) then begin display_msg(my_mstr(128)); end // critical Failure (Locks) - + else begin display_msg(my_mstr(129)); end // end of regular failure (Locks) end // critical Failure (Traps) - + /* Failure of a Traps Check (Start)*/ - + else begin if (is_success(Locks_Check)) then begin if (is_critical(Locks_Check)) then begin display_msg(my_mstr(130)); end // critical success (Locks) - + else begin display_msg(my_mstr(131)); end // regular success (Locks) end - + else if (is_critical(Locks_Check)) then begin display_msg(my_mstr(132)); end // critical Failure (Locks) - + else begin display_msg(my_mstr(133)); end // end of regular failure (Locks) end // regular failure (Traps) end // regular success (Stat_pe) end - + /* Success of a Perception Check (Finish)*/ - + /*************************************************************************************************/ - + /* Critical Failure of a Perception Check (Start)*/ - + else if perception_critical then begin if (is_success(Traps_Check)) then begin set_local_var(LVAR_Found_Trap,1); // player has found the trap - + /* Critical Success of a Traps Check (Start)*/ - + if (is_critical(Traps_Check)) then begin - + if (is_success(Locks_Check)) then begin if (is_critical(Locks_Check)) then begin display_msg(my_mstr(134)); end // critical success (Locks) - + else begin display_msg(my_mstr(135)); end // regular success (Locks) end - + else if (is_critical(Locks_Check)) then begin display_msg(my_mstr(136)); end // critical Failure (Locks) - + else begin display_msg(my_mstr(137)); end // end of regular failure (Locks) end // critical success (Traps) - + /* Success of a Traps Check (Start)*/ - + else begin if (is_success(Locks_Check)) then begin if (is_critical(Locks_Check)) then begin display_msg(my_mstr(138)); end // critical success (Locks) - + else begin display_msg(my_mstr(139)); end // regular success (Locks) end - + else if (is_critical(Locks_Check)) then begin display_msg(my_mstr(140)); end // critical Failure (Locks) - + else begin display_msg(my_mstr(141)); end // end of regular failure (Locks) end // regular success (Traps) end - + /* Critical Failure of a Traps Check (Start)*/ - + else if (is_critical(Traps_Check)) then begin if (is_success(Locks_Check)) then begin if (is_critical(Locks_Check)) then begin display_msg(my_mstr(142)); end // critical success (Locks) - + else begin display_msg(my_mstr(143)); end // regular success (Locks) end - + else if (is_critical(Locks_Check)) then begin display_msg(my_mstr(144)); end // critical Failure (Locks) - + else begin display_msg(my_mstr(145)); end // end of regular failure (Locks) end // critical Failure (Traps) - + /* Failure of a Traps Check (Start)*/ - + else begin if (is_success(Locks_Check)) then begin if (is_critical(Locks_Check)) then begin display_msg(my_mstr(146)); end // critical success (Locks) - + else begin display_msg(my_mstr(147)); end // regular success (Locks) end - + else if (is_critical(Locks_Check)) then begin display_msg(my_mstr(148)); end // critical Failure (Locks) - + else begin display_msg(my_mstr(149)); end // end of regular failure (Locks) end // regular failure (Traps) end // Critical Failure (Stat_pe) - + /* Critical Failure of a Perception Check (Finish)*/ - + /*************************************************************************************************/ - + /* Failure of a Perception Check (Start)*/ - + else begin if (is_success(Traps_Check)) then begin set_local_var(LVAR_Found_Trap,1); // player has found the trap - + /* Critical Success of a Traps Check (Start)*/ - + if (is_critical(Traps_Check)) then begin - + if (is_success(Locks_Check)) then begin if (is_critical(Locks_Check)) then begin display_msg(my_mstr(150)); end // critical success (Locks) - + else begin display_msg(my_mstr(151)); end // regular success (Locks) end - + else if (is_critical(Locks_Check)) then begin display_msg(my_mstr(152)); end // critical Failure (Locks) - + else begin display_msg(my_mstr(153)); end // end of regular failure (Locks) end // critical success (Traps) - + /* Success of a Traps Check (Start)*/ - + else begin if (is_success(Locks_Check)) then begin if (is_critical(Locks_Check)) then begin display_msg(my_mstr(154)); end // critical success (Locks) - + else begin display_msg(my_mstr(155)); end // regular success (Locks) end - + else if (is_critical(Locks_Check)) then begin display_msg(my_mstr(156)); end // critical Failure (Locks) - + else begin display_msg(my_mstr(157)); end // end of regular failure (Locks) end // regular success (Traps) end - + /* Critical Failure of a Traps Check (Start)*/ - + else if (is_critical(Traps_Check)) then begin if (is_success(Locks_Check)) then begin if (is_critical(Locks_Check)) then begin display_msg(my_mstr(158)); end // critical success (Locks) - + else begin display_msg(my_mstr(159)); end // regular success (Locks) end - + else if (is_critical(Locks_Check)) then begin display_msg(my_mstr(160)); end // critical Failure (Locks) - + else begin display_msg(my_mstr(161)); end // end of regular failure (Locks) end // critical Failure (Traps) - + /* Failure of a Traps Check (Start)*/ - + else begin if (is_success(Locks_Check)) then begin if (is_critical(Locks_Check)) then begin display_msg(my_mstr(162)); end // critical success (Locks) - + else begin display_msg(my_mstr(163)); end // regular success (Locks) end - + else if (is_critical(Locks_Check)) then begin display_msg(my_mstr(164)); end // critical Failure (Locks) - + else begin display_msg(my_mstr(165)); end // end of regular failure (Locks) end // regular failure (Traps) end // Regular Failure (Stat_pe) - + /* Failure of a Perception Check (Finish)*/ - + end #endif @@ -1250,7 +1253,7 @@ unlocking do not need to be done in Mapper. if (local_var(LVAR_Locked) == STATE_ACTIVE) then begin obj_lock(self_obj); end - + else begin obj_unlock(self_obj); end @@ -1265,9 +1268,9 @@ and Repair can be added to this list to give more information about the door. #ifndef custom_use_skill_on_p_proc procedure use_skill_on_p_proc begin variable Skill_Used; - + Skill_Used:=action_being_used; - + if (Skill_Used == SKILL_LOCKPICK) then begin script_overrides; //added by killap if (local_var(LVAR_Locked) == STATE_ACTIVE) then begin @@ -1277,7 +1280,7 @@ and Repair can be added to this list to give more information about the door. call Set_Lock; end end // End of Skill_Lockpick - + else if (Skill_Used == SKILL_TRAPS) then begin script_overrides; //added by killap if (local_var(LVAR_Trapped) == STATE_ACTIVE) then begin @@ -1287,7 +1290,7 @@ and Repair can be added to this list to give more information about the door. if (source_obj == dude_obj) then begin display_msg(my_mstr(195)); end - + else begin display_msg(obj_name(source_obj)+my_mstr(200)); end