[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]  Autologin: Built-in vs. Triggers
Home  |  Users  |  Search  |  FAQ
Register forum user name
Forgotten password?

Autologin: Built-in vs. Triggers

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

Posted by Yasik   Ukraine  (14 posts)  [Biography] bio
Date Wed 19 Jan 2005 07:45 AM (UTC)
Greetings everyone!

First of all i want to thank Mr. Gammon for making such great client. I have tested about 10 of them, but every client i used had lack of features i'd like to see in it, until i installed Mush, which has even more than i need :)

Now, to topic of post.
There is a mud (slothmud.org 6101).
There is few lines on which i wish Mush to react automatically. Here they are:

1. "By what name do you wish to be known?"
2. "Password:"
3. "Password accepted. Press return to continue..."

What i want from triggers is to send contents of variable @char_name on 1st line mentioned, contents of variable @pass_word on 2nd line mentioned and "Enter" on 3rd line mentioned.

I tried nearly all combination of triger patterns ("Regular expression" checked on/off, "Send to..." etc), options etc, but none of it worked. I know there is Autologin feature (which works correctly), but i'd like to try to make it on triggers.

I will be forever in your debt if you post here properly working triggers with pattern and 'send' parts and also notification about what checkboxes must be "checked" in Global_Preferences and World_Configuration menus or|and everywhere you think its needed. And your post will be even more valuable if you find time to test these triggers with the mud (IP and port see above).

Thanx in advance :)
[Go to top] top

Posted by Ked   Russia  (524 posts)  [Biography] bio
Date Reply #1 on Wed 19 Jan 2005 05:09 PM (UTC)

Amended on Wed 19 Jan 2005 05:11 PM (UTC) by Ked

First off, storing your name/password in MC variables isn't a very good idea, as it's fairly easy for someone to snatch them from there using a plugin or a code snippet. Unless of course you check the code in all the plugins you install. Having said that...

Triggers won't work, since they require a newline to match and login/password prompts aren't terminated with a newline. An easier solution would be to use a script to send the contents of your variables when the world connects to the mud. To do that you'd need to use either a plugin or a main script file, since the latter is a bit simple I'll use it as an example. The language used is vbscript. Set that as your scripting language, make sure that scripting is enabled. Then create a new text file (Notepad will work for this) and put the following there:

option explicit

sub OnWorldConnect

   Send GetVariable("char_name")
   Send GetVariable("pass_word")

end sub

Save this file with a .vbs extension somewhere in Mushclient's folder.

Then go back to the Scripting dialogue in Mushclient and put "OnWorldConnect" (without the quotes) in the "Connect:" field of the World Events box. Browse for the file you saved above and open it to set it as your script file. Click OK to close the dialogue and parse your script. Now when you connect to the mud, the first two things to get sent will be your char name and password.
[Go to top] top

Posted by Shadowfyr   USA  (1,783 posts)  [Biography] bio
Date Reply #2 on Wed 19 Jan 2005 05:40 PM (UTC)
Another solution is to the settings at General-Connecting.

Enter your character name and password, then place:


in the box below. Not sure if putting a blank line "enter" is possible or not. This tends to be safer that storing the values in unsecure variables.
[Go to top] top

Posted by Faux   United Kingdom  (77 posts)  [Biography] bio
Date Reply #3 on Thu 20 Jan 2005 12:22 PM (UTC)
To answer your actual question, there's a massive disadvantage to triggers in that using them on some muds will get you banned/deleted/.. etc.

Triggers won't work, since they require a newline to match..

Not techically accurate any more :) Have a search of the forum.

Faux, from Discworld. Feel free to come talk to me =)

[Go to top] top

Posted by Ked   Russia  (524 posts)  [Biography] bio
Date Reply #4 on Thu 20 Jan 2005 03:23 PM (UTC)
I remember reading something about being able to force newlines, or something along those lines, but as I've been using OnPluginPartialLine without any problems for awhile, I didn't pay much attention :)
[Go to top] top

Posted by Nick Gammon   Australia  (21,607 posts)  [Biography] bio   Forum Administrator
Date Reply #5 on Sat 22 Jan 2005 09:49 PM (UTC)
What is wrong with using the auto-login feature of MUSHclient? It just sends your name and password directly after connecting. It doesn't really matter what the MUD sends, you assume they will ask for the name and password.

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


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]