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


Joined: 20 Aug 2008
Posts: 2

PostPosted: Wed Aug 20, 2008 12:45 pm   

Getting the room title as a variable after a trigger fires.
 
Okay, so the mud I play, I can make pills that teleport me to the location I was in when I made them.

So I want to make something that keeps track of each pill's ID and where I made it.

I have everything except the room name. I can't reliably get the room name.

The process:
I make the pill, the output from that enables the class that contains the trigger that tries to get the room name by sending look then grabbing the first line that appears. But occasionally other outputs will appear and it'll grab those instead.

Now, the room titles are a different colour than anything else the mud outputs, so is there a way to have it send look, then wait 'til the line with the correct colour outputs and capture that?
Reply with quote
Tech
GURU


Joined: 18 Oct 2000
Posts: 2733
Location: Atlanta, USA

PostPosted: Wed Aug 20, 2008 4:11 pm   
 
Yes there is. When you edit the trigger, go to options and specify that it's an ANSI color trigger. This will zMUD to also match the ansi codes (in this case we're interested in the color ones) for the room.

The easiest way to capture the ansi codes is copy line with the colored room name into the pattern field ANSI trigger, and it will now include the ANSI color codes as well. You can the edit the pattern to suit your needs.
_________________
Asati di tempari!
Reply with quote
Kakeidos
Newbie


Joined: 20 Aug 2008
Posts: 2

PostPosted: Fri Aug 22, 2008 5:47 am   
 
It works perfectly.
Thank you.
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