Shattered Kingdoms

Where Roleplay and Tactics Collide
VOTE NOW!
It is currently Sun Nov 24, 2024 2:33 am

All times are UTC - 8 hours




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Cmud triggers
PostPosted: Wed Oct 20, 2010 6:34 pm 
Offline
Mortal

Joined: Mon Jun 22, 2009 7:36 am
Posts: 85
Question. I am using Cmud I am looking to have certain text that is sent by the mud such as things like you have been bashed, tripped ect..To be a little more highlighted so I can see when that happens easier. How do you do that. I've been reading Cmud help files but I have issues understanding what the hell it's saying.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Wed Oct 20, 2010 7:42 pm 
Offline
Mortal

Joined: Thu Oct 28, 2004 7:18 pm
Posts: 452
Most things that work in Zmud still do in Cmud, fortunately. If an extra echo is preferable, this works:

#TRIGGER {(*)'s bash slams into (*) and sends * sprawling} {#ECHO %2 is bashed!}

If you'd rather a color change,

#TRIGGER {Someone died near here.} {#CW red}

Cmud help says:
Recognized color names:
black, blue, green, cyan, red, magenta, brown, gray, yellow, white

Triggers to change colors are easily changed with a copy and paste, echo triggers are a bit trickier, but if you'd rather specific examples of anything for either I can provide.

ETA: For a full list of colors Cmud recognizes, along the top under Tools, then Color Picker, Text Color has a drop down list of a bazillion specific color names to suit your particular tastes. Instead of {#CW red} you'd use {#CW LightSeaGreen} or whatever strikes your fancy.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Wed Oct 20, 2010 7:57 pm 
Offline
Mortal

Joined: Fri Apr 17, 2009 9:50 pm
Posts: 5522
Some clients (such as mine) have a class of functions specifically called highlight.

The word "bash," whenever it appears, is colored red on my client. This is much more benign than a trigger and less prone to mess up on you and be ugly.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Thu Oct 21, 2010 6:09 am 
Offline
Gold Donor

Joined: Sat May 24, 2008 11:20 pm
Posts: 2109
Location: Edmonton, Alberta
From a brief google of "cmud triggers" and looking in the list of features for that client, it looks like you have quite a few options. Here is the bit I skimmed about triggers.

Quote:
zScript Trigger Patterns

Trigger TesterzScript provides a simple and easy-to-read syntax for specifying trigger patterns. For example, "a*b" matches any text starting with an "a" and ending with a "b". While CMUD also allows full regular expression syntax, the shorter zScript format is preferred by most people because it is easier to understand. The syntax mirrors the simple wildcard syntax used for filenames in Windows. A full set of additional wildcards are available, making zScript triggers very powerful.

Triggers in CMUD can also contain multiple "states" or steps. For example, you can trigger on certain text received from the MUD, then only run the script if the next line from the MUD contains additional matching text. Multistate triggers allow you to create complex "state machines" in CMUD, resulting in very powerful scripts.
Regular Expression Patterns

CMUD allows you to use full "Perl-Compatible Regular Expressions" (PCRE) for trigger patterns. PCRE is the most advanced regular-expression engine available, and is much more advanced than the basic regular expression support in many MUD clients. The PCRE library is also open-source and has been highly optimized for performance. CMUD uses the latest 7.8 version of the PCRE library, which has many more features than the old 3.4 version used in zMUD. The %subregex function uses the PCRE engine to perform very advanced and fast string substitutions.

CMUD also includes a trigger pattern tester that allows you to test your trigger patterns, convert them to regular expressions, and view the results of matching live text from the MUD. All CMUD triggers are internally converted to PCRE patterns for high performance.


From HERE.

The client I use can use PCRE much like yours. It doesn't take a lot to learn some very basic stuff in PCRE and that might be a good start for you.

Here's a shot from mine with a simple trip trigger highlighted (and some other examples can be seen in the list). Luckily, mine doesn't involve adding scripts to mod colors/backgrounds/flash/bold/etc... and just has check boxes. Could not quickly determine if CMUD is as friendly in that regard.

Hope this helped somewhat.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC - 8 hours


Who is online

Users browsing this forum: No registered users and 19 guests


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

Search for:
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group