[Home] [Downloads] [Search] [Help/forum]

Gammon Forum

See www.mushclient.com/spam for dealing with forum spam. Please read the MUSHclient FAQ!

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  Suggestions
. . -> [Subject]  mimicing zmud things (key characters, prompt functionality)
Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?

mimicing zmud things (key characters, prompt functionality)

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page


Posted by SKYY   (28 posts)  [Biography] bio
Date Wed 26 Mar 2008 04:22 AM (UTC)
Message
Kudos for this awesome software. Super customizable and fast, but I have a few suggestions (questions?):

1) Is there any way to get zmud-like functionality for special characters? For example:

: = #all
@ = variable
# = commands (#save,#connect,#disconnect,#alias,#key)

2) I like to multiplay, but I also like sharing a single prompt between windows. Every time I ctrl-tab between "worlds", the command prompt switches. Is there a way to send the same input to all command lines?

3) Scrolling--I actually like the zmud scrolling when set to "1". Is there any way to do something similar with mushclient?

Thanks again.
[Go to top] top

Posted by Nick Gammon   Australia  (21,322 posts)  [Biography] bio   Forum Administrator
Date Reply #1 on Wed 26 Mar 2008 05:26 AM (UTC)

Amended on Wed 26 Mar 2008 05:27 AM (UTC) by Nick Gammon

Message
Quote:

: = #all


I gather this is to send to all worlds?

There is a plugin that does that, see this page:

http://www.gammon.com.au/mushclient/plugins/

Look for "Multiple_Send".

Once installed you can type: #all <something> to send that to all open worlds.

If you also meant use ":" instead of #all, you can use this alias, which redirects to #all:


<aliases>
  <alias
   match=":*"
   enabled="y"
   send_to="10"
   sequence="100"
  >
  <send>#all %1</send>
  </alias>
</aliases>


See http://www.mushclient.com/pasting for how to paste that direct into the client.

(You also need to install the Multiple_Send plugin as the alias uses that to send to all worlds).

Quote:

@ = variable


Inside aliases, you can check the "expand variables" box to have @variable-name expanded out.

If you mean, on the command-line, as you type things, you could install the plugin below, and that will expand variables as you type them (in the command window).


<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE muclient>
<!-- Saved on Wednesday, March 26, 2008, 4:13 PM -->
<!-- MuClient version 4.19 -->

<!-- Plugin "Expand_Variables" generated by Plugin Wizard -->

<muclient>
<plugin
   name="Expand_Variables"
   author="Nick Gammon"
   id="1ead7a8396869ebbfd495f7e"
   language="Lua"
   purpose="Expands instances of @variable on the command line"
   save_state="y"
   date_written="2008-03-26 16:09:37"
   requires="4.00"
   version="1.0"
   >

</plugin>

<!--  Script  -->

<script>
<![CDATA[
function OnPluginCommandEntered (sText)
  return string.gsub (sText, "@[A-Za-z0-9_]+", 
         function (v)
           return GetPluginVariable ("", v:sub (2)) or v
         end )
end -- function OnPluginCommandEntered 
]]>
</script>
</muclient>



Save between the lines as Expand_Variables.xml, and install that as a plugin.

Quote:

# = commands (#save,#connect,#disconnect,#alias,#key)


First, if you make "/" (or anything you want) as the scripting prefix (in scripting configuration), you could simply do things like:


/Disconnect ()   -- disconnects you
/Connect ()  -- connects you
/Save ("")  -- saves the world configuration


You have to get the capitalization right, and use the brackets, because these are script commands. If you really want to just type "#connect" then you could make an alias:


<aliases>
  <alias
   match="#connect"
   enabled="y"
   send_to="12"
   sequence="100"
  >
  <send>Connect ()</send>
  </alias>
</aliases>


That simply makes an alias "#connect" that does the script command "Connect ()" - you could do similar things for other operations.

Quote:

I like to multiplay, but I also like sharing a single prompt between windows. Every time I ctrl-tab between "worlds", the command prompt switches. Is there a way to send the same input to all command lines?


Do you mean, to update the command lines in all windows, if you type something into one of them?

Quote:

Scrolling--I actually like the zmud scrolling when set to "1".


What is that exactly?

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Onoitsu2   USA  (248 posts)  [Biography] bio
Date Reply #2 on Wed 26 Mar 2008 06:44 AM (UTC)
Message
I think by the prompt line he is meaning something that is showing all stats of ALL opened worlds in the bar, no matter what world is currently the activated one.

I think the infobar worked for that, but am totally unsure.

I also am clueless as to the scroll = 1 zMud thing.

-Onoitsu2
[Go to top] top

Posted by Darwin   USA  (125 posts)  [Biography] bio
Date Reply #3 on Wed 26 Mar 2008 05:17 PM (UTC)
Message
The zMUD setting scroll = 1 is related to the refresh rate of the screen. The lower the number the more smoothly it scrolled. The number is how many lines of text zMUD will recieve before the screen is refreshed with new text to display. If you set it too high, then the screen becomes jerky when refreshing. There were some upgrades to it that made it scroll more smoothly, but... well, that's what that setting is for.

I'm not sure how that would apply to MUSHclient though.
[Go to top] top

