Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
zortec
Newbie


Joined: 28 Oct 2009
Posts: 7

PostPosted: Wed Oct 28, 2009 4:01 pm   

New to CMUD
 
Hello,

I just switched from ZMUD to CMUD since it will be available for Windows 7. Though in doing so, I have a couple questions that I hope someone can answer.

1) When using ALT-TAB to switch between windows, I notice that sometimes the focus will go to the CMUD Documentation that I have open and not to the other mud window. Is there any way to change this behavior?

2) How do you delete a trigger from the command line? I could not find a way to delete the following trigger without going into the trigger settings. From there, I had to right click the trigger and go to "Delete Setting" in order to create the same trigger again. What is the steps I would take to create a trigger that matches the pattern "dies in fits of twitching agony" and then would have the script text "bury corpse good" and "get all", as I was not able to find an example with multiple commands in a trigger. Also, since we are on the topic of triggers, why is it that the output below is different from what I see in the settings window?

Triggers:
\b(((https?|ftp|telnet)://[\w\d:#@%/;$()~_?\+\-=&]+|www|ftp)(\.[\w\d:#@%/;$()~_?\+\-=&]+)+)\b -> #SUB {<A '%1'>%1</A>}
\b([\w\d._%+\-]+@[\w\d.\-]+\.[\w]{2,4})\b -> #SUB {<A 'mailto:%1'>%1</A>}
dies in fits of twitching agony -> bury corpse good

3) Can you prevent a mud window having focus when there is activity? I would prefer if my attention was not taken off the current mud window until I switch to that window.

4) Is it possible to have a path with cardinal directions such as NW, NE, SW, and SE?

Please let me know if anything is not clear.

Thanks for a great product.
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Wed Oct 28, 2009 5:46 pm   
 
1) The ALT-TAB and CTRL-TAB are Windows functions that cycle between open windows. The ALT-TAB cycles between different applications. In CMUD (and also in zMUD), the CTRL-N key has always been used to cycle to a different MUD window without going to the other windows, such as the Help. Give that a try.

2) Look at the #UNTRIGGER command. Specify the pattern or ID name of the trigger to delete.

2a) for multiple commands, put a ; between them (same as zMUD), or place the commands on different lines in the settings editor. On the command line, you would do this:

#TRIGGER {dies in fits of twitching agony} {bury corpse good;get all}

3) Click on the window that you don't want to get the focus, then click the Prefs button in the toolbar. Make sure the title of the Prefs window says "Preferences for WindowName" where "WindowName" is the name of the window you want to change (each window has it's own preferences). Now click on the "Window options" tab and uncheck the "Automatically bring to front window with activity". That will prevent the window from coming to the front when it gets activity.

4) Yes. Select View/Directions from the main menu and then select the "English Directions" package from the drop-down at the top-left part of the dialog. It will show the directions defined by the English Directions package, which includes single characters assigned to the diagonals. For example, "h" is assigned to "nw", etc.
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Wed Oct 28, 2009 5:49 pm   
 
1)I believe this might require a tweak from Zugg, which could very well be something he doesn't want to do or which he literally can't do. Best bet is to either live with it or close the help window.

2)the command is #UNTRIGGER, but I'm not sure if this is only for named triggers or if it also works on patterns. At any rate, it's much easier to type "Name of Trigger" than writing out some long and obnoxious trigger pattern.

3)Yes. Go into Window Preferences and make sure the option Bring Window with Activity to front (or something along those lines) is unchecked. I don't recall if this is a global preference or one specific to individual windows (the Preference dialog will show the name of the window in the title bar if it is specific to that window), so if it ends up being global and you want other windows to have this option then you probably need to live with this happening in the window you don't want it happening in.

4)yes. Paths and speedwalking use single-letter designations for directions you want to travel. For the secondary cardinal directions, the letters are H (nw), J (ne), K (sw), and L (se). So a path of .4h would go nw 4 times.
_________________
EDIT: I didn't like my old signature
Reply with quote
Rahab
Wizard


Joined: 22 Mar 2007
Posts: 2320

PostPosted: Wed Oct 28, 2009 5:58 pm   
 
1) I believe the answer is no, this is controlled by Windows.

