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
HFPyRo
Newbie


Joined: 07 Jun 2005
Posts: 3

PostPosted: Tue Jun 07, 2005 10:24 pm   

MXP triggers not working...
 
I'm trying to capture some events from a mud which has MXP enabled. The event output looks like this:

<event combat from="glade"><Cyan>Glade Le Marc stabs the vigilant patroller deeply in the left foot with one of his elegant stilettos.<BR></event>

All I need is a trigger that can catch each of these <event></event> tags and have access to the 'from' tag(?). So far everything I've tried doesn't work... I tried making a simple #MXPTRIG {event combat} {#echo Test} and nothing ever happened. The mud also has RoomName/RoomDesc/RoomExit MXP tags but I tried the same thing for them: #MXPTRIG {RoomDesc} {#echo Test} and still nothing. I also tried making the trigger using the Trigger Editor just incase my syntax was wrong but it's all there.

Any suggestions?
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Tue Jun 07, 2005 11:14 pm   
 
#MXPTRIG doesn't create the tag definitions. Does your MUD do this automatically (it'd look something like <!element blah blah blah> and <!tag 20 blah blah blah>)? If not, in order to get them working you need to create the appropriate <!element>/<!tag> combination (you need both).
_________________
EDIT: I didn't like my old signature
Reply with quote
HFPyRo
Newbie


Joined: 07 Jun 2005
Posts: 3

PostPosted: Wed Jun 08, 2005 1:07 am   
 
Hey Matt, thanks for the quick response.

I'm not exactly sure what the MUD sends because I think if MXP is disabled in the beginning it won't send the definitions. When I have MXP set to Debug though, I get this block of text after connecting:

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">


Also if i goto Preferences -> MXP, there is about 35 entries of elements under the MUD tab, and 9 entries of Entities from the MUD - so something must be sent from the MUD. I'm not sure how to grab them from the list to paste here - or if you even need to see them. I did however look for the <event> entity/element and it wasn't there. RoomDesc/RoomName/RoomExit were all there so I'll type those out as a sample:

Code:
<roomdesc FLAG='RoomDesc'>
<roomexits FLAG='RoomExit'>
<roomname FLAG='RoomName'>


And if you remember I couldn't get my RoomDesc MXP Trigger to work either. Hope this helps you help me! :)
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Wed Jun 08, 2005 11:30 pm   
 
First, from the little testing I've done, it appears that #MXPTRIG is useless without an associated definition as shown in Preferences (the MUD tab if the mud sent the definition string, the User tab if the ZMud user set up the tag via #MXP or similar command, or the System tab if Zugg included it in his application code (this seems to be reserved for actual MXP commands as detailed in the MXP spec located here)). I might be wrong, but it's never worked for me without one.

Second, the way the parameters for the !EVENT tag are set up it looks like:

name = "tell, say, soul, shout, echo, emote, whisper, emoteall, combat, channel, talker, group, club, map, score, inform, inventory"

from = "some player" (this would probably be more informative from seeing the actual event in action rather than the definition)

action = "channel=something, command=something, club=something, type=something"

This creates a huge problem, because in MXP there's no way to create multiple instances of the same tag (it simply overwrites the previous definition). And since action="channel=something" isn't going to match what the MUD is sending you, there's really no way to use the tag.

It's possible that I'm somewhat off on this, so I'll defer to Zugg if he decides to chime in.

By the way, the MUD you play doesn't happen to have its own dedicated mud client, does it? The way those tags are set up it certainly suggests so, since it wouldn't necessarily have to follow standard specifications.[/url]
_________________
EDIT: I didn't like my old signature
Reply with quote
HFPyRo
Newbie


Joined: 07 Jun 2005
Posts: 3

PostPosted: Thu Jun 09, 2005 6:50 pm   
 
Hmm... Interesting, I see your point.

Is there a way to just make it trigger on <event ...>, and then parse out the 'type' that follows in the trigger?

This is my basic train-of-thought, but it doesn't seem to work:
Code:
#mxptrig {event} {...}


Will something like that work? Zugg, any contributions to make? :)
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