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
mo24
Wanderer


Joined: 31 Jan 2006
Posts: 55

PostPosted: Mon Feb 13, 2006 2:16 pm   

Getting room name
 
Hello,

I am looking for a way to store the name of each room I am in, in a variable. There is no special format for room name on my mud, although, the text is colored red. For instance, I type look:

[ 150/150hp 130/130mn 200/200mv > look
A dusty trail (red colored)
You are travelling on a dirt strewn trail.
[Exits: north east south]

I would like, when I enter this room for instance, to:
#var roomname "A dusty trail"

Is there a way I can do this? I think I need to set it in a trigger, which triggers upon detecting the red text in the mud. But I tried putting this as trigger text. It did not work: %ansi(12)(*)

I know that, perhaps I could use the automapper, but I have very bad luck with it. My mud has many different travel schemes, I don't think it would work well. Is there another way? Thank you
Reply with quote
mo24
Wanderer


Joined: 31 Jan 2006
Posts: 55

PostPosted: Mon Feb 13, 2006 2:37 pm   
 
Never mind :) I stumbled across Trigger options... and it lists ANSI trigger. That solves my problem. Thanks
Reply with quote
mo24
Wanderer


Joined: 31 Jan 2006
Posts: 55

PostPosted: Mon Feb 13, 2006 8:12 pm   
 
But i've run into a new issue. I have the above script working fairly well. There are a few problems it runs into, though.

Mainly, issues with prompt. If I spam directions to run across many rooms, often, from the above example, this happens:

[ 150/150hp 130/130mn 200/200mv > A dusty trail

Where the room name overlaps the prompt. My prompt is in white. But 'A dusty trail' is in red.

Now, I can do the same thing, set a trigger for ANSI color of my prompt, and add some trigger text, but the problem I run into is with the 'A dusty trail', the room name.

The only way I can determine if it is indeed the room name after the prompt in the trigger and not just spam, is by checking the color of the text after the '>' at the end of the prompt. Is there any way to do that? What would I use in the #IF for the 'red' color code to check it and compare?
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