diff --git a/data/scripts/scripts.lst b/data/scripts/scripts.lst index eeb662dc9c..152a4a51b4 100644 --- a/data/scripts/scripts.lst +++ b/data/scripts/scripts.lst @@ -1109,7 +1109,7 @@ FSPemtr2.int ; Palace Emitter 2 # local_vars=6 FSPemtr3.int ; Palace Emitter 3 # local_vars=6 FSEmpEmt.int ; Emporor Computer's Force Field # local_vars=6 niF2Hint.int ; New Reno Fallout 2 Hintbook # local_vars=1 -csTouch.int ; Script to signal if dude touches containers # local_vars=4 +csTouch.int ; Script to signal if dude touches containers # local_vars=9 csArea.int ; Script to signal if dude enters an area # local_vars=0 RCAscGrd.int ; Generic Guard for Ascorti's Bar # local_vars=10 ECLdPros.int ; Random Encounter Lead Prospector # local_vars=10 diff --git a/data/text/english/dialog/containr.msg b/data/text/english/dialog/containr.msg index 723be005f6..54dc592ff1 100644 --- a/data/text/english/dialog/containr.msg +++ b/data/text/english/dialog/containr.msg @@ -291,6 +291,11 @@ {188}{}{ points of damage.} {601}{}{It is open, dummy.} + +# Crowbar bent +{620}{}{You bend the crowbar beyond recognition. It's useless now.} +{621}{}{ bends the crowbar beyond recognition. It's useless now.} + ############################################################# # Damage done to the door due to explosives. # ############################################################# diff --git a/data/text/english/dialog/cstouch.msg b/data/text/english/dialog/cstouch.msg index b0162c8405..731bd83b38 100644 --- a/data/text/english/dialog/cstouch.msg +++ b/data/text/english/dialog/cstouch.msg @@ -1,16 +1,230 @@ +# look_at_proc +{100}{}{You see a wooden crate.} +{101}{}{You see a metal locker.} +{212}{}{You see a refrigerator.} + +# description_proc + +# Perception Check Critical Success +{102}{}{You see a sturdy container with a lock (which can be picked with + lockpicks) and a highly explosive trap in the frame, which + you may be able to pry open.} +{103}{}{You see a sturdy container with a lock on it and a highly + explosive trap in the frame, which you may be able to + pry open.} +{104}{}{You see a sturdy container with no apparent locking device and + a highly explosive trap in the frame, which you may be able + to pry open.} +{105}{}{You see a sturdy container with an old, rusty lock and a highly + explosive trap in the frame, which you may be able to pry + open.} + +{106}{}{You see a sturdy container with a lock (which can be picked with + lockpicks) and a trap in the frame, which you may be able to + pry open.} +{107}{}{You see a sturdy container with a lock on it and a trap in + the frame, which you may be able to pry open.} +{108}{}{You see a sturdy container with no apparent locking device and + a trap in the frame, which you may be able to pry open.} +{109}{}{You see a sturdy container with an old, rusty lock and a trap + in the frame, which you may be able to pry open.} + +{110}{}{You see a sturdy container with a lock (which can be picked with + lockpicks) and a cut wire in the frame, which you may be + able to pry open.} +{111}{}{You see a sturdy container with a lock on it and a severed wire + in the frame, which you may be able to pry open.} +{112}{}{You see a sturdy container with no apparent locking device and + a severed wire in the frame, which you may be able to pry + open.} +{113}{}{You see a sturdy container with an old, rusty lock and a cut + wire in the frame, which you may be able to pry open.} + +{114}{}{You see a sturdy container with a lock (which can be picked with + lockpicks), which you may be able to pry open.} +{115}{}{You see a sturdy container with a lock on it, which you may be + able to pry open.} +{116}{}{You see a sturdy container with no apparent locking device, + which you may be able to pry open.} +{117}{}{You see a sturdy container with an old, rusty lock, which + you may be able to pry open.} + +# Perception Check Success + +{118}{}{You see a sturdy container with a lock (which can be picked with + lockpicks) and a highly explosive trap in the frame.} +{119}{}{You see a sturdy container with a lock on it and a highly + explosive trap in the frame.} +{120}{}{You see a sturdy container with no apparent locking device and + a highly explosive trap in the frame.} +{121}{}{You see a sturdy container with an old, rusty lock and a highly + explosive trap in the frame.} + +{122}{}{You see a sturdy container with a lock (which can be picked with + lockpicks) and a trap in the frame.} +{123}{}{You see a sturdy container with a lock on it and a trap in + the frame.} +{124}{}{You see a sturdy container with no apparent locking device and + a trap in the frame.} +{125}{}{You see a sturdy container with an old, rusty lock and a trap + in the frame.} + +{126}{}{You see a sturdy container with a lock (which can be picked with + lockpicks) and a cut wire in the frame.} +{127}{}{You see a sturdy container with a lock on it and a severed wire + in the frame.} +{128}{}{You see a sturdy container with no apparent locking device and + a severed wire in the frame.} +{129}{}{You see a sturdy container with an old, rusty lock and a cut + wire in the frame.} + +{130}{}{You see a sturdy container with a lock (which can be picked with + lockpicks) on it.} +{131}{}{You see a sturdy container with a lock on it.} +{132}{}{You see a sturdy container with no apparent locking device.} +{133}{}{You see a sturdy container with an old, rusty lock.} + +# Perception Check Critical Failure + +{134}{}{You see a damaged container with a lock (which can be picked with + lockpicks) and a highly explosive trap in the frame.} +{135}{}{You see a damaged container with a lock on it and a highly + explosive trap in the frame.} +{136}{}{You see a damaged container with no apparent locking device and + a highly explosive trap in the frame.} +{137}{}{You see a damaged container with an old, rusty lock and a highly + explosive trap in the frame.} + +{138}{}{You see a damaged container with a lock (which can be picked with + lockpicks) and a trap in the frame.} +{139}{}{You see a damaged container with a lock on it and a trap in + the frame.} +{140}{}{You see a damaged container with no apparent locking device and + a trap in the frame.} +{141}{}{You see a damaged container with an old, rusty lock and a trap + in the frame.} + +{142}{}{You see a damaged container with a lock (which can be picked with + lockpicks) and a cut wire in the frame.} +{143}{}{You see a damaged container with a lock on it and a severed wire + in the frame.} +{144}{}{You see a damaged container with no apparent locking device and + a severed wire in the frame.} +{145}{}{You see a damaged container with an old, rusty lock and a cut + wire in the frame.} + +{146}{}{You see a damaged container with a lock (which can be picked with + lockpicks).} +{147}{}{You see a damaged container with a lock on it.} +{148}{}{You see a damaged container with no apparent locking device.} +{149}{}{You see a damaged container with an old, rusty lock.} + +# Perception Check Failure + +{150}{}{You see an old container with a lock (which can be picked with + lockpicks) and a highly explosive trap in the frame.} +{151}{}{You see an old container with a lock on it and a highly + explosive trap in the frame.} +{152}{}{You see an old container with no apparent locking device and + a highly explosive trap in the frame.} +{153}{}{You see an old container with an old, rusty lock and a highly + explosive trap in the frame.} + +{154}{}{You see an old container with a lock (which can be picked with + lockpicks) and a trap in the frame.} +{155}{}{You see an old container with a lock on it and a trap in + the frame.} +{156}{}{You see an old container with no apparent locking device and + a trap in the frame.} +{157}{}{You see an old container with an old, rusty lock and a trap + in the frame.} + +{158}{}{You see an old container with a lock (which can be picked with + lockpicks) and a cut wire in the frame.} +{159}{}{You see an old container with a lock on it and a severed wire + in the frame.} +{160}{}{You see an old container with no apparent locking device and + a severed wire in the frame.} +{161}{}{You see an old container with an old, rusty lock and a cut + wire in the frame.} + +{162}{}{You see an old container with a lock (which can be picked with + lockpicks).} +{163}{}{You see an old container with a lock on it.} +{164}{}{You see an old container with no apparent locking device.} +{165}{}{You see an old container with an old, rusty lock.} + +############################################################# +# The following lines are for damage done to the player or # +# critter who tried to open the door, or failed a traps # +# roll. # +############################################################# + +# The following sets of lines are to be translated as: +# You set off the trap and were hit for [x] points of damage. +# NPC sets of the trap and was hit for [x] points of damage. + +# Player sets off the trap +{166}{}{You set off the trap and were hit for } +{167}{}{ points of damage.} + +# NPC sets off the trap +{168}{}{ sets off the trap and was hit for } +{169}{}{ points of damage.} + +############################################################# +# The following lines are for when the player uses skills # +# on the door. # +############################################################# + # Player uses a skill on the door # Unlock Door -{170}{}{You deftly pick the lock on the locker.} -{171}{}{Your lack of skill has jammed the lock on this locker.} -{172}{}{You fail to pick the lock on this locker.} +{170}{}{You deftly pick the lock on the container.} +{171}{}{Your lack of skill has jammed the lock on this container.} +{172}{}{You fail to pick the lock on this container.} + +# Lock Door +{189}{}{You deftly lock the container.} +{190}{}{You fail to lock the container.} + +# Find Trap on the Door +{194}{}{You find a trap on the container.} +{195}{}{You fail to find any traps on the container.} + +# Disarm the Trap on the Door +{196}{}{You skillfully disarm the trap.} +{198}{}{You fail to disarm the trap.} + +# NPC uses a skill on the door +# The following lines are prepended by the NPC's name # Unlock Door -{173}{}{ deftly picks the lock on the locker.} -{174}{}{'s lack of skill has jammed the lock on this locker.} -{175}{}{ failed to pick the lock on this locker.} +{173}{}{ deftly picks the lock on the container.} +{174}{}{'s lack of skill has jammed the lock on this container.} +{175}{}{ failed to pick the lock on this container.} + +# Lock Door +{191}{}{ deftly locks the container.} +{192}{}{ failed to lock the container.} + +# Find Trap on the Door +{199}{}{ finds a trap on the container.} +{200}{}{ fails to find any traps on the container.} + +# Disarm the Trap on the Door +{201}{}{ skillfully disarms the trap.} +{202}{}{ fails to disarm the trap.} + +# Using a key on the door. +{400}{}{You unlock the container.} + +############################################################# +# The following lines are for when the player tries to # +# use items on the door which are not lockpicks. # +############################################################# # Player uses an item on the door -{176}{}{You bust the lock off the door.} +{176}{}{You bust the lock off the container.} {177}{}{You strain your back while trying to bust the lock and take a point of damage.} @@ -25,7 +239,7 @@ # NPC uses an item on the door # The following lines are prepended by the NPC's name -{181}{}{ busts the lock off the door.} +{181}{}{ busts the lock off the container.} {182}{}{ strains his back while trying to bust the lock and takes a point of damage.} @@ -37,7 +251,7 @@ {184}{}{ points of damage.} {185}{}{ is too weak to bust the lock.} -{186}{}{ strains his back while trying to bust the lock and takes +{186}{}{ strains her back while trying to bust the lock and takes a point of damage.} # The following line set of lines is to be translated as: @@ -47,16 +261,57 @@ {187}{}{ strains her back while trying to bust the lock and takes } {188}{}{ points of damage.} -# Lock Door -{189}{}{You deftly lock the locker.} -{190}{}{You fail to lock the locker.} +{601}{}{It is open, dummy.} -# Lock Door -{191}{}{ deftly locks the locker.} -{192}{}{ failed to lock the locker.} +# Crowbar bent +{620}{}{You bend the crowbar beyond recognition. It's useless now.} +{621}{}{ bends the crowbar beyond recognition. It's useless now.} + +############################################################# +# Damage done to the door due to explosives. # +############################################################# + +{193}{}{The explosives don't even put a scratch on the container.} + +############################################################# +# Reporting Door Status should it be used. # +############################################################# + +{203}{}{The container appears to be locked.} +{204}{}{You notice a trap on the container.} + +# NPC finds trap +# The following line is to be translated as: +# NPC notices a trap in the door jamb. + +{205}{}{ notices a trap on the container jamb.} + +############################################################# +# Setting traps on a door and whether the door is open or # +# closed to set the trap. # +############################################################# + +# Player tries to set a trap on an open door +{206}{}{You are unable to place a trap on this container, because + the container is open.} + +# NPC tries to set a trap on an open door +{207}{}{ is unable to place a trap on this container, because the + container is open.} + +# Player tries to set a trap on a closed door +{208}{}{You skillfully set a trap in the container.} +{209}{}{You fail to properly set the trap in the container.} + +# NPC tries to set a trap on a closed door +{210}{}{ skillfully sets a trap on the container.} +{211}{}{ fails to properly set the trap in the container.} -{203}{}{The locker appears to be locked.} +# PC critically fails to set a trap +{610}{}{You fail spectacularly, and the explosive goes off prematurely.} +# NPC critically fails to set a trap +{611}{}{ fails spectacularly, and the explosive goes off prematurely.} {800}{}{You retrieved the fob.} {810}{}{You retrieved the plans.} -{820}{}{You retrieved the K-9 motivator.} \ No newline at end of file +{820}{}{You retrieved the K-9 motivator.} diff --git a/data/text/english/dialog/door.msg b/data/text/english/dialog/door.msg index 609bd55f45..7965852fdf 100644 --- a/data/text/english/dialog/door.msg +++ b/data/text/english/dialog/door.msg @@ -289,6 +289,11 @@ {188}{}{ points of damage.} {601}{}{It is open, dummy.} + +# Crowbar bent +{620}{}{You bend the crowbar beyond recognition. It's useless now.} +{621}{}{ bends the crowbar beyond recognition. It's useless now.} + ############################################################# # Damage done to the door due to explosives. # ############################################################# diff --git a/scripts_src/generic/ziwoddor.ssl b/scripts_src/generic/ziwoddor.ssl index d324c33f90..9d45c20d78 100644 --- a/scripts_src/generic/ziwoddor.ssl +++ b/scripts_src/generic/ziwoddor.ssl @@ -1417,30 +1417,51 @@ end This procedure is used should the player try to pry the door open using a crowbar or some similar instrument. ***************************************************************************/ +procedure roll_pry_success begin + variable rnd = random(1,10); + if rnd <= (get_critter_stat(source_obj,STAT_st) + Crowbar_Bonus) then return true; + return false; +end +procedure roll_pry_strain begin + variable rnd = random(1,20); + if rnd == 20 then return true; + return false; +end +// High strength = more chance to destroy the crowbar, same for metal doors/containers +procedure roll_pry_destroy_crowbar begin + variable rnd = random(1,100); + variable str = get_critter_stat(source_obj,STAT_st); + variable bonus = 0; + if DOOR_STATUS == STATE_METAL then bonus = 10; + if rnd + str + bonus > 95 then return true; + return false; +end + procedure Pry_Door begin - variable Stat_Roll; - script_overrides; + variable pry_success; + variable pry_strain; + variable pry_destroy_crowbar; if not obj_is_locked(self_obj) then begin display_msg(mstr(601)); return; end - Stat_Roll:=do_check(source_obj,STAT_st,Crowbar_Bonus); - - if (is_success(Stat_Roll)) then begin + pry_success = roll_pry_success(); + + if pry_success then begin obj_unlock(self_obj); - if (source_obj == dude_obj) then begin display_msg(mstr(176)); - end - - else begin + end else begin display_msg(mstr(181)); end + return; end - else if (is_critical(Stat_Roll)) then begin + // failure: damage + pry_strain = roll_pry_strain(); + 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 @@ -1473,7 +1494,18 @@ procedure Pry_Door begin end end - else begin + // crowbar destroy + pry_destroy_crowbar = roll_pry_destroy_crowbar(); + if pry_destroy_crowbar then begin + variable crowbar = get_item(source_obj, PID_CROWBAR); + rm_obj_from_inven(source_obj, crowbar); + destroy_object(crowbar); + if source_obj == dude_obj then display_msg(mstr(620)); + else display_msg(obj_name(source_obj) + mstr(621)); + end + + // regular failure + if not (pry_strain or pry_destroy_crowbar) then begin if (source_obj == dude_obj) then begin display_msg(mstr(180)); end @@ -1482,6 +1514,7 @@ procedure Pry_Door begin display_msg(mstr(185)); end end + end procedure Damage_Critter begin diff --git a/scripts_src/headers/doors_containers.h b/scripts_src/headers/doors_containers.h index 9936d62423..8a0d04ceb1 100644 --- a/scripts_src/headers/doors_containers.h +++ b/scripts_src/headers/doors_containers.h @@ -198,29 +198,53 @@ was taken, and remove the trap. This procedure is used should the player try to pry the door open using a crowbar or some similar instrument. ***************************************************************************/ +procedure roll_pry_success begin + variable rnd = random(1,10); + if rnd <= (get_critter_stat(source_obj,STAT_st) + Crowbar_Bonus) then return true; + return false; +end +procedure roll_pry_strain begin + variable rnd = random(1,20); + if rnd == 20 then return true; + return false; +end +// High strength = more chance to destroy the crowbar, same for metal doors/containers +procedure roll_pry_destroy_crowbar begin + variable rnd = random(1,100); + variable str = get_critter_stat(source_obj,STAT_st); + variable bonus = 0; + if DOOR_STATUS == STATE_METAL then bonus = 10; + if rnd + str + bonus > 95 then return true; + return false; +end + #ifndef custom_Pry_Door procedure Pry_Door begin - variable Stat_Roll; + variable pry_success; + variable pry_strain; + variable pry_destroy_crowbar; if not obj_is_locked(self_obj) then begin display_msg(my_mstr(601)); return; end - Stat_Roll:=do_check(source_obj,STAT_st,Crowbar_Bonus); + pry_success = roll_pry_success(); - if (is_success(Stat_Roll)) then begin + if pry_success then begin set_local_var(LVAR_Locked, STATE_INACTIVE); obj_unlock(self_obj); if (source_obj == dude_obj) then begin display_msg(my_mstr(176)); - end - else begin + end else begin display_msg(my_mstr(181)); end + return; end - else if (is_critical(Stat_Roll)) then begin + // failure: damage + pry_strain = roll_pry_strain(); + 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 @@ -253,7 +277,18 @@ crowbar or some similar instrument. end end - else begin + // crowbar destroy + pry_destroy_crowbar = roll_pry_destroy_crowbar(); + if pry_destroy_crowbar then begin + variable crowbar = get_item(source_obj, PID_CROWBAR); + rm_obj_from_inven(source_obj, crowbar); + destroy_object(crowbar); + if source_obj == dude_obj then display_msg(my_mstr(620)); + else display_msg(obj_name(source_obj) + my_mstr(621)); + end + + // regular failure + if not (pry_strain or pry_destroy_crowbar) then begin if (source_obj == dude_obj) then begin display_msg(my_mstr(180)); end @@ -262,6 +297,7 @@ crowbar or some similar instrument. display_msg(my_mstr(185)); end end + end #endif diff --git a/scripts_src/navarro/cstouch.ssl b/scripts_src/navarro/cstouch.ssl index ae7821f045..43d8a633ef 100644 --- a/scripts_src/navarro/cstouch.ssl +++ b/scripts_src/navarro/cstouch.ssl @@ -21,90 +21,72 @@ #include "../headers/command.h" -#define Lockpick_Exp EXP_LOCKPICK_NORMAL -#define STATE_ACTIVE (0) -#define STATE_INACTIVE (1) +#define custom_use_skill_on_p_proc +#define custom_use_obj_on_p_proc +#define custom_pickup_p_proc +#define custom_use_p_proc +#define LOCKED_STATUS STATE_ACTIVE +#define TRAPPED_STATUS STATE_INACTIVE +#define DOOR_STATUS STATE_METAL +#define LOCK_STATUS STATE_STANDARD_LOCK +#define custom_mstr NAME +#include "../headers/containers.h" -#define Lock_Bonus (-20) - -procedure start; procedure timed_event_p_proc; -procedure use_p_proc; -procedure use_skill_on_p_proc; -procedure use_obj_on_p_proc; procedure signal_critter; -procedure Set_Lock; -procedure Unlock_Lock; -procedure Lockpick_It; -procedure Lock_It; -procedure Pry_It; - -#define LVAR_Locked (0) -#define LVAR_Gave_Locks_XP (1) -#define LVAR_got_plans (2) -#define LVAR_got_part (3) -variable Skill_Used; -variable Locks_Roll; -variable Tool; -variable Stat_Roll; -variable Crowbar_Strain; - -procedure start begin -end +#define LVAR_got_plans (7) +#define LVAR_got_part (8) procedure timed_event_p_proc begin set_map_var(MVAR_Touched,0); end -procedure use_p_proc begin - call signal_critter; - - if (local_var(LVAR_Locked) == STATE_ACTIVE) then begin - script_overrides; - display_msg(mstr(203)); - end -end - procedure use_skill_on_p_proc begin call signal_critter; + variable Skill_Used; Skill_Used:=action_being_used; if (Skill_Used == SKILL_LOCKPICK) then begin - if (local_var(LVAR_Locked) == STATE_ACTIVE) then begin - call Unlock_Lock; + script_overrides; + if (local_var(LVAR_Locked) == STATE_ACTIVE) then begin + call Unlock_Lock; + end + else begin + call Set_Lock; + end + end // End of Skill_Lockpick + else if (Skill_Used == SKILL_TRAPS) then begin + script_overrides; + if (local_var(LVAR_Trapped) == STATE_ACTIVE) then begin + call Skill_Disarm_Traps; + end + else begin + if (source_obj == dude_obj) then begin + display_msg(my_mstr(195)); end + else begin - call Set_Lock; + display_msg(obj_name(source_obj)+my_mstr(200)); end - end // End of Skill_Lockpick - + end + end // End of Skill_Traps end procedure use_obj_on_p_proc begin call signal_critter; + variable Tool; + Tool:=obj_pid(obj_being_used_with); + pry_trap_block + full_lockpick_block +end - Tool:=obj_pid(obj_being_used_with); - if (Tool == PID_LOCKPICKS) then begin - if (local_var(LVAR_Locked) == STATE_ACTIVE) then begin - call Lockpick_It; - end - else begin - call Lock_It; - end - end - else if (Tool == PID_EXP_LOCKPICK_SET) then begin - if (local_var(LVAR_Locked) == STATE_ACTIVE) then begin - call Lockpick_It; - end - else begin - call Lock_It; - end - end - else if (Tool == PID_CROWBAR) then begin - call Pry_It; +procedure use_p_proc begin + call signal_critter; + if (local_var(LVAR_Locked) == STATE_ACTIVE) then begin + script_overrides; + display_msg(mstr(203)); end - end procedure pickup_p_proc begin @@ -161,154 +143,3 @@ procedure signal_critter begin //display_msg("don't touch me there!"); add_timer_event(self_obj,game_ticks(2),0); end - -procedure Set_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 Lock_It; -end - -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_It; -end - -procedure Lockpick_It begin - 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(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 - end -end - -procedure Lock_It begin - if (is_success(Locks_Roll)) then begin - set_local_var(LVAR_Locked, STATE_ACTIVE); // Door is unlocked - 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 - end -end - -procedure Pry_It begin - //Stat_Roll:=do_check(source_obj,STAT_st,Crowbar_Bonus); - Stat_Roll:=do_check(source_obj,STAT_st,0); - - if (is_success(Stat_Roll)) then begin - set_local_var(LVAR_Locked, STATE_INACTIVE); - obj_unlock(self_obj); - - if (source_obj == dude_obj) then begin - display_msg(mstr(176)); - end - - else begin - display_msg(mstr(181)); - end - end - - else if (is_critical(Stat_Roll)) 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)); - end - else 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 - display_msg(mstr(182)); - end - else begin - display_msg(mstr(183)+Crowbar_Strain+mstr(184)); - end - end - - else begin - if (Crowbar_Strain == 1) then begin - display_msg(mstr(186)); - end - else begin - display_msg(mstr(187)+Crowbar_Strain+mstr(188)); - end - end - end - end - - else begin - if (source_obj == dude_obj) then begin - display_msg(mstr(180)); - end - - else begin - display_msg(mstr(185)); - end - end -end diff --git a/scripts_src/ncr/sislvdor.ssl b/scripts_src/ncr/sislvdor.ssl index 5b8c14bccb..02e86e0be6 100644 --- a/scripts_src/ncr/sislvdor.ssl +++ b/scripts_src/ncr/sislvdor.ssl @@ -78,16 +78,8 @@ procedure use_skill_on_p_proc begin Skill_Used:=action_being_used; if (Skill_Used == SKILL_LOCKPICK) then begin - script_overrides; //added by killap + script_overrides; display_msg(mstr(212)); -/* - if (local_var(LVAR_Locked) == STATE_ACTIVE) then begin - call Unlock_Lock; - end - else begin - call Set_Lock; - end -*/ end // End of Skill_Lockpick else if (Skill_Used == SKILL_TRAPS) then begin @@ -118,8 +110,11 @@ procedure use_obj_on_p_proc begin Tool:=obj_pid(obj_being_used_with); if ((Tool == PID_DYNAMITE) or (Tool == PID_PLASTIC_EXPLOSIVES)) then begin - script_overrides; //added by killap + script_overrides; call Set_Trap; + end else if (Tool == PID_CROWBAR) then begin + script_overrides; + display_msg(mstr(213)); end else begin script_overrides; display_msg(mstr(212));