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

Gammon Software Solutions 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 make basic triggers/alias's/substitutes

Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?
(New message)
Subject: How to make basic triggers/alias's/substitutes
Name:
Your forum user name.
Register forum user name
Password:
Your forum password.
Forgotten password?
Message:
Message to be posted (in English, please).
Forum codes:
Check this if your message uses 'forum codes' or templates (auto-detected for new posts).
Forum codes Templates

Save this message ...


Subject review (reverse sequence)

Pages: 1 2  

Posted by Shadowfyr   USA  (1,774 posts)  [Biography] bio
Date Sun 05 Aug 2007 03:41 AM (UTC)  quote  ]
Message
Fine by us Nick I wasn't figuring on you doing the more complex one anyway. lol

Now, as to what you said Shaun: "GetInfo can also check to see if all the connection info is set up correctly and change it to 0.0.0.0 if the person tries to connect to whatever we have them set it to." Yes and no. I don't know any way to *prevent* them actually trying to connect, or detect that they did so. OnConnect is only called *if* a connection happens, not if its attempted (or am I wrong there?). OnPluginCommand also only processes what the user types in the command window. Not a problem, except that it can't intercept things like them clicking the "connect" icon, or other such things.

Mind you I forgot about the fact that we do have a dummy setting, which makes it work like a real world (sort of), but not connect to anything. The main issue would probably be stating something like, "NOTE: Once you click OK, this tutorial will restore the Name/IP to 0.0.0.0, since we are only demonstrating how to connect to a mud, but the example mud we are using doesn't really exist. '0.0.0.0' is used to make the client *think* its connected to something and behave like it is. Later in the advanced tutorial the reason for this, and how you can use it yourself, is explained."

Sadly, you have to think about such things, or someone is *bound* to report a non-existent bug. lol

main {
__if (Schrodinger_Cat is Alive or version >= "XP"){
____if version = "Vista" then Performance /= Number_of_Cores;
____call Functional_Code();}
__else
____call Crash_Windows();}
[Go to top] top

Posted by Nick Gammon   Australia  (18,769 posts)  [Biography] bio   Forum Administrator
Date Sat 04 Aug 2007 09:35 PM (UTC)  quote  ]
Message
I've seen interactive demos a few times, and they are good for complex games where you want to show the player some tips about getting started (eg. Age of Mythology springs to mind).


However to keep things simple, I was just planning to make some simple examples (eg. making a connection, making an alias, making a trigger, setting up some macros) with screen dumps, a few arrows, and a few words of explanation.

- Nick Gammon

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

Posted by Shaun Biggs   USA  (644 posts)  [Biography] bio
Date Sat 04 Aug 2007 07:43 PM (UTC)  quote  ]
Message
We can most certainly have a plugin fake an echo. You just have OnPluginSend trap anything that would be sent out to the "mud" and OnPluginCommand trapping nearly everything else. A somewhat creative lua script could parse the input and spit back certain responses based on what's been sent. Doing this for a tutorial would be much easier than faking a whole mud, because the script would just have to look for one specific thing at a time instead of trying to prepare for going out and killing things.

GetInfo can also check to see if all the connection info is set up correctly and change it to 0.0.0.0 if the person tries to connect to whatever we have them set it to. Anything returned from this fake mud will just go through simulated output, like you suggested earlier.

I haven't played around with AutoIt in quite a while, since I gave up on Windows years ago. I'm not sure exactly how robust the scripting is now. There are many ways that this can be done, I just personally prefer to keep the number of executables to a minimum.

It is much easier to fight for one's ideals than to live up to them.
[Go to top] top

Posted by Shadowfyr   USA  (1,774 posts)  [Biography] bio
Date Sat 04 Aug 2007 05:53 PM (UTC)  quote  ]
Message
If I might interject. "Some sort of" extra program is likely necessary anyway. We can't have scripts creating the localhost connection needed to do the echo, and there is no way to trap connection failures, so we can't "fake" it, short of altering the client to recognize a fake name and "act" like its doing something. Sounds like my little echo program or one compiled with Autoit could work. Now... A solution is to make it an activeX Exe, instead of just a stand alone. That way you could simple place code in the plugin/world script that executed something like:

set echo = createobject("tutorial_echo")

Then in the close functions, set that to nothing, to terminate the application (Hmm, I wonder if you need to also have a "close" command to make the application re-reference itself too though..). But point is, there should be ways to get around it. It might almost be easier to build such an echo into the client, which would probably increase its size by less than 5k, while eliminating the need for anything else. I just don't see any practical means for how you do it without an external echo right now, not and be able to have them "set" things like the mud name, port, etc., if you included that in the tutorial. If you simply skipped that...


main {
__if (Schrodinger_Cat is Alive or version >= "XP"){
____if version = "Vista" then Performance /= Number_of_Cores;
____call Functional_Code();}
__else
____call Crash_Windows();}
[Go to top] top

