Quote:
All the negatives are there, the client just isn't catching them because they are broken by the prompt.
...
The only difference is that the mapping routine is treating a prompt line as a 'good' response, when it should behave like the '# direction' one does.
OK, first I'll describe how the automapper works, then we can argue about whether there is a "better" way of doing it. :)
Adding to mapper list
- In the "send to MUD" routine, directly before text is sent to the MUD, if mapping is enabled the text is sent to the mapper routine. By hooking into this place we catch things like directly-entered commands, aliases, macros, keypad commands, and scripted sends.
- In the mapper routine, the line is broken up into individual lines (in case you sent: east <newline> north ) and each line is considered.
- If the line is exactly one of the following:
"north",
"n",
"south",
"s",
"east",
"e",
"west",
"w",
"up",
"u",
"down",
"d",
"ne",
"nw",
"se",
"sw"
then it is considered a moving instruction.
- If "remove reverses" is enabled then a "reverse" direction is removed from the map list (N followed by S for example).
- Otherwise, the direction is added to the mapper list.
- The status line is updated.
Mapping failure
During the processing of each line from the MUD (after the newline as been received, and immediately prior to checking for triggers), the line is scanned for the "auto-map failure string" (eg. "You can't go that way").
If there is a match (on the regular expression, or the fixed text) then the most recently entered mapping direction is removed from the list, if any. The idea here is that if you enter:
north <--- You
You can't go that way <--- MUD
Then "north" is removed from the list.
Your comment that a prompt line is taken as a "good" response is incorrect. There is no interpretation of good responses. MUDs vary in so many ways in the way they respond to a movement command that the only thing we detect is a failure, not a good response.
If it is not catching the negative because of the prompt you may need to rework the failure string. eg.
^.*What?$
However be warned that if "What?" is your failure string, and it replies "What?" when you type in a bad command, then each bad command will also remove the most recently mapped move.
The mapper is intended as an aid, not something that will work perfectly under all conditions. For instance, these things would throw it out:
- Fleeing - "You flee from combat" - which sends you off in a random direction.
- Following someone. You move from room to room without the mapper knowing it.
- Teleporting or transfering (or spells that do that). That will change your location without the mapper knowing it.
- Other commands (eg. "enter house", "leave shop") that the mapper doesn't process.
- Entering commands quickly. If you enter moves quicker than the MUD responds, it may remove the wrong one from the list, as I said earlier.
Quote:
I don't entirely agree with this one since it fails to take into account odd rooms where the entrances don't match.
This is an option you can turn off. Usually it will apply, and you don't want to clutter up your speedwalk with "dead ends" but if you are mapping a strange area, turn it off. |