Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.
 Entire forum ➜ MUSHclient ➜ General ➜ How to work offline?

How to work offline?

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


Posted by Munkar   (1 post)  Bio
Date Wed 11 Feb 2009 10:03 AM (UTC)
Message
Hi,

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
Top

Posted by Worstje   Netherlands  (899 posts)  Bio
Date Reply #1 on Wed 11 Feb 2009 11:06 AM (UTC)
Message
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.)

<aliases>
  <alias
   match="^(.+)$"
   enabled="y"
   regexp="y"
   send_to="12"
   sequence="9999"
  >
  <send>world.Tell("Fallback alias: %1")
world.Send("%1")</send>
  </alias>
</aliases>


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.

Top

Posted by WillFa   USA  (525 posts)  Bio
Date Reply #2 on Wed 11 Feb 2009 06:30 PM (UTC)
Message
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
print(x+1)

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.
Top

Posted by Worstje   Netherlands  (899 posts)  Bio
Date Reply #3 on Wed 11 Feb 2009 08:31 PM (UTC)
Message
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.
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.


14,063 views.

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

Go to topic:           Search the forum


[Go to top] top

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