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
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4691
Location: Pensacola, FL, USA

PostPosted: Sat Jun 03, 2006 10:54 pm   

MXP Questions
 
Okay, I will admit to being new to MXP, at least inasmuch as understanding mxp sent from the mud.

1) How do i access the elements automatically made my the mud, i see several that would be alot of help in mapping.

2)I turned on the MXP debugger (just to see what the difference was) and it seems like i have two event tags showing:

<event say from="recruit">The timid Tsortean recruit says in Djelian: Ug.
</event>
<event say from="recruit">The timid Tsortean recruit asks in Djelian: Whadder ya tink yer lookin' at?
</event>
<event combat from="shalimar">You impale the tough Ephebian soldier's neck on your Dried Catnip Twig.
</event><event combat from="shalimar">You impale the tough Ephebian soldier's neck on your Petrified Rat Tail.
</event>
_________________
Discord: Shalimarwildcat
Reply with quote
Kjata
GURU


Joined: 10 Oct 2000
Posts: 4379
Location: USA

PostPosted: Sat Jun 03, 2006 11:08 pm   
 
Look at this article for more information on MXP triggers. With these types of triggers you can have zMUD do something every time a specific MXP tag is received.

About the tags you see that could help with mapping, they are most likely already doing their job. If you see things like FLAG="RoomName" then zMUD already knows that when it sees that tag it will consider whatever is inside of it to be the name of the room. You don't need to do anything else for the mapper to take this into consideration.

As for the event tags that you saw, these are just some custom tags defined by your MUD. Since they are not part of the MXP specification, zMUD just ignores them. However, you can use MXP triggers to fire when one of these custom tags is received and do useful things.
_________________
Kjata
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4691
Location: Pensacola, FL, USA

PostPosted: Sat Jun 03, 2006 11:36 pm   
 
Also, this thread seems to retain the unread color (for me at least) no matter how many times i reread it.
_________________
Discord: Shalimarwildcat
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4691
Location: Pensacola, FL, USA

PostPosted: Sun Jun 04, 2006 5:00 am   
 
can you give me an example on this

<event combat from="shalimar">You impale the tough Ephebian soldier's neck on your Dried Catnip Twig.
</event>

#TR {^You impale *.$} {#IF (??="shalimar") {%mxp.back=red;%mxp.fore=black}}



I've also noticed that #CAP does not properly transfer MXP color
_________________
Discord: Shalimarwildcat
Reply with quote
Kjata
GURU


Joined: 10 Oct 2000
Posts: 4379
Location: USA

PostPosted: Sun Jun 04, 2006 12:03 pm   
 
zMUD needs for a tag to be defined in order for an MXP trigger to be able to fire when it recives it. It seems that Discworld does not define the EVENT tag, even though it uses it. You should ask the imms in your MUD to define all tags that are used. Meanwhile, you can define it yourself with the following command:

#MXP <!ELEMENT event ATT='type from'>

Now that the tag is defined, you can have MXP triggers fire on it. The pattern for the trigger is the name of the tag you are matching, not its contents. So the trigger would be:

#MXPTRIG {event combat} {#IF (%mxp.from = "shalimar") {#NOOP do something}}

The %mxp record variable will contain each attribute of the tag with its corresponding value. In this case, the attributes are "type" with a value of "combat" and "from" with a value of "shalimar".

However, you will not be able to change the color of the text with this trigger doing something similar to what you saw in the Advanced Triggers article. That example matches the COLOR tag, and the attributes of the COLOR tag specify the color of its contents, thus changing the attributes does change the color of its contents. If you want to do this, then you would need to use a regular trigger that matches the actual text between the tags.
_________________
Kjata
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4691
Location: Pensacola, FL, USA

PostPosted: Mon Jun 05, 2006 8:41 am   
 
Is there a way to referance the %mxp properties of a line in a #trigger?
or
Is there a way to parse the text incapsulated within the MXP tags with a #mxptrigger?


Otherwise i think i need to set local variables with #mxptrigger and use those in the subsequent #trigger.
_________________
Discord: Shalimarwildcat
Reply with quote
Kjata
GURU


Joined: 10 Oct 2000
Posts: 4379
Location: USA

PostPosted: Mon Jun 05, 2006 11:25 am   
 
First question: no. Only MXP triggers get the special %mxp record variable.
Second question: yes. Use %0 in an MXP trigger to refer to the text within the tags.
_________________
Kjata
Reply with quote
Arcane_of_Discworld
Wanderer


Joined: 29 Jan 2002
Posts: 99
Location: UK

PostPosted: Mon Jun 05, 2006 7:29 pm   
 
I turned debug on in zMud and logged on to discworld, this was the resultant text just after my password was input:
Code:
<!EVENT tell from="{player}"><!EVENT say from="{player}"><!EVENT soul from="{player}"><!EVENT shout from="{player}"><!EVENT echo from="{player}"><!EVENT emote from="{player}"><!EVENT whisper from="{player}"><!EVENT emoteall from="{player}"><!EVENT combat from="{player}"><!EVENT channel from="{player}" channel="{channels}"><!EVENT talker from="{player}" channel="{talkerchannels}"><!EVENT group from="{player}" command="{groupcmds}"><!EVENT club from="{player}" club="{clubnames}"><!EVENT map><!EVENT score><!EVENT inform from="{player}" type="{informtype}"><!EVENT inventory><!define player "Details about the player" guild="{guilds}" guilddesc="The guild the player belongs to" clubs="clubs" clubsdesc="All the clubs the player belongs to" family="family" familydesc="The family the player is in" killer="yes|no" killerdesc="The player is a playerkiller" friend="yes|no" frienddesc="Member of the friends list on the mud">


It looks like they have attempted to define the events but if I'm not mistaken they have gotten the syntax wrong, is this the case Kjata?
Reply with quote
Kjata
GURU


Joined: 10 Oct 2000
Posts: 4379
Location: USA

PostPosted: Mon Jun 05, 2006 7:51 pm   
 
Looking more into this, it seems that they did not get the syntax wrong. Apparently, those event tags are to support WhelkMud, which is a .NET based client with support for non-standard MXP extensions. They aren't attempting to define the event tag, but rather set-up with WhelkMud the possible events that the client will receive.

There's more information about the MXP extensions that WhelkMud implements here. It might still be a good idea to ask the imms of Discworld to also properly define the event tag under standard MXP, since I can see how it might be useful for some people to have zMUD react to these tags. I'll also bring this page to Zugg's attention and perhaps something useful will come out of it.
_________________
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