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
Stephenos
Beginner


Joined: 06 Jul 2007
Posts: 27

PostPosted: Mon Jul 16, 2007 8:12 am   

How to update current room exits programmatically?
 
I submitted a problem, "Down Exit added to every room", a little over a week ago and am still getting the problem. Rooms are showing a 'down' exit when there is no real exit down.

It's not every room that Automapping creates, but maybe 50% of the rooms created while automapping. This problem started when I changed the Aetolia CONFIG WRAPWIDTH to 0 to shut off the CRLF's that were being added at or around 80 characters. I did not change the CMUD word wrapping options.

Where I used to see a single, very long, line from the MUD displayed as
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

I now see the same line (using CMUD word wrapping) displayed as
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXX

Sometimes the Aetolia MUD sends the exits on its own line, other times it may be tagged onto the end of the (last )description line.

I am not using the #tag functionality. It appears to be a bug in the Automapper.
----------------------------------------------------------------------------------------------
Since I still have the problem with the random down exits, I've tried to create an alias to remove the down exit from the current room as follows (pseudocode):

exit list = %roomexit [ initially l|n|k|d ]
generate new exit list with '|d' removed [ now l|n|k ]

I've tried to set the new exits using

#call %roomexit(room number,new exit list)
OR
#call %roomexit(,new exit list)

but nothing happened. The documentation says you can set or get the room exits - there was no example given for setting using %roomexit but I saw other functions that used the #call command to set a value.

I was using local variables to hold the roomnum and roomexit arguments.

What am I doing wrong?
Reply with quote
Stephenos
Beginner


Joined: 06 Jul 2007
Posts: 27

PostPosted: Mon Jul 16, 2007 10:37 am   
 
I discovered a pattern on the stray down exits (XXX = Description; yyy = Exit sentence)

If the MUD sends back the Exit sentence as a separate line, then the phantom down exit doesn't seem to happen:
XXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXX
yyyyyyyyyyyyyyyyyyyyyyyy

If the MUD attaches the Exit sentence to the last description line, the phantom down exit seems to occur:
XXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXX. yyyyyyyyyyy
yyyyyyyyyyyyy

Thanks
Reply with quote
Arminas
Wizard


Joined: 11 Jul 2002
Posts: 1265
Location: USA

PostPosted: Mon Jul 16, 2007 12:52 pm   
 
Here is something I have found can help in this case. As with everything it may need tweeking in your mud.

If the description and the exit line have two distinct colors make an ansi trigger for a line that has both colors in it.

^(%e[colorcode1*)(%e[colorcode2*)$

#nomap
#gag
#say %1
#sayp %2" "
_________________
Arminas, The Invisible horseman
Windows 7 Pro 32 bit
AMD 64 X2 2.51 Dual Core, 2 GB of Ram
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