Lockable Objects

Error message

Deprecated function: implode(): Passing glue string after array is deprecated. Swap the parameters in drupal_get_feeds() (line 394 of /var/www/pied-piper.ermarian.net/includes/common.inc).
AuthorTopic: Lockable Objects
Shock Trooper
Member # 954
Profile #0
I used the lockbox.txt script that shipped with the editor to lock a chest. But when the player unlocks it, the default message that comes up refers to it as unlocking a "door".
It appears this is hard coded into the "run_pick_lock" call that is part of the script. Is there any easy way to chage this, or even better, has anyone written a better script???
Posts: 246 | Registered: Thursday, April 11 2002 07:00
Warrior
Member # 286
Profile #1
Could you do it manually? As in: Find the charater in the party with the highest Tool Use skill, and get the highest quality lockpick they have. Then test the strength of the lock against that character's Tool Use skill plus the Tool Use bonus of the lockpick. It's hacky and annoying, but it could work... right? :)

--------------------
Z: "I just feel so insignificant."
Psych: "You ARE. You're an ANT."
--Antz
Posts: 104 | Registered: Saturday, November 17 2001 08:00
Shock Trooper
Member # 954
Profile #2
I was hoping no one would come up with that solution. My scripting skills are still at the remedial stage. I think Mr. Vogel should have done it right in the first place.
Posts: 246 | Registered: Thursday, April 11 2002 07:00
Off With Their Heads
Member # 4045
Profile Homepage #3
I haven't tested this at all, but it seems like all you have to do is replace the line

if (run_pick_lock(get_mechanism_difficulty) == FALSE) { with

reset_dialog_preset_options(10);
choice = run_dialog(1);
if (choice == 2) {
if (get_stat(char_with_highest_skill(15)),15) < get_mechanism_difficulty()) {
However, that doesn't take into account lockpicks, as far as I can tell. You may have to check for that manually with a char_has_item call, since I don't see a char_has_item_with_ability call or anything approaching that.

--------------------
Arancaytar: Every time you ask people to compare TM and Kel, you endanger the poor, fluffy kittens.
Smoo: Get ready to face the walls!
Ephesos: In conclusion, yarr.

Kelandon's Pink and Pretty Page!!: the authorized location for all things by me
The Archive of all released BoE scenarios ever
Posts: 7968 | Registered: Saturday, February 28 2004 08:00
Agent
Member # 4506
Profile Homepage #4
Depends. I haven't tried with this script, but with some of the scripts you can just openb it up and edit the text it displays. For example...

The special magic door one, the one that says all about the enchantment that you have to destroy before you can tackle the door... I've edited it to make it say something totally different in my new scenario. All you have to do is edit the text.

Perhaps it works the same for this script?

--------------------
"You dare Trifle with Avernum?" ~ Erika the Archmage
--------------------
My Scenarios:
Undead Valley : A small Undead problem, what could possibly go wrong?
--------------------
Richard Black - PROOF of his existance (the Infernal one's website).
--------------------
MY FORUM! Randomosity at it's highest! :)
Posts: 1370 | Registered: Thursday, June 10 2004 07:00
Warrior
Member # 286
Profile #5
Nope. The problem is with the call run_pick_lock().

--------------------
Z: "I just feel so insignificant."
Psych: "You ARE. You're an ANT."
--Antz
Posts: 104 | Registered: Saturday, November 17 2001 08:00
Agent
Member # 2820
Profile #6
I haven't tested it, but that doesn't seem to make sense. I'll be sure to try it out ASAP after this message.

The script clearly says that "You manage to pick the lock." I don't see the mention of any doors.

--------------------
Thuryl: I mean, most of us don't go around consuming our own bodily fluids, no matter how delicious they are.
====
Alorael: War and violence would end if we all had each other's babies!
====
Drakefyre: Those are hideous mangos.
Posts: 1415 | Registered: Thursday, March 27 2003 08:00
Shock Trooper
Member # 954
Profile #7
The message says you "open the door" only when you don't have a pick.
Posts: 246 | Registered: Thursday, April 11 2002 07:00