Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are
spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the
password reset link.
Due to spam on this forum, all posts now need moderator approval.
Entire forum
➜ MUSHclient
➜ Python
➜ Reading XML-like data from MUD
|
Reading XML-like data from MUD
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
| Posted by
| Drakonik
(20 posts) Bio
|
| Date
| Fri 18 Jul 2008 07:17 PM (UTC) |
| Message
| Alright. This thread is where I'm going to put all my questions for this project, so the title is probably not going to be very descriptive for long. That being said...
The MUD I play allows users to have various information about their character sent to their client in a format like this:
<rt>3</rt>
<position>STANDING</position>
<vitality>218:226</vitality>
And so on. It's an XML like format. Open tag, close tag. I've got a trigger set up that correctly captures this string. However, when I set the trigger to Omit From Output (these data strings are sent a LOT. Any time a point of anything is lost, regained, any time I sit or stand, any time something enters or leaves my hands...something is sent), the data lines are indeed omitted. However, something odd happens. To test the trigger, I sent the captured text (the entire <foo>value</foo> string) to a world.note() in my script file. When the trigger is omitted from output, the world.note text is omitted as well. Is this a function of triggers? If so, is there a way to capture this text, and not let me see it, while still letting me put note() text to the game world? | | Top |
|
| Posted by
| Nick Gammon
Australia (23,165 posts) Bio
Forum Administrator |
| Date
| Reply #1 on Fri 18 Jul 2008 08:35 PM (UTC) |
| Message
| |
| Posted by
| Drakonik
(20 posts) Bio
|
| Date
| Reply #2 on Sat 19 Jul 2008 02:21 AM (UTC) |
| Message
| Alright. Next question. MUSH seems to insert a '>' after every command I send. Like so:
sit
You sit down on the ground.
>
The odd thing about this particular MUD is that instead of new text arriving below this cursor, it arrives on the same line, and THEN wraps. Like so.
sit
You sit down on the ground.
>A sharl conscript reaches at you with its left pincer.
This causes odd behavior when the trigger mentioned in the previous post is activated. The line with the > on it is 'sucked away' and all text gets pulled one line down the screen. It's very disconcerting, and the > cursor has never really appealed to me anyway. Is there a way to disable this? I've checked global and world options and couldn't find anything. | | Top |
|
| Posted by
| Worstje
Netherlands (899 posts) Bio
|
| Date
| Reply #3 on Sat 19 Jul 2008 09:30 AM (UTC) |
| Message
| | That's not MUSHclient. It's probably output from your mud that is somehow getting butchered due to your trigger. Maybe it is not omitting the full thing you think it is omitting. | | Top |
|
| Posted by
| Drakonik
(20 posts) Bio
|
| Date
| Reply #4 on Sat 19 Jul 2008 02:38 PM (UTC) |
| Message
| | Hm. Are you certain? I've played a few MUDs and the > cursor has always been there. Is it one of those unconsciously ubiquitous things people do? | | Top |
|
| Posted by
| Worstje
Netherlands (899 posts) Bio
|
| Date
| Reply #5 on Sat 19 Jul 2008 04:23 PM (UTC) |
| Message
| | I'm pretty 100% certain. It is the mud. (Unless you have a script outputting it, but that would be a rather conscious choice.) | | Top |
|
| Posted by
| Nick Gammon
Australia (23,165 posts) Bio
Forum Administrator |
| Date
| Reply #6 on Sun 20 Jul 2008 02:57 AM (UTC) Amended on Sun 20 Jul 2008 07:49 AM (UTC) by Nick Gammon
|
| Message
| A lot of MUDs tend to do that. See http://mushclient.com/faq point 11 for suggestions on how to work around that.
It is often called a "prompt" and they do it to give you a visual cue that it is time to type something.
You may be able to configure it to go away, eg. "prompt off".
|
- Nick Gammon
www.gammon.com.au, www.mushclient.com | | Top |
|
The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).
To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.
25,356 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top