Posted by Shaun Biggs   USA  (644 posts)  [Biography] bio
Date Sat 04 Aug 2007 11:34 AM (UTC)  quote  ]
Message
Adding another program, whether it's 50kb, 500kb, or 5mb... It's still adding another program, and will just start up a whole slew of questions like "But how do I install the tutorial?" It might be mind-numbingly easy, but some people won't notice what's right in front of their faces... like the people on a mush/mud who ask "how do I do foo" and the overwhelming response is "type help foo"

Having a world named tutorial that comes with MUSHclient would be a simple solution. Not the only solution, of course, and probably not even the best one, but it's going to be the easiest to start with. Especially since I'm willing to bet that at least 80% of everyone who has installed MUSHclient did not read the readme file before using the program, even though there is a prompt to see if you want to at the end of a successful install. Keeping this simple to start will probably help everyone out more in the long run.

If I remember correctly, AutoIt is a free software scripting program anyway, so if you do want to make a tutorial through that, it shouldn't be terribly hard for people to update it. No issues with proprietary libraries or anything like that.

It is much easier to fight for one's ideals than to live up to them.
[Go to top] top

Posted by Onoitsu2   USA  (246 posts)  [Biography] bio
Date Sat 04 Aug 2007 11:16 AM (UTC)  quote  ]

Amended on Sat 04 Aug 2007 11:18 AM (UTC) by Onoitsu2

Message
Ok for one, learn what you are talking about, a person does NOT need to have AutoIt installed to use a program created by it. So you might want to get that notion out of your heads, and the size of the program needing to be included would only be about 200k or so ... so that is not too terribly bad for something that can be TOTALLY interactive. My little telnet echo thing is 203Kb and that is only due to extra crap from the standard libraries, and that can be scaled down by including only what I use. As well as MAXIMUM UPX compression can decrease it by about a dozen Kb's.

And as for feedback and response time, I am up there, just ask the users of my plugins on Aardwolf ... I constantly ask if anything has gone wrong, and correct anything that has, not that that happens often.

I was just saying that I could create the program that does this, someone else would be responsible for the actual content.

Laterzzz,
Onoitsu2
[Go to top] top

Posted by Shaun Biggs   USA  (644 posts)  [Biography] bio
Date Sat 04 Aug 2007 08:03 AM (UTC)  quote  ]
Message
I'd have to agree with Shadowfyr here. Installing a whole new program to do the same thing that can already be done through a plugin seems to be a bit of overkill. Granted, a tutorial plugin may need a bit of creative scripting, but I think it's easily possible. Not to mention the fact that anything wrong with the plugin can be fixed by the MUSHclient community, whereas anything wrong with a third party program would have to rely on response from the developer. And let's face it, it's rare to find someone that can consistently match Nick for feedback and bug fix response time.

It is much easier to fight for one's ideals than to live up to them.
[Go to top] top

Posted by Shadowfyr   USA  (1,774 posts)  [Biography] bio
Date Sat 04 Aug 2007 07:48 AM (UTC)  quote  ]
Message
Only issue I have with something like Autoit, Onoitsu2, is that you would have to have them install it too, and it takes up more space. My little echo program is only like 24KB. Autoit is 7MB (well 9MB in true space taken up under NTFS). I think a world file, with plugin, plus the echo program, would probably be no more than 200KB, if even that. Probably not any where close to 7MB, and even if it got over 1MB, most of that would be *in* the plugin, as tutorial scripts and functions. How big it might get all depends on how complex the tutorial was.

Its certainly an interesting solution, but it takes up way more space than strictly necessary, without really gaining anything.

main {
__if (Schrodinger_Cat is Alive or version >= "XP"){
____if version = "Vista" then Performance /= Number_of_Cores;
____call Functional_Code();}
__else
____call Crash_Windows();}
[Go to top] top

Posted by Shaun Biggs   USA  (644 posts)  [Biography] bio
Date Sat 04 Aug 2007 06:57 AM (UTC)  quote  ]
Message
Hrm... should have put "that's life" into Babelfish. Google is a great search engine, but it's a horrible language site.

And as for having a tutorial world file... Might be nice to have a zip of a world and the plugin tutorial so that people can load that up. They would load up the world, which loads the tutorial plugin in order to deal with the i/o of the examples.

It is much easier to fight for one's ideals than to live up to them.
[Go to top] top

Posted by Onoitsu2   USA  (246 posts)  [Biography] bio
Date Sat 04 Aug 2007 06:54 AM (UTC)  quote  ]

Amended on Sat 04 Aug 2007 06:55 AM (UTC) by Onoitsu2

Message
I have created a loop-back server program using Autoit, because I wanted an easier way to test my triggers than entering them into the Test trigger, and remembering to set colors and things, and certain backslashes in places. I can connect to myself, and from that can use the coloring syntax used on Aardwolf the @X/@x format, and just type things into the input area. Did this mostly for color matching triggers, or ones that match only a certain part of the line, get the color, and if it is correct, do something.

I MIGHT be able to make a tutorial version, that allows many forms of input, AND can do all the things that you wanted. I would not be the one writing the tutorial, but if someone could tackle the layout, and presentation portion of it, I would be VERY willing to create such a thing so that it can be used interactively, without the need for ANY plugins, or any connection bypasses. Just run, and open a new world and have it connect to localhost on whatever port you set in the server program.