2) The command #untrigger will delete a trigger. There are similar commands #unvariable, #unalias, #unevent, etc. The #untrigger command can use either the name or the ID of the trigger to identify it. The name of a trigger is it's complete trrigger pattern, which in this case appears to be a complex regex? To make it easier to name triggers with complex patterns, and to distinguish between different triggers with identical patterns, you can specify an ID for the trigger, which can be any name you want.

4) This is handled similarly to the way it is in zmud. Paths use a single letter for each direction, and new directions can be created and customized. By default, every session includes a package called English Directions, which defines the directions used in paths. In this package, the letters h,j,k, and l are defined as the single-letter abbreviations for the diagonal directions.
Reply with quote
zortec
Newbie


Joined: 28 Oct 2009
Posts: 7

PostPosted: Wed Oct 28, 2009 7:33 pm   
 
Quote:
1) The ALT-TAB and CTRL-TAB are Windows functions that cycle between open windows. The ALT-TAB cycles between different applications. In CMUD (and also in zMUD), the CTRL-N key has always been used to cycle to a different MUD window without going to the other windows, such as the Help. Give that a try.


I do think that Ctrl-N is an unusual function from CTRL-TAB to reach from the keyboard which is what I previously used in ZMUD. This is a long shot, but is there a way to change the function?

Quote:
2) Look at the #UNTRIGGER command. Specify the pattern or ID name of the trigger to delete.

2a) for multiple commands, put a ; between them (same as zMUD), or place the commands on different lines in the settings editor. On the command line, you would do this:

#TRIGGER {dies in fits of twitching agony} {bury corpse good;get all}


I am not sure how I missed that one. How do you name a trigger or give it an ID? I did try to delete my current trigger with #untrigger {pattern} but I get an error parsing the command: illegal token

#untrigger \b(((https?|ftp|telnet)://[\w\d:#@%/;$()~_?\+\-=&]+|www|ftp)(\.[\w\d:#@%/;$()~_?\+\-=&]+)+)\b -> #SUB {<A '%1'>%1</A>}
\b([\w\d._%+\-]+@[\w\d.\-]+\.[\w]{2,4})\b -> #SUB {<A 'mailto:%1'>%1</A>}
dies in fits of twitching agony -> bury corpse good

Are there default triggers in every session? When I type in #trigger, this is what I get:
\b(((https?|ftp|telnet)://[\w\d:#@%/;$()~_?\+\-=&]+|www|ftp)(\.[\w\d:#@%/;$()~_?\+\-=&]+)+)\b -> #SUB {<A '%1'>%1</A>}
\b([\w\d._%+\-]+@[\w\d.\-]+\.[\w]{2,4})\b -> #SUB {<A 'mailto:%1'>%1</A>}

Do I need to leave them or can they be removed?

I used ; for command stacking in ZMUD and CMUD, great to know that it can be used in triggers.

Quote:
3) Click on the window that you don't want to get the focus, then click the Prefs button in the toolbar. Make sure the title of the Prefs window says "Preferences for WindowName" where "WindowName" is the name of the window you want to change (each window has it's own preferences). Now click on the "Window options" tab and uncheck the "Automatically bring to front window with activity". That will prevent the window from coming to the front when it gets activity.


I forgot to click on the window that I did not want to have focus.

Quote:
4) Yes. Select View/Directions from the main menu and then select the "English Directions" package from the drop-down at the top-left part of the dialog. It will show the directions defined by the English Directions package, which includes single characters assigned to the diagonals. For example, "h" is assigned to "nw", etc.


There was a way in ZMUD to reverse the path using the #reverse command. Is this still possible?

I will have to give this a try. Thanks Zugg

In general, would it be faster to use the command line instead of the settings editors for aliases, triggers, paths, and other features?

Matt and Rahab, thanks for the help on paths and speedwalking. The MUDs I play on use all cardinal directions including up and down and I will have to check out that package.
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Wed Oct 28, 2009 9:04 pm   
 
Quote:

Are there default triggers in every session? When I type in #trigger, this is what I get:


Yep, Zugg has kindly provided us with a Clickable URLs package that ships with CMud by default. With default packages, I'd avoid doing any deletion because when you upgrade these default packages get overwritten. If you don't want clickable URLs in your session, just remove the package.

