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.

Due to spam on this forum, all posts now need moderator approval.

 Entire forum ➜ MUSHclient ➜ Suggestions ➜ Scripting/Triggers

Scripting/Triggers

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


Posted by KL   (5 posts)  Bio
Date Mon 15 Mar 2004 06:37 AM (UTC)
Message
I've been evaluating this client for a little while now, and I have to say that a certain other client (albeit bloated) has this one beaten hands down. Mushclient is definitely faster, and I would imagine more powerful, but without learning a programming language, it's useless. It's defintely not for a beginner, and that's why the other one is much more popular.

I'd buy this one, but only if you could switch trigger groups on and off from within the program, with a simple command (such as '#T+ name' in the other client, if you can do this in Mushclient and I'm not aware of it, my apologies.) You also need to be able to capture text to a spawned window. That's a *must*. There's nothing more infuriating than being stuck in pages and pages of battle spam and missing messages.

KL
Top

Posted by Nick Gammon   Australia  (23,133 posts)  Bio   Forum Administrator
Date Reply #1 on Mon 15 Mar 2004 07:34 AM (UTC)

Amended on Mon 15 Mar 2004 07:42 AM (UTC) by Nick Gammon

Message
I think I know which client you mean, and for the sake of discussion let's call it "Client Z". You say when using Client Z you can do things like switch trigger groups on and off with a "simple command" but really, the command is part of their scripting language.

In case you don't believe me, I'll quote directly from their help file:

Quote:

In the section on variables and triggers you learned the basics about programming in [Client Z]. However, [Client Z] is a powerful event-driven programming language, and you have barely touched the surface of what is possible.


You notice they themselves describe its commands as a "programming language".

The command (script function) that you quote (#T+) turns on a trigger group. You can do this very easily in MUSHclient as well. For example make an alias:


Match: hunt
Send:  enablegroup "hunt", 1
Send to: script


Now I don't really call typing in one line (enablegroup "hunt", 1) as having to "learn a programming language", to any more extent than you had to learn the Client Z version (#T+ hunt).

As for capturing text to a spawned window, you don't even need any "scripting" to do that in MUSHclient. Make a trigger:


Match: chat*   (or whatever identifies the chatting)
Send: %0
Send to: Notepad (append)


This appends each matching line to a separate window for review later on.

I deliberately tried to make MUSHclient easy to use, without needing scripting, as I realise not everyone is a programmer, and basically you can delve as far into it as you like. Many things can be done without any scripting, however more powerful features can be accessed with reference to the inbuilt script commands. MUSHclient supports multiple scripting languages as well (VBscript, Jscript, Perlscript, Python), so the interface to the inbuilt script functions can be written in the language you feel comfortable with.

There are also plugins available from this site, and from other MUSHclient users, which encapsulate useful scripts, triggers, aliases, etc. in a way that makes them useable by simply installing, without needing to program.

If you get keen, you can review them, as plugins as supplied in source form, and make modifications to suit you, and learn from them, how more powerful things can be accomplished.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Dave   Australia  (93 posts)  Bio
Date Reply #2 on Mon 15 Mar 2004 08:04 AM (UTC)
Message
To get the required functionality, you could make a couple of aliases (in JavaScript):
Alias: #T+ *
Send: enablegroup("%1", true);
Send To: script


and:

Alias: #T- *
Send: enablegroup("%1", false);
Send To: script
Top

Posted by KL   (5 posts)  Bio
Date Reply #3 on Mon 15 Mar 2004 08:06 AM (UTC)
Message
Specifically, what I'd like to do is this:

A trigger activates on 'his pierce', sending 'assist' to the mud (output) and turning itself off.

A second trigger reactivates the first on 'is DEAD'

I can't stand autoassist triggers myself, but my wrists have been acting up lately so I'm searching for an interim solution. (The dreaded CTS strikes again)

KL
Top

Posted by KL   (5 posts)  Bio
Date Reply #4 on Mon 15 Mar 2004 09:04 AM (UTC)
Message
*sheepish grin* Ok, I got it to work. Buuuut it's still not as neat and tidy like that other one! (poking fun at ya) Your suggestions did the trick. Now add 'capture to window' and make it so you can tile it one above the other, and I'll send you a cheque ;)

KL
Top

Posted by Nick Gammon   Australia  (23,133 posts)  Bio   Forum Administrator
Date Reply #5 on Mon 15 Mar 2004 07:54 PM (UTC)
Message
Like I said before, "append to notepad" is much the same as "capture to window".

Also, you can do a "recall" from your existing window to strip out things matching a word, in case you forgot to set up the trigger in the first place.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
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.


17,678 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.