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
Kainen
Newbie


Joined: 25 Jun 2007
Posts: 6
Location: Michigan

PostPosted: Mon Jun 25, 2007 4:01 am   

Trigger and Alias Question
 
There are two sorts of alias' I have been trying to get to work in CMUD that are just NOT cooperating. I no longer have the ZMUD files to import sadly.

#1 (Setting a new window to capture tells and other chats)
Pattern: tells you

Value: #cap tell; #gag

Problem: It creates a second command line, which also shows what I type in the first one, and creates a ever-repeating trigger.

#2
Name: csear

Value: clan {w<Se{Dar{wed {Yb{Wy {wt{Wh{we {YL{Wi{Yg{Wh{Yt> %-0

Problem: The variable does not function. In ZMUD, this (or one just like it without the -) would copy anything I typed in it's place such as...

csear Hey guys (----> Would appear as <Seared by the Light> Hey guys)

How do you get an adaptable variable setting like this to work?

Sorry, I'm a complete novice at this.
Reply with quote
Thinjon100
Apprentice


Joined: 12 Jul 2004
Posts: 190
Location: Canada

PostPosted: Mon Jun 25, 2007 4:34 am   
 
I'm not sure what's going on on #1... would likely need more details, but I can help with #2... if I recall correctly %-0 is no longer supported... try %-1... which should have the same desired effect. Also, make sure you're escaping all the {'s... so ~{ in most cases.
_________________
If you're ever around Aardwolf, I'm that invisible guy you can never see. Wizi ftw! :)
Reply with quote
Kainen
Newbie


Joined: 25 Jun 2007
Posts: 6
Location: Michigan

PostPosted: Mon Jun 25, 2007 4:36 am   
 
Escaping the {'s? That I'm not familiar with.

And with number one, if you can just tell me how to make a capture and gag trigger, I'd appreciate it.
Reply with quote
Kainen
Newbie


Joined: 25 Jun 2007
Posts: 6
Location: Michigan

PostPosted: Mon Jun 25, 2007 4:41 am   
 
Oh, and I tried adding the tildale's to "escape" the { and I changed the variable to %-1 and it still doesn't work...
Reply with quote
makena
Apprentice


Joined: 11 Aug 2006
Posts: 100

PostPosted: Mon Jun 25, 2007 6:54 am   
 
I got this to work with an oninput trigger.

Create a new trigger...
Type:Command Input
Pattern:^csear (*)$
Script:clan ~{w~<Se~{Dar~{wed ~{Yb~{Wy ~{wt~{Wh~{we ~{YL~{Wi~{Yg~{Wh~{Yt~> %-1

Thank Dharkael not me, he helped me with a script like this.
Reply with quote
Kainen
Newbie


Joined: 25 Jun 2007
Posts: 6
Location: Michigan

PostPosted: Mon Jun 25, 2007 6:56 am   
 
Sorry to be an idiot, what's the underlined asterisk part?

Also, is there any way to explain what parts of this work? So that I can actually learn and have to ask less questions? *grin*
Reply with quote
makena
Apprentice


Joined: 11 Aug 2006
Posts: 100

PostPosted: Mon Jun 25, 2007 7:06 am   
 
For #1, I created started with a blank session, created a trigger with
pattern:tells you
script:
Code:
#cap tells
#gag

this created the window correctly, no command line, no dup commands
but the trigger did not send the line to the tells window
but if you change the script to:
Code:
#cap 1 tells
#gag

This works flawlessly.
I believe that you need the trigger within the window that will be firing it (versus another module/package?)
Reply with quote
makena
Apprentice


Joined: 11 Aug 2006
Posts: 100

PostPosted: Mon Jun 25, 2007 7:13 am   
 
The colors/underlines are just how CMUD will color the script/pattern when you actually enter it.

What part did you need explained?

A command input trigger, is a trigger that fires only on input from YOU, not the mud.
the ^ makes sure you're beginning the input with csear
the () catpures the arguments you are passing (necessary to use %1 or %-1 or %params later)
the * is to match any number (even none) of characters or white space
the ~ is used to temporarily escape CMUD special characters, because you want to send these to the MUD, not to CMUD (in this case)
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