So I thought I'd open up a thread for MUSHclient help, since everyone else has one and us minorities need some love too. If you have a question specific to MUSHclient, feel free to ask it here and I'll check through and answer what I can.
Your questions can be as pathetically simple or stupidly complex as you'd like, I'll try my best to answer in a fashion that helps you out!
2
Comments
Equal Opporunity is dead. Down with MUSH. (no, seriously, if you support it more people might actually use it. Stupid pain in the butt client.)
Edit: MUSHclient, to me, is easier to use than Mudlet but harder than cMUD. I started with MUSH about 14 years ago so maybe it's come a long way.
Message #17059 Sent By: Oleis Received On: 1/03/2014/17:24
"If it makes you feel better, just checking your artifact list threatens to crash my mudlet."
Both are powerful and effective but for this foe, it's more a matter of the style in which you want to take the zombie down.
In any case, I'll offer my services in answering questions for the client too.
I've extended some help to newbies who preferred Mush. So I'm available too for this kind of stuff if necessary; still have my old stuff to look back at.
Making a simple trigger is easy peasy.
Let's start with a simple idea, like you want to trigger night time to use the racial ability Stalking. First we need our line telling us that night has struck down upon the world.
First thing we want to do is pull up the Triggers menu inside MUSHclient. You can do this two ways, by hitting Shift + Ctrl + 8 or you can click on the Triggers button as shown below.
Inside the new menu, you'll want to click on the Add... button. This is how you begin to start creating a trigger, and your screen should look like below.
So at this point, the rest is very easy. You place the night text (as I showed above) into the Trigger text box, and then you place the command you want to send when this text is matched into the Send text box. In this case you'd write in STALK.
There is a lot of various options you can obviously do from here, I'm not going to list them all because that'd take far too much time. If you want to know any specifics on a certain function, you're more then welcome to ask.
At this point, it's simply a matter of pressing OK, which will load your new trigger and the next time night time falls, it will send the command STALK to the Aetolia world.
That pretty much concludes making the simplest of triggers.
Plugin variables are intentionally cornered off from the main world variables so a plugin author doesn't accidentally overwrite your own variables when he/she shares it with other people.
Having said that though, it doesn't mean it's impossible to pull down variables from a plugin into your world.
First of all inside your plugin, you need to set what you need into MUSHclients own storage for variables using the SetVariable command. Let's say you have a string with very important information you want.
Note that I'll be using Lua in this example, as MUSHclient can support multiple script languages.
When you use SetVariable inside a plugin, this sets it to the plugins own memory space. Only the plugin will be able to find that variable with GetVariable, so what you need to do from inside the main world is use GetPluginVariable.
You will obviously need to replace <Plugin ID> with your own unique Plugin ID string in order for it to work. Now that you have the variable though, you can apply whatever you wish to it.
I'm not really sure what you mean by using variables in a trigger, as it could mean many things, you'll have to elaborate on that.
Auto-say is either switched on by pushing Shift + Ctrl + A or by pressing the button below.
As for how you turned it on mid-comat, I have no idea :P But it's a great way of dumping, say, a code paste to a Web for example if you modify the prefixed command to WT.
Say you're wanting to make an echo to let yourself know when your target has put up a shield tattoo.
It's pretty much as Draiman described, but there's a flag you need to set and few things to take note of as well.
First of you need to change your trigger line to incorporate your MUSHclient variable to the following below. We'll assume you want to use the variable 'target'.
Once you done that, you need to check the flag on the right side of the trigger window called Expand variables.
After that, you simply change the Send to menu to Output and write in what you want.
Now! Things to take note of:
So say I want to set a trigger up for reviving. The revive message that you get when someone tries to revive you has the specific room name in it. Which means that if I setup a normal trigger for it then it'll only work in that exact same room. So, in order for it to work in any room I'd have to change the room name to ..something else. What do you change it to? Do you use a wildcard to do that? I figure somewhere in the making of this trigger it would need to be turned into a regex pattern.
Hopefully that made sense. If not, let me know.
In lua it'd be something like:
^(\w+) is attempting to revive you at (.+).$
You can do what Periluna said and make a partial trigger by simply trimming out what you need.
For example, triggering:
Would work perfectly fine for your requirements. But if you're actually wanting to capture the name, and the location, then yes, you'll need to start using wildcards.
The above is an example using wildcards, which you can then access by using %1, %2, %3, and so on for each wildcard in your trigger. %1 will be the first wildcard and so forth.
There is also %0 if you want the whole line.
What Xavin is describing here is known as regular expression, which you can use to make your triggers match a lot more faster and improve "system speed".
In general, the more specific you are in trying to match something, the faster it will realize it has an imperfect match (this is important, as we get a lot of possible text to match from the server) and move onto the next thing.
MUSHclient really doesn't do this any different from other systems, other then the fact that it'll interpret anything within brackets - e.g, (hi) - as something to copy to it's wildcard clipboard for use with %1, %2, ...%n.
Here's an example for the revive line:
Make sure you have wrapwidth set to 0 inside the game.
I don't get regex. -_-
That means instead of using typical pattern matching you learn probably as your first lesson in any new client, I have to learn string manipulation of the raw data; I need to get rid of the 'Char.Vitals ' from the raw string incoming to let JSON decode it.
And then I have to figure out how to name a table by variable.
I have to... LRNOMG.
So why do people lazy through JSON instead of using JSON? Because we're lazy, using things we already know.
And yeh yeh, I'm lrnin, I'm lrnin.
Less of a request for help and more of a rant. I don't know what people want when they're asking for constructive criticism or 'help me help you'.