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


Joined: 13 Jul 2003
Posts: 17

PostPosted: Wed Dec 08, 2004 10:09 pm   

substituting mxp elements for other mxp elements
 
My mud defines a custom <monster> element that it uses to provide clickable <send> menus on the monster names. The output that I get from the mud looks like this:

Code:
<MONSTER id="firemage">An angry firemage </MONSTER>


I want to change the options that are available in the <send> menu, so I defined a new element called mymonster. Now what I want to do is to replace the above with:

Code:
<MYMONSTER id="firemage">An angry firemage </MYMONSTER>


I first tried using an MXP trigger to do this, but as far as I can tell #sub does nothing when used inside an MXP trigger. So then I tried a normal trigger:

Code:
#trig {<monster(*)</monster>} {#sub {<mymonster%1</mymonster>}}

(edit: oops, corrected the code above to what I actually tried)

But that trigger doesn't seem to even be going off. How can I do this?


Last edited by Apathy on Sun Dec 12, 2004 10:45 pm; edited 2 times in total
Reply with quote
digits
Beginner


Joined: 17 Jul 2004
Posts: 15

PostPosted: Sun Dec 12, 2004 11:56 am   
 
Code:
#trig {<monster(%*)</monster>} {
    #sub {<mymonster%1</mymonster>}
}
Reply with quote
Apathy
Beginner


Joined: 13 Jul 2003
Posts: 17

PostPosted: Sun Dec 12, 2004 10:41 pm   
 
digits wrote:
Code:
#trig {<monster(%*)</monster>} {
    #sub {<mymonster%1</mymonster>}
}


This doesn't work. It performs the substitution satisfactorily when MXP is disabled, but when MXP is enabled I still get the original <SEND> menu.
Reply with quote
nexela
Wizard


Joined: 15 Jan 2002
Posts: 1644
Location: USA

PostPosted: Tue Dec 14, 2004 8:27 am   
 
Since I never really used mxp I could be off base

#trig {~<monster(*)~</monster>} {#sub {~<mymonster%1~</mymonster>}}
_________________
Zmud Support Library
Zmud Knowledge Base
Reply with quote
Apathy
Beginner


Joined: 13 Jul 2003
Posts: 17

PostPosted: Tue Dec 14, 2004 5:29 pm   
 
nexela wrote:
Since I never really used mxp I could be off base

#trig {~<monster(*)~</monster>} {#sub {~<mymonster%1~</mymonster>}}


No difference.
Reply with quote
Kiasyn
Apprentice


Joined: 05 Dec 2004
Posts: 196
Location: New Zealand

PostPosted: Wed Dec 15, 2004 1:05 am   
 
try using #mxptrig
_________________
Kiasyn
Owner of Legends of Drazon
Coder on Dark Legacy
Check out Talon, an easy IMC connection.
Reply with quote
Apathy
Beginner


Joined: 13 Jul 2003
Posts: 17

PostPosted: Wed Dec 15, 2004 3:58 am   
 
I already tried #mxptrig {mymonster} {#sub blah}. The trigger goes off (I can see other effects), but the #sub doesn't seem to do anything no matter what I try to substitute in.
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