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
Emit
Magician


Joined: 24 Feb 2001
Posts: 342
Location: USA

PostPosted: Sun Feb 02, 2003 3:43 am   

user mxp links
 
here is the line that comes in:


Obvious exits:
Guest Quarters Common Sleeping Area Stairs Down


my trigger


#TRIGGER {^Obvious exits:} {#sub {~<color ~#845382~>Obvious exits:~</color~>}}
#COND {^(*)$} {
#var exits %replace( %1, " ", "~</send~> ~<send~>")
exits = %concat( "~<send~>", @exits, "~</send~>")
#sub @exits} {within|param=1}


and the output it produces:


Obvious exits:
<send>Guest Quarters</send> <send>Common Sleeping Area</send> <send>Stairs Down</send>


I'm trying to get each of the exits to be a a link, so i can click&walk. all of the substitution seems to be working correctly, the output line looks just as it should, except for the fact that the <send> and </send>'s are displayed as plain text. I have mxp enabled. Is it because <send> is a secure mxp tag? that shouldn't be because the <a> tag can be substituted in with no problem... any ideas why its not working?

--------

moon.icebound.net:9000
Reply with quote
Kjata
GURU


Joined: 10 Oct 2000
Posts: 4379
Location: USA

PostPosted: Sun Feb 02, 2003 1:02 pm   
 
Try removing the ~'s before each < and >. With #SUB you need them because it is parsing the arguments, but with %replace and %concat you are using a literal string (enclosed in double quotes) which prevents the parsing fo <>'s.

Kjata
Reply with quote
Tigger
Novice


Joined: 07 Oct 2002
Posts: 46
Location: USA

PostPosted: Sun Feb 02, 2003 2:32 pm   
 
in the above script there is #COND, I can't find that statement anywhere in the online help?
Reply with quote
Kjata
GURU


Joined: 10 Oct 2000
Posts: 4379
Location: USA

PostPosted: Sun Feb 02, 2003 4:51 pm   
 
That command is used to add a new state to the last trigger created. Since this command was added after 6.16 and the online help file is up to date for 6.16, it doesn't appear there. However, it does appear in the help file for 6.40 and you can also read about it in this document posted by Zugg in the Library.

Kjata
Reply with quote
Emit
Magician


Joined: 24 Feb 2001
Posts: 342
Location: USA

PostPosted: Sun Feb 02, 2003 7:42 pm   
 
i lost the tilde's and got the exact same results.

--------

moon.icebound.net:9000
Reply with quote
Kjata
GURU


Joined: 10 Oct 2000
Posts: 4379
Location: USA

PostPosted: Sun Feb 02, 2003 7:51 pm   
 
What version are you using?

Kjata
Reply with quote
Emit
Magician


Joined: 24 Feb 2001
Posts: 342
Location: USA

PostPosted: Sun Feb 02, 2003 8:24 pm   
 
6.53
substituting the <a> tag worked in this version...

anyway, i worked around the problem by gagging the line that triggered the second state and using #mxp command to display the @exits variable. This worked A-ok, but it would be nice to get substitute to work, so i can add mxp tags without redrawing the entire line (in different cases than this one).
thanks for the help

--------

moon.icebound.net:9000
Reply with quote
Kjata
GURU


Joined: 10 Oct 2000
Posts: 4379
Location: USA

PostPosted: Mon Feb 03, 2003 1:14 am   
 
You can try adding this at the start of the line when substituting:
%char(27)~[1z

Kjata
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