Mushclient Questions

by Esano

Back to Mechanic's Corner.

Noola2009-02-21 05:49:37
QUOTE (Esano @ Feb 20 2009, 11:34 PM) <{POST_SNAPBACK}>
It happens when the text that you requested ended up on the same line as a prompt. The prompt gets gagged and replaced by your script, but it looks like nothing else on that line does.

Config prompt add linebreak might fix it, or there's an option regarding linebreaks in Mush itself somewhere which might do the trick.



You are the coolest person alive! hug.gif
Unknown2009-02-23 03:05:38
Quick, probably basic and stupid question, how do I connect to Lusternia from MUSH? Arg, I hate trying to use a new client. Anyways, I went to connection/quick connect/used lusternia.com for the world name/port number 23/but I have no idea what to put for the ip address. Or, am I completely off on this?
Unknown2009-02-23 03:30:19
So the world name can be whatever you want ... it is essentially the name of the file which your configuration settings are saved under. So you can name it Lusternia if you want.

For the TCP/IP Address just use lusternia.com and the port number is 23. That should get you in.
Unknown2009-02-23 04:45:04
Thanks!

Now, to set up simply keypad macros, I can get into the config window, but I can't figure out how to make one do more than one thing. Like, for instance, I want key5 to do map and ql. Map;ql doesn't work. Is there a way to do that in mush?
Unknown2009-02-23 05:06:55
Just create an alias that does map and ql, then assign numpad5 to that alias.
Unknown2009-02-23 05:16:17
Aha, wonderful and thanks much! I think I confuse myself half the time. I seem to be trying to carry zmud stuff into mush and it isn't mixing well.

Next, I'll need to figure out how to color text. biggrin.gif

Actually, I may still need help with it. To create a basic alias, I'll need to do #alias (whatever). In order to do two commands at once for one alias, how would I do that?
Unknown2009-02-23 05:36:34
There is a very nifty way to create aliases, triggers and variables and actually everything on Mushclient, its all in the Configure box:

Go to Game > Configure > Alias
Click Add
Give your alias a name
In the Send box, simply type 'map', hit Enter, type 'ql' again
Unknown2009-02-23 05:42:52
You, my friend, are an absolute angel. I was beginning to regret going from zmud to mush. Thanks!
Unknown2009-02-23 05:53:07
QUOTE (julie @ Feb 22 2009, 08:45 PM) <{POST_SNAPBACK}>
Now, to set up simply keypad macros, I can get into the config window, but I can't figure out how to make one do more than one thing. Like, for instance, I want key5 to do map and ql. Map;ql doesn't work. Is there a way to do that in mush?


If you want to be able to use something like map;ql with the command stacking with the semicolon you'll want to open up the configuration window and go to input>commands and check the box for Command Stacking Using and put a semicolon in the blank box or whatever symbol or thing you want to command stack with.
Unknown2009-02-23 16:39:51
Please be patient.

I went to macros, and tried to get F12 to do stand/evoke pentagram. I tried the action as replace and send now, neither are working.

I also tried to create aliases and only a couple of them are working, though, I have no idea why. For instance, I have an alias that inputs my password to the game. It doesn't work.

On a good note, all my keypad macros are working.
Unknown2009-02-23 17:03:42
Okay well for your macro what exactly did you input in the box? If you did what I told you to do in my last post about command stacking then if you wanted to stand and evoke pentagram you'll want to have in the box for the macro ... stand;evoke pentagram with the checkbox for send now checked.

As for aliases ... do you have the checkbox for enabled checked on the right hand side of the aliases? Otherwise try and list out your aliases for us like what the alias attempts to send and what the drop down box for send to is set to and what checkboxes on the right are checked. That might make it easier for us to diagnose your problem.
Unknown2009-02-23 17:22:23
Well, I finally have the macro working. Now, the aliases I make aren't.

Here's an example of an alias that isn't working:

