|
zex0s Wanderer
Joined: 29 Jun 2003 Posts: 64
|
Posted: 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?? |
|
|
|
zex0s Wanderer
Joined: 29 Jun 2003 Posts: 64
|
Posted: 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? |
|
|
|
Kjata GURU
Joined: 10 Oct 2000 Posts: 4379 Location: USA
|
Posted: 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. |
|
|
|
zex0s Wanderer
Joined: 29 Jun 2003 Posts: 64
|
Posted: 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] |
|
|
|
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: 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. 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. |
|
|
|
Kjata GURU
Joined: 10 Oct 2000 Posts: 4379 Location: USA
|
Posted: 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. |
|
|
|
zex0s Wanderer
Joined: 29 Jun 2003 Posts: 64
|
Posted: 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. |
|
|
|
Kjata GURU
Joined: 10 Oct 2000 Posts: 4379 Location: USA
|
Posted: Tue Jul 08, 2003 3:44 pm |
No, you need #SUB.
|
|
|
|
|
|