1)Open CMud
2)select your session (do not connect or go into offline mode)
3)click the Edit Session link
4)click on the Package Files tab
5)select the Clickable URLs from the list
6)click the red minus sign to remove
7)save
_________________
EDIT: I didn't like my old signature
Reply with quote
zortec
Newbie


Joined: 28 Oct 2009
Posts: 7

PostPosted: Wed Oct 28, 2009 10:01 pm   
 
Quote:
Posted: Wed Oct 28, 2009 9:04 pm Post subject:
Quote:

Are there default triggers in every session? When I type in #trigger, this is what I get:


Yep, Zugg has kindly provided us with a Clickable URLs package that ships with CMud by default. With default packages, I'd avoid doing any deletion because when you upgrade these default packages get overwritten. If you don't want clickable URLs in your session, just remove the package.

1)Open CMud
2)select your session (do not connect or go into offline mode)
3)click the Edit Session link
4)click on the Package Files tab
5)select the Clickable URLs from the list
6)click the red minus sign to remove
7)save


I will keep clickable URLs as that can be useful when players are posting links in the main window. Thanks for the suggestion on how to remove the package.
Reply with quote
Rahab
Wizard


Joined: 22 Mar 2007
Posts: 2320

PostPosted: Thu Oct 29, 2009 5:03 pm   
 
I think you are misunderstanding what the pattern is. The pattern is the part of the trigger that determines what it will match. The value of a trigger is the list of commands that will execute when the trigger matches. When you list triggers with #trigger, the pattern is the part before "->", and the value is the part after. Each trigger is listed on a line of it's own, so you have three triggers listed. Two of those are from the Clickable URLs package, and you've said you don't want to remove that. The third trigger is your own; the pattern is "dies in fits of twitching agony", and the value is "bury corpse good". You could delete this with the command:
Code:
#untrigger {dies in fits of twitching agony}


You can give a trigger an ID two ways. If you create the trigger on the command line, you can include it in the definition of the trigger:
Code:
#TRIGGER id {pattern} {commands} classname options

Or you can click Settings to open the Package Editor. In the Package Editor, find your trigger and highlight it. The definition of the trigger will appear in the right side of the Editor window. Near the bottom is a field, default blank, labeled ID. Simply enter your chosen ID into that box.
Reply with quote
zortec
Newbie


Joined: 28 Oct 2009
Posts: 7

PostPosted: Thu Oct 29, 2009 5:57 pm   
 
Quote:
I think you are misunderstanding what the pattern is. The pattern is the part of the trigger that determines what it will match. The value of a trigger is the list of commands that will execute when the trigger matches.


Thanks. I was mixed up on the pattern and value. Triggers are not a feature that I use much.

Do you think it is generally faster to use the editor or the command line?

I appreciate the help from everyone.
Reply with quote
Rahab
Wizard


Joined: 22 Mar 2007
Posts: 2320

PostPosted: Thu Oct 29, 2009 6:01 pm   
 
It's not really a matter of speed. It's a matter of your preferences, and whether the trigger already exists. The trigger editor has the feature that you can format the script to look nice and increase readability. It is hard to write a long trigger on the command line. But a short trigger like yours can be done on the command line quite easily.
Reply with quote
zortec
Newbie


Joined: 28 Oct 2009
Posts: 7

PostPosted: Thu Oct 29, 2009 6:48 pm   
 
I'm sorry about the double post. Can you please delete post #151506?

Thanks Rahab

I also was wondering if it was normal for both sessions to close when you "quit" from one session. It was really odd that it did not leave the other session open and I was put back at the "Sessions" window. Any idea why this might happen?
Reply with quote
Rahab
Wizard


Joined: 22 Mar 2007
Posts: 2320

PostPosted: Thu Oct 29, 2009 8:27 pm   
 
It depends on how you "quit" the session. There are numerous ways to do it, and some will close just the one window, and others will close the entire "session" which includes all session windows, and put you back at the Sessions window. If you just want to close a single window, click on the window (to be sure it becomes the active window), then click File|Close Window.
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
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

© 2009 Zugg Software. Hosted by Wolfpaw.net