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


Joined: 05 Jul 2005
Posts: 14

PostPosted: Tue Oct 24, 2006 8:23 pm   

Simu's Stormfront mode in zMUD? (MXP-related)
 
I've started playing Dragonrealms, and I've been thinking.. I'd really like to be able to take advantage of zMUD's scripting engine, while still retaining access to the information that's available only in Stormfront mode.. Specifically HP.

Simu uses a mangled form of XML to pass info. What I'm wondering is, would it be possible to take something like

Code:
<style id="roomName" />[Wilds, Pine Needle Path]
<style id=""/><style id="roomDesc"/>A well-trod path leads from a small open gateway in the town wall and heads into a grove of whispering pine.  Lean, muscular figures stride by briskly, some carrying longbows, others staves, and all garbed in muted tones of earth and forest.<style id=""/>  You also see some braided grass, a cleaned goblin skin with a few fleas on it, a cleaned goblin skin with a few fleas on it, some tanned gargoyle-hide pieces, a stem, a stem, and a journeyman.
<compass><dir value="n"/></compass>Obvious paths: north.
<prompt time="1161721334">></prompt>


And turn clean out the XML by making zMUD interpret it as MXP?

Or handle something like
Code:
<compDef id='room players'>Also here: Range Master Dragamar</compDef>


To build a list of people in the room?

Edit: I've managed to filter out all the XML with gags and subs and such and turn it into a readable, playable version (largely), but such stuff is far more prone to error than reading it as MXP, plus I seem to be triggering off of the extra info(they duplicate a lot of their data, and even if it's gagged i still trigger off it)
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Wed Oct 25, 2006 3:49 am   
 
It is important to remember that MXP tags do NOT save across sessions, so to ensure use of them put all the following in the atconnect alias or a trigger matching on something happening close to login stuff.

The Stormfront XML stream uses two types of tags. The first type is the standard HTML-style <tag>...</tag> format, and MXP easily supports this already. These are the ones I've seen thus far, but if you know of others go ahead and post them or otherwise let me know about them.

Prompt (this works, but it automatically changes > to >, not sure if this can be fixed so you'll probably have to end up #SUBing it)
#MXP <!element prompt att='time' flag='prompt' tag=20 open>

compDef
#MXP <!element compDef att='id' tag=21 open>

component
#MXP <!element component att='id' tag=22 open>

compass
#MXP <!element compass att='' tag=23 open>

d
#MXP <!element d att='' tag=24 open>

dialogData
#MXP <!element dialogData att='id clear' tag=25 open>

openDialog
#MXP <!element openDialog att='id location clear' tag=26 open>

inv
#MXP <!element inv att='' tag=27 open>

spell
#MXP <!element inv att='' tag=28 open>

The rest of the tags are "command" tags that don't follow the <tag>...</tag> format. These are single tags that end with a /, as in:

<tagname attributes-list/>

Unless a guru or another knowledgeable user knows otherwise, MXP doesn't support this tag syntax at all. This is harmless for simple tags like <sep/> (matching them apparently does absolutely nothing at all), but for the more complex ones that have attributes associated with them including the / will cause an access violation and excluding it will cause the element to not match at all.

Until MXP gets updated to better handle XML-style tags, looks like we're forced to use normal triggers to capture our info. I'm not sure if you could access the text content of a tag, but using #MXPTRIG you can use %0 to refer to the text between tags, and from there do your list-building:

#MXPTRIG {compdef id='room players'} {Players = %remove("Also here: ","%0");other stuff regarding list and unrelated action}
_________________
EDIT: I didn't like my old signature
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