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


Joined: 06 Jan 2003
Posts: 18
Location: USA

PostPosted: Fri Jan 17, 2003 3:58 am   

Using #TAG - Take 2 Please Help
 
Ok, here's my attempt at making my situation clearer.

Here's a typical output from my mud (achaea) after moving into a room:

500h, 500m %e[37mex-%e[53mnorth%e[0m
%e[33mSouthern Hall of the Lyceum. %e[0m
%e[1;30mThe long hallways, much in theme with the Lyceum's foyer, are plastered and %e[0m
%e[1;30mdecorated with very subtle frescoes. The mosaic-tiled floor continues its %e[0m
%e[1;30mrepeating sun and moon design. The entire northern wall is formed of hundreds %e[0m
%e[1;30mof clear glass panels offering a lovely view of the works of art, and works in %e[0m
%e[1;30mprogress, which reside in the sculpture garden. You can hear the sound of music%e[0m
%e[1;30min the distance, perhaps a lute accompanied by a soft, feminine voice.%e[0;37m %e[36mA young %e[0m
%e[36mrat cautiously noses about for food here. A baby rat timidly moves in the %e[0m
%e[36mshadows here. %e[1;36mSasah, Novitiate Third is here, sprawled on the floor. He wields %e[0m
%e[1;36ma steel shortsword in his left hand. %e[0m
%e[1;34mYou see exits leading east, south (open door), %e[0m
%e[1;34mand northwest (closed door).%e[0m
500h, 500m %e[37mex-%e[0m

Here's the triggers I set up in an attempt to get automapper to work:

#TRIGGER {^%e[33m(*).} {#VAR RoomName {%concat( %1, ".")};#VAR RoomDesc {};#VAR DescLine {};#VAR ExitLine {};#VAR RoomExit {};#TAG Name {@RoomName}}
#TRIGGER {%e[1;30m(*)%e[} {#VAR DescLine {%1};#VAR RoomDesc {%concat( @RoomDesc, @DescLine, " ")};#TAG desc {@RoomDesc}}
#TRIGGER {%e[1;34m(*)%e[} {#VAR ExitLine {%1};#VAR RoomExit {%concat( @RoomExit, @ExitLine, " ")};#IF %begins( @RoomExit, "You see a single exit leading ") {@RoomExit = %right( @RoomExit, 30)} {};#IF %begins( @RoomExit, "You see exits leading ") {@RoomExit = %right( @RoomExit, 22)} {};#TAG exit {@RoomExit}
#TRIGGER {^(%d)h, (%d)m} {#var hp %1;#var mana %2;#TAG prompt}

Note that in the mud output the text about rats and Sasah, Novitiate Third is transient, not part of the room description, and should be ignored by the mapper. I have made certain that the ansi color codes for room name, description, exit, and prompt are set to unique values (no other tpe of mud output will used these ansi codes).

When I try to reconfigure the automapper, moving into the above room, the automapper appears to not be finding the room name. It is also mixing some of the transient text with the room description. It almost seems like it is completely ignoring my #TAG triggers.

Can someone please explain what I am doing wrong? I've been trying for almost 2 weeks now to get automapper working correctly.
Reply with quote
kdberg
Beginner


Joined: 06 Jan 2003
Posts: 18
Location: USA

PostPosted: Fri Jan 17, 2003 5:19 pm   
 
Anyone?
Reply with quote
Ransom
Newbie


Joined: 17 May 2002
Posts: 8
Location: USA

PostPosted: Fri Jan 17, 2003 5:54 pm   
 
I'v had a real pain trying to use the #TAG command, usualy if posible I capture and #sub the text that calses problems.. not realy help as much as an alternitive..

PS you might try in the trigger's checking the Line Color check box in the option's tab and setting it there to check for the color insted of trying to use the escape sequences, though by the sound of it you'v already done so.

Also you might want to do somthing like change:
#TRIGGER {^%e[33m(*).} {#VAR RoomName {%concat( %1, ".")};#VAR RoomDesc {};#VAR DescLine {};#VAR ExitLine {};#VAR RoomExit {};#TAG Name {@RoomName}}
TO
#TRIGGER {^%e[33m(*).} {#VAR RoomName {%concat( %1, ".")};#VAR RoomDesc {};#VAR DescLine {};#VAR ExitLine {};#VAR RoomExit {};#TAG Name {@RoomName};#SHOW I salw a Room Name! <@RoomName>}

Not much help I know but I'm feeble minded..

Pardon spelling errors dislexia is my friend

Catch you on the cross wires.
Reply with quote
kdberg
Beginner


Joined: 06 Jan 2003
Posts: 18
Location: USA

PostPosted: Fri Jan 17, 2003 7:06 pm   
 
I look at the variables @RoomName, @RoomDesc, and @RoomExit after moving into a new room, and they contain exactly the correct values. I didn't think turning on the capture on line color option would work in my case, since a single line may be multiple colors (containing both the end of the room description and the start of the exit information for instance).

Must be something I am doing in using the #TAG command? If there are 5 lines of room description, my logic will execute #TAG desc {@RoomDesc} five times. I assumed the last call will override the prior ones. Could this be the problem? Same thing happens with exits.
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