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


Joined: 29 Jun 2003
Posts: 64

PostPosted: Mon Jul 07, 2003 8:00 pm   

MXP problem with <send>
 
I have a trigger that takes shop list output, and is supposed to sub it with mxp so that I can click the number of the item, and buy it.. however it's not doing that.

#SUBSTITUTE {~<send "shop buy %1"~>%1~</send~>~)%2~[%3 gp~]}

This is the command, it's only sending 'shop' to the mud, and the tooltip is coming up as buy, does the send tag not support multiple word commands??
Reply with quote
zex0s
Wanderer


Joined: 29 Jun 2003
Posts: 64

PostPosted: Mon Jul 07, 2003 8:20 pm   
 
Then, I tried changing the trigger to a #PSUB so I dont have to recreate the rest of line's colors..
#TRIGGER {(%d)~)*~[* gp~]} {#PSUB {~<SEND "shop buy %1"~>%1~</SEND~>} %x1}
Code:

  9) A small sword                     10     999          [       350 gp]
 10) A dagger                          12     1,000        [       900 gp]
 11) A small steel pike                25     1,000        [     4,725 gp]
 12) A small steel halberd             25     1,000        [     4,725 gp]

but it outputs this instead ...
Code:

  SEND shop buy 88/SEND) A long sword                      7      1,000        [       275 gp]
  SEND shop buy 99/SEND) A small sword                     10     999          [       350 gp]
 SEND shop buy 1010/SEND) A dagger                          12     1,000        [       900 gp]
 SEND shop buy 1111/SEND) A small steel pike                25     1,000        [     4,725 gp]


Whats going on here?
Reply with quote
Kjata
GURU


Joined: 10 Oct 2000
Posts: 4379
Location: USA

PostPosted: Mon Jul 07, 2003 8:24 pm   
 
Try adding href= before the command the SEND is to send to the MUD. You can also try single quotes instead of double quotes.

Make sure that once the trigger is created, it still has the quotes and the <>'s. You might also want to try disabling the Allow <> for expansion in the preferences.
Reply with quote
zex0s
Wanderer


Joined: 29 Jun 2003
Posts: 64

PostPosted: Mon Jul 07, 2003 9:52 pm   
 
I created the trigger using the editor.. and I've already tried those things..

disabling the <> just changes the text to :
<SEND href='shop buy 125'>125</SEND>) An elvish sword of great antiqui 45 1 [ 23,225 gp]
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Tue Jul 08, 2003 2:42 am   
 
Use #SUBSTITUTE for regular text; use #MXP for mxp-formatted text.

Here's a mighty collective DUHHHH! to all of us.Smile Zugg said pretty much the exact same thing not too long ago.

EDIT: guess I should narrow it down a tad. According to the spec, only open tags (text formatting) can be used on open lines (I assume that's what non-MXP enabled mud output is set as). If I remember what Zugg said about it, #MXP treats the line as secure/opens up the tag for that one instance. #SUB doesn't do that, and therefore it won't work for links anymore.
Reply with quote
Kjata
GURU


Joined: 10 Oct 2000
Posts: 4379
Location: USA

PostPosted: Tue Jul 08, 2003 12:00 pm   
 
Nope. #SUB has special code in it to allow MXP substitutions. I just tested with this trigger:
#TRIGGER {hello (%w)} {#SUB {hello ~<send 'smile %1'~>%1~</send~>}}

Then I typed in:
#SH Kjata says 'hello zex0s and everybody else'.

It made the word after hello a link and it worked correctly.
Reply with quote
zex0s
Wanderer


Joined: 29 Jun 2003
Posts: 64

PostPosted: Tue Jul 08, 2003 3:06 pm   
 
So the #PSUB doesnt? that stinks, because I hate having to recolor the substituted lines properly...
If I could use #PSUB it wouldnt matter, as I could just replace the word with it.
Reply with quote
Kjata
GURU


Joined: 10 Oct 2000
Posts: 4379
Location: USA

PostPosted: Tue Jul 08, 2003 3:44 pm   
 
No, you need #SUB.
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