|
Lette Newbie
Joined: 31 Jul 2007 Posts: 2 Location: Greenville, SC, USA
|
Posted: Tue Jul 31, 2007 5:31 pm
Brand new to zMud; No idea how to do anything. |
I'm not an extremely experienced mudder, and I have never used scripts before at all. I've used simpleMU before and would like to know how to use something similar to the timers used in it.
For example, if I wanted to send in the 'track' command every two seconds.
I'm sure it's a simple question to all of you, but I'm a bit dense with this sort of thing. Any help would be very appreciated. |
|
|
|
Zugg MASTER
Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Tue Jul 31, 2007 5:45 pm |
Start by reading the topics in the Getting Started/Scripting section of the help file (or the online help system ). It will tell you about aliases, triggers, and other scripting stuff. There are also some older articles (but still applicable) in the Support/zMUD Support menu at the top of this web site.
Timers in zMUD are called "Alarms". To send the track command every two seconds, you would enter this on the command line:
#ALARM 2 {track} |
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Tue Jul 31, 2007 5:53 pm |
Here's an excerpt from a tutorial I'm writing for CMUD, but much of what it says applies to zMUD too. Some of the interface will be different (zMUD doesn't use the package editor) but all the setting types are the same. Just remember to look things up in the zMUD manual rather than the CMUD one I link to. Hope this helps some.
Tutorial wrote: |
This stuff's actually pretty simple and you should get it quite easily once you've used it a few times. If you're still having trouble, try looking up the different kinds of setting in the CMUD manual here.
Scripts in CMUD need to be associated with some kind of setting. You can't just have script floating around in the ether, not attached to anything, because CMUD won't know when or how to run your commands. You could say that the setting contains the script code.
There are different kinds of settings that each have different rules about when they run the commands that they contain. You can check out any of these by running CMUD and closing the sessions dialog (this process is also called opening the untitled session - see how it says "untitled" at the top?). Feel free to do anything you like in the untitled session because when you close it, all the changes are lost. Make as many experimental settings as you like! Anyway - click on the Settings button on the toolbar at the top to open the Package Editor. The Package Editor is where the action in CMUD takes place.
NB: To open the untitled session in zMUD press Esc on the Character Select dialog - don't just close it.
If you click the arrow next to the New button in the Package Editor, a drop-down menu appears letting you create new settings. Here's a quick rundown of the different kinds:
- Aliases are like short-cut words. They have a name and a script - when you type the name on the command line and press enter, the alias' script is run. For example, if I have an alias named CheeseIt with a script run for the hills, whenever I type CheeseIt, run for the hills is sent to the MUD. Alias names should only be one word, but you can use_underscores_in_them if you like. Your aliases should have unique names, too - no copying!
- Macros are just like Aliases but instead of typing a word, you press a key combination. Put your cursor in the key box, press enter and then enter your combination. The script will now run whenever you press that key combination. Not too hard.
- Buttons are a bit more complex. They're like an alias or a macro, but they create an actual button on the screen that you have to push by clicking the mouse. Try it out - give your button a name (doesn't have to be unique this time) and a script. Something simple like mouse - splat mouse. Click "Save Changes" and close the Package Editor and you'll see your new anti-rodent button. Click it a few times. Buttons have all sorts of Options - when you have a button selected, a tab at the bottom of the Package Editor labelled, unsurprisingly, "options" lets you get at them. You can change their colour, size, position and all sorts of other things. You can even give them a picture instead of text if that's your bag.
- Triggers let you react automatically to stuff that the MUD does. Triggers have a pattern and a script. When the MUD sends the text in the pattern box, the trigger matches and the script is run. If you put "You can fish again" in the pattern box and "fish for haddock" in the script box... I'm sure you can figure it out. There are also special characters (or wildcards, just like when you're playing Uno) you can put in the pattern. They do things like matching any word or any number - useful for matching things that change often, like your MUD prompt. When a trigger matches it can also be said to fire or to go off, just like a gun.
- Classes aren't really a setting in and of themselves. In CMUD, class is just another name for folder - you can put settings (including other classes) inside them just like you can with folders inside My Documents. If a class is disabled by something, then all the settings inside it are disabled too. This is useful because classes can have the option to be disabled on startup, among other things.
All settings can also be enabled or disabled. That should explain itself really. |
The Alarms that Zugg mentioned are a type of trigger, but they match time instead of text. |
|
|
|
Lette Newbie
Joined: 31 Jul 2007 Posts: 2 Location: Greenville, SC, USA
|
Posted: Tue Jul 31, 2007 7:16 pm |
Thanks!
|
|
|
|
charneus Wizard
Joined: 19 Jun 2005 Posts: 1876 Location: California
|
Posted: Tue Jul 31, 2007 7:36 pm |
If you don't want to use the #ALARM command (which is probably your best bet) you can set up a timer through the Actions menu (I think that's what it is). Either way, you can set the timer for two seconds, and you can do a timeout session for it, too. Just some further info. :)
Charneus |
|
|
|
|
|
|
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
|
|