Posted by Nick Gammon   Australia  (21,322 posts)  [Biography] bio   Forum Administrator
Date Reply #4 on Wed 26 Mar 2008 08:30 PM (UTC)
Message
For scrolling, you can go to File menu -> Global Preferences -> General and check either "smoother scrolling" or "very smooth scrolling".

Smoother scrolling forces the window to be redrawn for every line, thus making them scroll up the screen more like an old teletype terminal, and very smooth scrolling forces the window to be redrawn for every pixel of height (eg. 10 times per line if the line is 10 pixels high).

Very smooth scrolling gives a nice smooth look, however at the cost of some speed.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Nick Gammon   Australia  (21,322 posts)  [Biography] bio   Forum Administrator
Date Reply #5 on Wed 26 Mar 2008 08:53 PM (UTC)
Message
Another thing you might find helpful is this post:

http://www.gammon.com.au/forum/bbshowpost.php?id=6442

That shows how to make an alias that adds aliases from the command line (like #alias something).

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by SKYY   (28 posts)  [Biography] bio
Date Reply #6 on Thu 27 Mar 2008 01:11 AM (UTC)
Message
Jesus christ Nick--thanks!!!

I really like this client. I only hope I can learn it well enough, because I like it WAY more than zmud already.

So customizable, I just can't believe it...using it feels almost like writing my own mud client, but absolutely not!

Thanks again.

Concerning the unresolved questions:

The scrolling thing refers to zmud scrolling one line of text per Hz refresh. I love the "very smooth scrolling" feature, but is there any way to set that to MORE than 1 px per second? 3 or 4 px/sec would be perfect (perhaps).

Concerning the zmud prompt thing--I'm referring to how the zmud prompt will keep whatever you type in the prompt (you know, you type "blah", hit <enter>, and your previously-typed "blah" is still in your prompt (and now selected), AND how when you <ctrl-tab> to the next window, that selected input is STILL selected. I like that, but in mushclient (and newer versions of zmud), every open world (character) has its own prompt, so when I <ctrl-tab> to the next one, what I just typed in the previous command prompt is not there.

Once again, thanks so much. I'm loving this program!
[Go to top] top

Posted by Shadowfyr   USA  (1,783 posts)  [Biography] bio
Date Reply #7 on Thu 27 Mar 2008 02:56 AM (UTC)
Message
Hmm. I presume that one could trap the send event, then push that back onto the command window, and... I don't know if Mushclient has a "select from X to Y in command window" type function. Tabbing and keeping it, I presume you could trap the focus event for the world, so when lost it would copy out the stuff in the command line, then in the focus on the next one... You have a bit of a problem, since there is no "global" variable space between worlds where common data can be passed (An idea no one has thought of or suggested at this point). The only way you could do it would be to store the value, then somehow get the next world to find out which other world was last in focus, so it can "ask" it what value it stored.

It might be easier to add a "world_changed" type callback function, which is called when one world loses focus, but its another Mushclient world that *gains* the focus, then have some way that the world which is being switched from can "tell" the new one what ever things it wants to in its own "lost focus" function (perhaps by setting some global hash, though that sort of thing would only be available in Lua, or other languages that support hashes, like Perl). This could actually be a useful thing, for some situations.

The only other way would be to make the plugin that supports the feature "aware" of all other copies installed. I.e., the plugin would need to do a global hunt for itself in all open worlds, when you install a new copy, then both store those worlds, and also inform them of its own existence. Then, from then on, when ever one "lost" focus it would first all all other plugins of its type, passing the prompt contents, then which ever one "got" focus would a) inform the others it got it, then take the data and place it in its own input window. This would work within the existing system, but lacks the interesting cross-world, any plugin can see the data, hash that you would have with the other. Its also a whole damn lot more complicated, as far as the user is concerned, since all plugins that use that trick for anything would have to implement the negotiation to ID each other *and* correctly pass/use the data.

Anyway. There are probably ways to manage it, both with existing features, and with the addition of some new inter-world data storage. Whether or not one is better or worse than the other is bound to be a matter if argument and disagreement.
[Go to top] top

Posted by Nick Gammon   Australia  (21,322 posts)  [Biography] bio   Forum Administrator
Date Reply #8 on Thu 27 Mar 2008 04:48 AM (UTC)
Message
Quote:

I'm referring to how the zmud prompt will keep whatever you type in the prompt (you know, you type "blah", hit <enter>, and your previously-typed "blah" is still in your prompt (and now selected),


See world configuration -> Commands and check the option "Auto-repeat command".

As for auto-moving the current command to the other windows, there is no provision for that, although you might conceivably trap losing the focus and copy the command window around. I am not sure I really like that idea.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Nick Gammon   Australia  (21,322 posts)  [Biography] bio   Forum Administrator
Date Reply #9 on Thu 27 Mar 2008 04:55 AM (UTC)
Message
Quote:

I love the "very smooth scrolling" feature, but is there any way to set that to MORE than 1 px per second? 3 or 4 px/sec would be perfect (perhaps).


No, there is no such provision. I found on my PC that even the very smooth scrolling was quite fast.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


11,495 views.

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.

[Home]


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( https://gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Hosted at FutureQuest]