|
g61828 Beginner
Joined: 21 Nov 2003 Posts: 12 Location: USA
|
Posted: Sat Dec 09, 2006 5:42 pm
Trigger help |
So,
I'm making a trigger to play a sound whenever I receive a tell from anyone. This is so I can turn it no if I'm away from the mud but still online (ie, looking at webpages and whatnot while the mud is running). This is what I have so far (keep in mind that I suck with this type of stuff)
#TR {%1 tells you, '%d'} {#play help.wav}
What I want is basically a class I can activate that will play the help.wav sound file if I receive a tell from anyone, no matter what is said. Can anyone please help me with this?
Thanx
D |
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Sat Dec 09, 2006 6:21 pm |
Your use of the #play command is right, but your use iof wildcards isn't. The trigger you're looking for is probably something like this:
#trig {^%w tells you, '*} {#play help.wav}
Then you just set the class to disabled and disable on startup, and enable it manually (or with an alias using the #T+ and #T- commands) when you want to use it. |
|
|
|
g61828 Beginner
Joined: 21 Nov 2003 Posts: 12 Location: USA
|
Posted: Sat Dec 09, 2006 6:32 pm |
Ok,
Well...I tried your script but it didn't play the help.wav file. So...I thought I would bring in some more info for you.
This is what the mud displays when you are sent a tell;
Deamyn tells you, 'test'
Should I put an ' at the end of the '* for it to work right? If so then should it look like this - #TR {^%w tells you, '*'} {#play help.wav}
Also, was thinking of maybe starting to get into the #Window and #Capture commands. As such, I would love to have a box that would have all the chats, tells, and whatnot so that I can just look at that instead of the main text for that info. Any advice on how to start working with that?
Also, as I haven't visited Zuggsoft for a while, what is you honest opinion on Cmud. I took a look at some of the info and as I use Windows XP was thinking I might go ahead and buy it and whatnot. Just want some more experienced coders opinion as I am going to start getting into mud's more (again) and as such can foresee me using lots of Alias, Triggers, Var's, and whatnot. Again, thanx for the help.
D |
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Sat Dec 09, 2006 8:47 pm |
Add the command "#echo Fired" to the trigger and see if it's firing - it's possible that zMUD can't find the wav file.
I didn't include the closing quote because I thought it was possible for the tell to wrap onto a second line - if that happens, the trigger won't pick up the closing quote. If it won't wrap onto more than one line, then your pattern will work just as well.
Using #window and #capture's pretty simple - #capture windowname sends the line that set off the trigger to the window windowname. You can use #window to create the window, or #capture will create it if one doesn't exist.
And finally, CMUD is most definitely a superior client. I can't use zMUD any more simply because the UI is so ugly and hard to work with compared to CMUD :P It became stable enough to trust quite a few versions ago - I don't think there's a single crash bug that I'm aware of. All that's left are minor UI bugs and some remaining problems with buttons (which Zugg is hoping for fix for release).
CMUD has added a level of complexity, but in doing so it's much more versatile and reliable when doing things with more than one window, for example. Many of the parser kludges and weird syntaxes from zMUD are gone, too - for example, "@varname=value" no longer works. It was never the proper syntax, but it worked in zMUD - now you must use "varname=value". Having a stricter syntax does mean that CMUD can have a compiler though - that means that CMUD scripts will often execute faster without updating any code at all. If you update them as well, people have seen 10x speed improvements (and that's a conservative estimate).
In short, yes, CMUD's worth the price. Personally, I think it's worth more.
EDIT: Oh yes! The new .pkg format means you'll never have that horrendous corruption problem that plagued zMUD, and you don't need to export your scripts to share them around :) |
|
|
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|