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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
Selsaral
Beginner


Joined: 21 Oct 2000
Posts: 19
Location: USA

PostPosted: Sat Jul 12, 2003 9:55 pm   

an alias that creates a trigger
 
Sorry if this has been asked before...I did a quick search here and didn't find anything that helped me.

So I am trying to make an alias that builds a trigger. Seemed like it should be easy but i am having all sorts of trouble. I am doing all sorts of variations on this:

#alias mdt {#trig %1 {#var door3 %2;#var doo4 %3;#var door5 %4;#echo door3 set to @door3, Door 4 set to @door4, Door5 set to @door5} door line=2};#echo Trigger Built for Room: %1 and doors: %2, %3, %4

MDT = make door trigger. I can either type room name in, or cut and paste it in when I run the alias. I want it to make a trigger that creates door alias' when I enter a room. (example: 'mdt {A Large Grassy Field} secretdoor trapdoor irondoor'). I have two echos also. I want the trigger that it builds to report to me when it correctly sets the door variables when I enter a room (often it echos when I run MDT, rather than in the trigger itself), and I want the mdt alias to report that it succesfully built the trigger.[B)] I want it to build the triggers in the class 'door', and I want it to be looking for green text (the roomnames of the mud are output in green). I get all sorts of variations on this thing partially working, but I've never had the whole thing work correctly.

I also have a related question. Even when I build the trigger manually to make sure it works correctly, I still have a problem. Occasionally, the mud will put the room name on the prompt, and occasionally it puts the roomname on the blank line below the prompt. The trigger fires fine when it isn't on the prompt, but never works when it is. I've tried the 'newline' and 'prompt' options in the trigger dialogue, and they don't help.

Does someone have some advice on how I could make this work? Thanks!
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Sun Jul 13, 2003 1:02 am   
 
Braces are your friends.

#alias mdt {#trig {%1$} {#var door3 %2;#var door4 %3;#var door5 %4;#echo door3 set to @door3, Door 4 set to @door4, Door5 set to @door5} "door" {line=2};#echo Trigger Built for Room: %1 and doors: %2, %3, %4}

Added in red braces around pattern, end of line pattern wildcard, quotes around class name parameter, braces around trigger options parameter, and closing brace for alias.

The help file is extremely detailed when it comes to making triggers by way of the #TRIGGER command.
Reply with quote
Selsaral
Beginner


Joined: 21 Oct 2000
Posts: 19
Location: USA

PostPosted: Sun Jul 13, 2003 1:21 am   
 
Thanks, you solved it for me. Smile
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD 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