|
patryn Apprentice
Joined: 26 Sep 2001 Posts: 124
|
Posted: Tue Jan 11, 2005 12:30 pm
My wits end... MXP events |
The MUD I play on automatically creates RoomName, RoomDesc and RoomExit mxp events everytime i connect.
BRILLIANT!
The events are defined as so:
<'roomname FLAG='RoomName'>
<'roomdesc FLAG='RoomDesc'>
<'roomexit FLAG='RoomExit'>
BRILLIANT!
Now, my MUD output for a typical room description looks something like this:
<RoomDesc>This is the entrance to the graveyard. The entrance is extremely austere and not very welcoming at all. The only forms of decoration here are the two defiant gargoyles of Lachaise, whose job it is to keep a close eye on the number of things entering the graveyard. Traditional wisdom would suggest that they stand guard over the entrance to ensure the spirits within are kept peaceful. Many people however believe that they are really there to watch what leaves the graveyard.<BR>It is a very hot summer prime's morning with almost no wind and many puffy clouds.<BR></RoomDesc>
BRILLIANT!
Ah. But here's the clincher. I can't seem to access or capture the text between <RoomDesc> and </RoomDesc>
From what I have gathered at http://www.zuggsoft.com/zmud/mxp.htm Zmud will capture this data automatically.
That is what FLAG='RoomDesc' means. (I could be wrong.)
So, if that's the case, how do i access it?
Oh yes. And i have tryed using MXP triggers for this instead, but for some reason they just dont work. (I think it may have something to do with the <BR> inbetween the <RoomDesc> tags.
Help. Im nearly at my wits end :( |
|
_________________ That which does not kill us, makes us stronger. |
|
|
|
megamog75 Enchanter
Joined: 20 Nov 2002 Posts: 627 Location: USA
|
Posted: Tue Jan 11, 2005 3:14 pm |
have you tried just using a simple trigger?
I am not sure this would work but maybe something like this:
#trig {~<RoomDesc~>(*)} {#t+ rd}
#trig "rd" {^(*)$} {#addi varname {%1}}
#trieg {~<~/RoomDesc~>} {#t- rd;place varname to roomdesc somhow}
just a thought. Probably will cause more problems to figur it all out. |
|
_________________ megamog75
I will do this.Nothing in my life matters except this.No moment in my life exists except this moment.I am born in this moment, and if I fail, I will die in this moment. Raistlin Majere |
|
|
|
Zugg MASTER
Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Tue Jan 11, 2005 7:56 pm |
Maybe it's a typo, but you showed:
<'roomdesc FLAG='RoomDesc'>
which has an extra ' quote mark at the beginning. Where does that come from? Perhaps you can show the exact command the MUD is using to set up the room descriptions.
Also, remember that even when the MUD uses MXP, you still need to go into the mapper and then do a Config/Reconfig to run the autoconfigure wizard for the mapper. Then, when you are in Map mode in the mapper, the mapper should automatically capture the information in the RoomDesc tab. |
|
|
|
patryn Apprentice
Joined: 26 Sep 2001 Posts: 124
|
Posted: Wed Jan 12, 2005 1:30 am |
You're right Zugg, the extra ' was a typo.
I can't show the exact command that the MUD uses to set room descriptions because it does it at the beginning of the connection. If i turn mxp off (to see the mxp codes) the MUD somehow detects that my client isnt processing mxp codes and therefore doesnt send any mxp codes to my client.
Anyway, I did what you suggested and now the Room Descriptions are parsed to the mapper. (only in Map mode)
Is it possible at all to have this work in follow mode as well, because most of my mud is already mapped, I just want to update the room descriptions if they have changed.
Perhaps if I created a new event to override the <roomdesc FLAG='RoomDesc'> event.
Something like <roomdesc FLAG='Set RoomDesc'>?
Do you think this will work? (I'll go and find out) |
|
_________________ That which does not kill us, makes us stronger. |
|
|
|
Zugg MASTER
Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Thu Jan 13, 2005 6:00 pm |
No, unfortunately it only works in Map Mode. To have your existing room descriptions updated you would need to go through your map and turn on the Temporary Description flag in the room properties. This tells the mapper to update the room the next time you go to this room. But again, it will only do this in Map Mode.
In a sense, Follow mode is really "read only" and Map Mode is "read/write". So in order to make changes to your map from the MUD, it needs to be in Map Mode.
In order to capture the descriptions being sent by the MUD in a trigger, you should really probably be using an MXP trigger. Try something like:
#MXPTRIG {roomdesc} {#VAR RoomDesc %1}
and see what that does. Maybe one of the Gurus can help more...it's been a while since I played with MXPTRIG myself. |
|
|
|
patryn Apprentice
Joined: 26 Sep 2001 Posts: 124
|
Posted: Mon Jan 17, 2005 1:03 pm |
Thanks
I tryed your suggestion, nearly works perfect.
I adjusted it as so:
#MXPTRIG {roomdesc} {#VAR RoomDesc %concat( %0)}
Now it works a charm.
Today is definately a good day.
Thanks again.
|
|
_________________ That which does not kill us, makes us stronger. |
|
|
|
|
|