Jamdog from TBA and his own mud posted on CWG and asked these questions. I did answer them the best I thought of, but I thought Tochy would have more insight since it is his script. Jamdog does ask if it had to be script only or if a combination of the two would work. Prom happened to be on and I mentioned it would mean he'd have to get involved and he said he'd try, so, if Jamdog (or anyone else there) doesn't come up with a script only solution, we could try a combination. Here is Jamdog's post:
A couple of questions about this...
Does it have to be scripts only, or will a script/spec-proc combination do?
What happens when the zone resets? Do the 'locked' levers unlock themselves, and return to their normal position?
What command is used? The 'pull' command doesn't normally mean you hold a lever - would it make sense if 'pull lever' returned "You pull the lever, but it returns to the upright position", and 'hold lever' returns "You pull and hold the lever"
If you are holding the lever, do you need to 'release' it, or can you just walk away to release it?
When all three levers are held, can any of the three players release a lever, and move to the next room, or does it just have to be 'player 1'.
What do players type to pull the 2nd lever? Will the 'pull/hold lever' command pull the next unpulled lever, or does the player need to 'pull/hold lever n'?
Personally, I'd make each lever an obj spec-proc, and have a static or global array of char_data structs, with info on who is holding the levers (so when they are locked, it's easier to send a message to them, like "You hear a click as the lever is locked into position", and they would be NULL if no-one is holding the lever). The spec-proc could handle the pull/hold/release commands as well as attempts to leave. It could also set/unset an obj var (if the lever is type OTHER, then v0 is free), which scripts could then use to check if a lever is held.
I can throw together a lever spec-proc for you, and you can see how it compares to a scripted version, if you like.
My reply to Jamdog's post was this:
I'd love for it to be script only. We do have some good coders, but our most active coder is still learning and is already having some problems with other processes that we're trying to install. He does say that if it comes down to it, he will try to help if it needs to be a script/spec process combination. Now, on to the answers to your questions. Please note, these are the answers I *think* the builder wants, but will not be 100% sure on that until he answers a copy of your post that I'll leave on our website.
Zone reset: I would think that the levers would return to their normal positions.
Releasing levers: I would think that just walking away would release it - which I believe is what he was looking for.
Re-reading the post, I believe whichever player was the first player to pull a lever (no matter which lever was pulled first) is the one that is able to move to the next room to lock the levers in place.
I believe that he wants it so the player actually has to choose which lever to pull... so pull lever 2, or pull lever 1 (or lever red and lever orange), but as stated, it doesn't matter which order they're pulled in, just that all 3 get pulled. But for later building, I wouldn't mind something that could be adapted so it may require a specific order in which to be pulled. But that could be a whole 'nother animal.
On that note too of this being adapted for another script, I seem to remember rumbling about having the same basic thing, but in seperate rooms (lever 1 is in room a and lever 2 is in room b, etc). Would that be easier or harder to do?
As I said though, our most active coder is willing to give a spec-proc a try if it is needed to do this. Thank you for all of your time and energy Jamdog! I would like to see what you can come up with.