Let me know who will be working on this pet project, or if this idea tickled anyone's fancy for an aesthetically pleasing tutorial method.

Laterzzz,
Onoitsu2
[Go to top] top

Posted by Shadowfyr   USA  (1,774 posts)  [Biography] bio
Date Sat 04 Aug 2007 06:39 AM (UTC)  quote  ]
Message
To David - Tried to run a google on it, google wasn't smart enough to show me the right version. lol

As for using a plugin.. Wasn't thinking of a plugin, but a world file, so that the settings can be saved, without interfering with something the user may want to use for other worlds. A plugin, is more problematic, since unless you have it unload itself somehow and revert all the changes made during the tutorial before hand... And some of those settings may "not" be possible to reset via script. Then again, that could be solved by having the plugin/tutorial world create a *new* world, so the original isn't overwritten. Some things like that need to be considered.

Fun thing is, since you mentioned plugins, part of the tutorial could even include "how to make a plugin".

Now, one option for getting them to load it is, don't. Have mushclient look to see if its running a clean install (or no worlds are set to autoload), then have a default world be generated, which includes the plugin. First thing the plugin does is ask, "Do you want to run the tutorial?". If you say no, then instructions could be given for how to load it later, the world gets unloaded and you start from scratch. If yes, then it starts running it.

This of course would require such a tutorial to be supplied with Mushclient and some code changes made to make a world with the plugin start up when first installed.

main {
__if (Schrodinger_Cat is Alive or version >= "XP"){
____if version = "Vista" then Performance /= Number_of_Cores;
____call Functional_Code();}
__else
____call Crash_Windows();}
[Go to top] top

Posted by Shaun Biggs   USA  (644 posts)  [Biography] bio
Date Sat 04 Aug 2007 04:02 AM (UTC)  quote  ]
Message
A tutorial like that wouldn't be hard to do through a plugin. The issue would be getting a new user to load the plugin in the first place.

Any of the faked input/output can be easily done through various callback functions. Describing some of the steps involved might be difficult to describe without graphical representation though.

It is much easier to fight for one's ideals than to live up to them.
[Go to top] top

Posted by David Haley   USA  (3,881 posts)  [Biography] bio   Moderator
Date Sat 04 Aug 2007 03:37 AM (UTC)  quote  ]
Message
Sorry, you just triggered the Frenchman in me; that would be "c'est la vie", not "se'la'vie". :-) (Sorry, just couldn't resist.)

David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone

http://david.the-haleys.org
[Go to top] top

Posted by Shadowfyr   USA  (1,774 posts)  [Biography] bio
Date Sat 04 Aug 2007 01:08 AM (UTC)  quote  ]
Message
If someone really wanted to be ambitious, one could code a loop-back tutorial system... Hmm, OK, actually I can see one issue with that, there is not way that I know of letting the client "connect" to itself, as though it was connecting to a server. Though, maybe if you trapped the error from a failed connection, so you could set some arbitrary local address and port, which you know won't connect, detect the failure in a plugin, then proceed as though it "did" connect..

Do we have some way to turn off Mushclient's normal connection fail dialogs and detect if it fails when it tries one?

Anyway. Point is, you set up a tutorial, which feeds notes to the display, and uses "simulate" to make it look like you are connected to a mud. Then you step them through the process, like:

"Ok, lets start with getting you on a MUD. We are going to connect you to arbitrarymud.com, which doesn't really exist, but which will allow me to teach you the basics. First, go to ..."

This is where inline pictures would have been nice BTW, since you could add, "go to this menu item, or look for the [] symbol on the icon bar and click there.", se'la'vie...

But, basically, walk them through setting up their connection, logging in, making simple triggers for the text that arrives from the the fake mud, etc. Other than making it look like the connection is working, when its faked, this wouldn't be all that impossible to do with this client. And for that matter, Nick could even add some code to cause the client to "treat" the connection as though it did happen, when some predetermined, and unlikely "name" is in the field, like 'testmud.test', assuming there isn't a way already. I don't see one. Mind you, something like the loop-back proxy I made would work too, if included as part of the "tutorial" world file. That might even be easier, except that some people would be confused by using 127.0.0.1, instead of a name. Does "localhost" work the same by default, or do you have to make a program aware of what it means?

This would be imho, quite doable I think.

main {
__if (Schrodinger_Cat is Alive or version >= "XP"){
____if version = "Vista" then Performance /= Number_of_Cores;
____call Functional_Code();}
__else
____call Crash_Windows();}
[Go to top] top

Posted by Nick Gammon   Australia  (18,769 posts)  [Biography] bio   Forum Administrator
Date Fri 03 Aug 2007 11:48 AM (UTC)  quote  ]
Message
Go ahead.

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


12,682 views.

This is page 1, subject is 2 pages long: 1 2  [Next page]

[Reply to this subject]  Reply to this subject   [New subject]  Start a new subject   [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

[Home]

Written by Nick Gammon - 5K

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

[Best viewed with any browser - 2K]    [Internet Contents Rating Association (ICRA) - 2K]    [Web site powered by FutureQuest.Net]