[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]  General
. . -> [Subject]  How to work offline?
Home  |  Users  |  Search  |  FAQ
Register forum user name
Forgotten password?

How to work offline?

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

Posted by Munkar   (1 post)  [Biography] bio
Date Wed 11 Feb 2009 10:03 AM (UTC)

I am a complete novice in regards with mushclient, so please forgive me if this is pretty obvious:)

- I want to tinker with scripting and testing stuff without being connected to a mud(have some off hours at work and this will fill my time pretty nicely), and whenever I try to enter any text in command line mushclient wants to connect to a world.
- Another question I have is what command can I use to output text in the window which will be parsed like it is coming from the mud?

thank you in advance
[Go to top] top

Posted by Worstje   Netherlands  (899 posts)  [Biography] bio
Date Reply #1 on Wed 11 Feb 2009 11:06 AM (UTC)
MUSHclient only asks to connect to the mud when there is no alias matching what you type. In other words - input that would do nothing. In 99% of the cases, people would indeed like to be connected when typing there. :)

You could use the following alias to remedy that 'problem'. (You might want to remove the extra world.Tell I added to make sure it worked while I tested just now.)

  <send>world.Tell("Fallback alias: %1")

As for your second question, you can use world.Simulate. Or, if you are like me and prefer to use the interface, Game -> Test Trigger... is what you want.

[Go to top] top

Posted by WillFa   USA  (525 posts)  [Biography] bio
Date Reply #2 on Wed 11 Feb 2009 06:30 PM (UTC)
The easier way is to be sure a scripting prefix character is specified (ctrl+shift+6), and then turn on AutoSay (ctrl+shift+3) using the script char as the command, and clicking the checkbox to evaluate. This will be like having an interactive session to the script engine. (If you're using lua, the caveat is that each line is its own codeblock, own scope)

What that means is:

local x = 7 print (x+1)

prints 8

local x=7

returns an error about arithmetic on a nil value. Since the local x stopped being local at the carriage return.

Worstje's suggestion most likely won't work, since world.Send wants there to be a connection to send.
[Go to top] top

Posted by Worstje   Netherlands  (899 posts)  [Biography] bio
Date Reply #3 on Wed 11 Feb 2009 08:31 PM (UTC)
Yeah, my code was never meant to turn the thing into an interactive scripting interface. That is what Ctrl+I (Immediate...) is for. The only aim of my alias was to get rid of the popup asking to reconnect when typing stuff while offline and you happen to trigger it accidentally.
[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.


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.


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]