 |
xiphoid Newbie
Joined: 12 Jun 2008 Posts: 2
|
Posted: Thu Jun 12, 2008 9:27 am
a=b syntax |
Is there any way to emulate zMUD's "a=b syntax" toggle in cMUD?
The MUD that I play uses "=" as a command separator and I simply can't get used to escaping it on the command line.
Is there any way to preprocess input using lua or something similar?
All suggestions gratefully received. |
|
|
 |
Zugg MASTER

Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Thu Jun 12, 2008 5:15 pm |
The simple way to send the command line to the MUD verbatim without parsing is to enclose the entire command in " quotes, or start the command with the ` line-escape character. But you can also completely control the command line parsing using #ONINPUT triggers.
To generate an #ONINPUT trigger to capture this and override it, go into the Settings Editor and create a New Trigger. In the pattern, enter:
(*)=(*)
and in the Trigger Type pulldown box in the "More" panel along the bottom, select "Command Input" as the trigger type. Then, uncheck the "Trigger on Newline" and CHECK the "Trigger on Prompt" option. This is the most important option. When you select "Trigger on Prompt" for a Command Input (#ONINPUT) trigger, CMUD will call your trigger *before* it attempts to parse the command line as a normal script command.
In the Script part of the trigger, you can just do this:
#SEND %1"="%2
#NOINPUT
and it will send the original command to the MUD and then prevent the command line input from getting parsed. |
|
|
 |
xiphoid Newbie
Joined: 12 Jun 2008 Posts: 2
|
Posted: Fri Jun 13, 2008 10:57 pm |
Thanks very much for the prompt and detailed reply.
|
|
|
 |
|
|