|
jed Adept
Joined: 18 Dec 2005 Posts: 246
|
Posted: Wed Jan 12, 2011 11:54 pm
Temporarily disable default command to unlock locked doors |
In the mapper, under configurations there is a box that says "Command send to unlock and open locked doors" Right now, mine says
Code: |
#FORALL pick|pick|open {%i %1} |
However I've got some locked doors within the mud that don't utilize this scheme always. For example, I've got some doors that I use a "pass wall" spell to go through, meaning I send the mud "Cast 'pass wall'" then "n". This might get me through a door if I don't have the key. However when I come to these doors, using this example, when I type the "n" it then also sends the results of the default command I first listed also. Not terrible, but instead of just using the two commands, I now have 5 commands sent to the mud. Is there a way to override the default? so I can tell the mapper to only "cast 'pass wall'" and "n" without the defaults coming after it? |
|
|
|
Moo Apprentice
Joined: 10 Apr 2009 Posts: 145
|
Posted: Thu Jan 13, 2011 12:04 pm |
Don't set a door for this direction. Set the "name" of the direction to "cast 'pass wall';n".
|
|
|
|
shalimar GURU
Joined: 04 Aug 2002 Posts: 4692 Location: Pensacola, FL, USA
|
Posted: Thu Jan 13, 2011 2:26 pm |
there is yes, use your cast and
#SENDRAW n |
|
_________________ Discord: Shalimarwildcat |
|
|
|
jed Adept
Joined: 18 Dec 2005 Posts: 246
|
Posted: Fri Jan 14, 2011 1:53 am |
I think I didn't post quite clearly enough. I'd like to use the name field for a given room exit to house this info, meaning I'd like to set the door name to something like
that would override the default door condition. I could uncheck the door box, and go that route, but I'd kinda like to keep the doors in place.
|
|
|
|
charneus Wizard
Joined: 19 Jun 2005 Posts: 1876 Location: California
|
Posted: Fri Jan 14, 2011 2:21 am |
Create an alias called "opendoor" or something to that effect.
Within that alias, do something like:
Code: |
#IF (%2="pass") {cast 'passwall';#SEND %1} {#FORALL "pick|pick|open" {#SEND %i %1}} |
In the section where you have the #FORALL now, change it to: "opendoor %1 %2". Then, any doors you can pass through, name them "pass" (or whatever you wish, just make sure you make the #IF match).
Also, it needs to be stressed that you MUST use a command like #SEND to start a line, not a function. |
|
|
|
jed Adept
Joined: 18 Dec 2005 Posts: 246
|
Posted: Fri Jan 14, 2011 10:44 pm |
I like that last idea, however, I'd like to check %2 to see if it is empty. If it is empty, use the defaults, if it is not empty then use whatever is in %2. seems theres a function to find if a variable is empty or not, but I can't seem to find it. In Excel it would be the ISBLANK function.
|
|
|
|
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: Fri Jan 14, 2011 11:13 pm |
%null() or (@varname = "")
|
|
_________________ EDIT: I didn't like my old signature |
|
|
|
shalimar GURU
Joined: 04 Aug 2002 Posts: 4692 Location: Pensacola, FL, USA
|
Posted: Sat Jan 15, 2011 12:36 am |
cant you just have it call an alias for you?
|
|
_________________ Discord: Shalimarwildcat |
|
|
|
jed Adept
Joined: 18 Dec 2005 Posts: 246
|
Posted: Sat Jan 15, 2011 2:17 am |
yes, calling an alias would be grand. seems that route has promise.
using
with opendoor having a script of
Code: |
#IF (%null(%2)) {#FORALL "pick|pick|open" {#SEND %i %1}} {%2} |
is getting me close but it's still not right.
For my test link, I have the Name: field blank, the Label: field blank and
in the Door: field.
The outcome I would like is:
Unlock d
Open d
d
but right now I get
open d
unlock d
open d
d
I feel like I'm not far away from the solution using an alias, I just don't seem to have the variables laid out quite right.
Also, seems to me there should be better definition somewhere of what the Name:Label:and Door: fields do with regard to a link. |
|
|
|
jed Adept
Joined: 18 Dec 2005 Posts: 246
|
Posted: Sat Jan 15, 2011 2:50 am |
So I've got some mild success.
leaving the Name: and Label: fields empty but putting
in the Door: field, using the opendoor %1 %2 as the command for locked doors and
Code: |
#IF (%null(%2)) {#FORALL "pick|pick|open" {#SEND %i %1}} {#say Ill send %2;#forall %2 {#send %i}} |
for the opendoor alias I get what I want, for one door. I try another door with the exact same setup but different commands in the Door: field, and it doesn't work. I think somehow in my testing the first door I managed to turn %2 into a string list which is kinda what I wanted to do, but it doesn't seem to work on all doors. somehow I managed to change it to a stringlist while messing around.[/quote] |
|
|
|
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: Sat Jan 15, 2011 7:57 pm |
Name = some random command that lets you move into a particular room, or otherwise do a particular action required to continue advancing. For example, CLIMB TREE, OPEN GRATE, SAY I FEEL THE DISCO INFERNO!. In ZMud, if you used it before, it equates to the OTHER COM field.
Label = the text you want to see for the exit link IF that link goes to a different zone (if it's to another room in the same zone, filling this in doesn't show anything different). The field is named the same in ZMud.
Door = the name of the door you want to open/unlock when the mapper encounters a door. When filled in, it will attempt the appropriate action on the name instead of the direction. The field is named the same in ZMud. |
|
_________________ EDIT: I didn't like my old signature |
|
|
|
|
|