Alias: hf
Send: honors

Enabled checked.

Send to: World (immediate) Note that I've tried both World and World immediate here.
Sequence: 100
Group: Basic


When I type in hf, it does do honors. But, when I try to type in hf person, it doesn't work.


Another alias I have that isn't working is my game password alias. This is just an example as to keep from posting that:

Alias: xxx
Send: password

Enabled checked.

Send to: World (immediate) Note that I've tried both World and World immediate here.
Sequence: 100
Group: blank


I know it probably has to be something simple that I'm just not getting. I bought a system and tried to check my aliases against the ones in the system to be sure I did them right, but they seem to match up.

I made an alias to do gg = get gold;put gold in pack, then made a keypad macro to do gg. This one works for some really odd reason.
Unknown2009-02-23 17:34:49
Okay the honors one is an easy fix. You'll want your alias to be hf * instead of just hf as the asterisk will act as a wildcard (don't quote me on terminology I use I just know how to do it). And then in your send box go ahead and put in honors %1 (the %1 will be replaced with your first wildcard ... for future reference if you have more than one wildcard you'll just use %2 %3 etc to be replaced with the second and third wildcards respectively). For the dropdown box you'll want it sent to World.

So in the format you used in your post it'll look like this:

Alias: hf *
Send: honors %1

Enable checked.

Send to: World
Sequence: 100
Isuka2009-02-23 17:40:07
QUOTE (julie @ Feb 23 2009, 09:22 AM) <{POST_SNAPBACK}>
Well, I finally have the macro working. Now, the aliases I make aren't.

Here's an example of an alias that isn't working:

Alias: hf
Send: honors

Enabled checked.

Send to: World (immediate) Note that I've tried both World and World immediate here.
Sequence: 100
Group: Basic


When I type in hf, it does do honors. But, when I try to type in hf person, it doesn't work.


Another alias I have that isn't working is my game password alias. This is just an example as to keep from posting that:

Alias: xxx
Send: password

Enabled checked.

Send to: World (immediate) Note that I've tried both World and World immediate here.
Sequence: 100
Group: blank


I know it probably has to be something simple that I'm just not getting. I bought a system and tried to check my aliases against the ones in the system to be sure I did them right, but they seem to match up.

I made an alias to do gg = get gold;put gold in pack, then made a keypad macro to do gg. This one works for some really odd reason.

Arguments are not automatically added to the end of an alias in MUSH, you have to explicitly declare them. Basically, they work more like triggers from the input line than as extendable commands.

Try this:
CODE

     match="^hf (\\w+)$"
   enabled="y"
   group="honous"
   regexp="y"
   sequence="100"
  >
  honors %1
  


Copy and paste that block of text, go to the aliases window, and select "Paste".
Isuka2009-02-23 17:42:43
For reference, as well, you don't have to create an alias to put your password in. It's possible to have MUSH automatically log you in with your username and password. Go to CTRL+G>Connecting and put your username and password into the input fields, and select Diku-style from the connect box.
Unknown2009-02-23 18:02:18
Ahh, this works. Thanks, you two. I apologize for spamming you with so many questions. It's just way different from zmud and hard to get right for me. I'm sure I'll get it given time though.
Isuka2009-02-23 18:23:06
QUOTE (julie @ Feb 23 2009, 10:02 AM) <{POST_SNAPBACK}>
Ahh, this works. Thanks, you two. I apologize for spamming you with so many questions. It's just way different from zmud and hard to get right for me. I'm sure I'll get it given time though.

It is a big change, the two system work very differently. It's worth it, though.
Unknown2009-02-24 03:53:37
If anyone can make this work in MUSH, you can have my first born.

Well, not really, but I'll love you forever.

CODE
#CLASS {Doors and Directions}
#VAR LastDirection {}
#VAR LockedDoor 0
#TRIGGER {^There is * door in the way.} {#IF (!@LockedDoor) {open door @LastDirection;@LastDirection} {#VAR LockedDoor 0}}
#TRIGGER {This * door has been magically locked shut.} {#VAR LockedDoor 1}
#KEY KEY8 {n;#VAR LastDirection n}
#KEY DIV {up;#VAR LastDirection up}
#KEY MULT {down;#VAR LastDirection down}
#KEY KEY0 {in;#VAR LastDirection in}
#KEY DEc {out;#VAR LastDirection out}
#KEY KEY7 {nw;#VAR LastDirection nw}
#KEY KEY9 {ne;#VAR LastDirection ne}
#KEY KEY4 {w;#VAR LastDirection w}
#KEY KEY6 {e;#VAR LastDirection e}
#KEY KEY1 {sw;#VAR LastDirection sw}
#KEY KEY2 {s;#VAR LastDirection s}
#KEY KEY3 {se;#VAR LastDirection se}
Isuka2009-02-24 04:57:27
QUOTE (julie @ Feb 23 2009, 07:53 PM) <{POST_SNAPBACK}>
If anyone can make this work in MUSH, you can have my first born.

Well, not really, but I'll love you forever.

CODE
#CLASS {Doors and Directions}
#VAR LastDirection {}
#VAR LockedDoor 0
#TRIGGER {^There is * door in the way.} {#IF (!@LockedDoor) {open door @LastDirection;@LastDirection} {#VAR LockedDoor 0}}
#TRIGGER {This * door has been magically locked shut.} {#VAR LockedDoor 1}
#KEY KEY8 {n;#VAR LastDirection n}
#KEY DIV {up;#VAR LastDirection up}
#KEY MULT {down;#VAR LastDirection down}
#KEY KEY0 {in;#VAR LastDirection in}
#KEY DEc {out;#VAR LastDirection out}
#KEY KEY7 {nw;#VAR LastDirection nw}
#KEY KEY9 {ne;#VAR LastDirection ne}
#KEY KEY4 {w;#VAR LastDirection w}
#KEY KEY6 {e;#VAR LastDirection e}
#KEY KEY1 {sw;#VAR LastDirection sw}
#KEY KEY2 {s;#VAR LastDirection s}
#KEY KEY3 {se;#VAR LastDirection se}

CODE

     name="direction_capture"
   match="^(n|north|e|east|s|south|w|west|in|out|u|up|d|down)$"
   enabled="y"
   group="Doors_and_Directions"
   regexp="y"
   send_to="12"
   sequence="100"
  >
  SetVariable("Doors_LastDirection","%1")
Send("%1")

  


     enabled="y"
   group="Doors_and_Directions"
   match="^There is.+door in the way\\.$"
   name="opendoor_capture"
   regexp="y"
   send_to="12"
   sequence="100"
  >
  if GetVariable("Doors_Locked") then
  SetVariable("Doors_Locked", "false")
else
  local lastdir = GetVariable("Doors_LastDirection")
  Send("open door " .. lastdir)
  Send(lastdir)
end

  
     enabled="y"
   group="Doors_and_Directions"
   match="^This.+door has been magically locked shut\\.$"
   name="lockeddoor_capture"
   regexp="y"
   send_to="9"
   sequence="100"
   variable="Doors_Locked"
  >
  true
  


  n
  false


As for the macros, you can actually just use the "Keypad" settings under CTRL+G>Input>Keypad to set up which keys do which directions. They come preconfigured for most basic directions. Although, I can't actually test if they parse through aliases or just send the raw command you enter, because I'm on a laptop without a keypad. You'll just have to test it out and see if it works.

Also: this is done with lua scripting.

Gero2009-02-24 23:29:08
So last night being sleepy I did something to mess up my mush save, so now when I try to open it it says that File does not have a valid MUSHclient XML signature. After that shows up and I hit ok I get hit with Unexpected file format. Is there any way to save my file, I don't want to have to enter all those aliases and triggers back in.