Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
Halk
Newbie


Joined: 12 Jul 2003
Posts: 8
Location: United Kingdom

PostPosted: Sun Jul 06, 2008 2:49 pm   

Capturing MXP output
 
I'm back to mudding. So I've grabbed cmud - feels very fast. And I'm getting my aliases and triggers, gags and subs etc set up.

I've noticed that I have not defined a command line, yet cmud is showing one.

It appears to be coming from MXP (or something similar) output from the mud. This is all well and good, however I'd like to be able to capture that output, manipulate it, display it in a status window, etc.

I've had a look through the help files but I suspect I'm missing something possibly quite simple. Could anyone offer any advice?
_________________
Reply with quote
shalimar
GURU


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

PostPosted: Sun Jul 06, 2008 6:27 pm   
 
The command line is where you type.

I assume you mean a status bar, the line between where you type and the mud output.

In the settings editor there is a button that looks like the speedomoter in a car, that is the icon for status bar/window things, you can disable or delete them
_________________
Discord: Shalimarwildcat
Reply with quote
Nicodareus
Wanderer


Joined: 24 Jun 2008
Posts: 68
Location: Texas

PostPosted: Sun Jul 06, 2008 6:56 pm   
 
Yeah, but from the sounds of things, the MUD will just recreate it. Basically, you've got a couple of options.. You can work with the variables that MXP is already defining for you (Which would likely be the best option) or you can disable MXP and do it however you want. As far as setting your status bar for you, that's just going to be the MUD defining certain output as cetain variables. Chances are that the MUD isn't 'hiding' any output from you via MXP.. It is taking your prompt (Typically) and putting tags before and after various variables in there.. Such as:

Code:
HP: <HP>53</HP>/<MAXHP>78</MAXHP> MP: <MP>23</MP>/<MAXMP>32</MAXMP>


Which will display a typical HP/MP prompt to you and define all the variables needed in there without ever actually showing you the MXP tags because there is no reason you'd need to see them.

If you want to manipulate the MXP tags themselves for some reason, you could always turn on the 'debug MXP' option so that you see all of the MXP tags, but this would be kind of pointless, because like I said, the MUD isn't going to be actually 'hiding' any output from you to begin with.
_________________
Email: nikodareus@gmail.com

or

avonarys@gmail.com
Reply with quote
Halk
Newbie


Joined: 12 Jul 2003
Posts: 8
Location: United Kingdom

PostPosted: Sun Jul 06, 2008 7:31 pm   
 
Sorry. I did mean status line.

Basically I'm wanting access to those numbers. By whichever way is as tidy as possible.
_________________
Reply with quote
Nicodareus
Wanderer


Joined: 24 Jun 2008
Posts: 68
Location: Texas

PostPosted: Mon Jul 07, 2008 12:50 am   
 
Well, they should be available as variables.
_________________
Email: nikodareus@gmail.com

or

avonarys@gmail.com
Reply with quote
shalimar
GURU


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

PostPosted: Tue Jul 08, 2008 12:30 am   
 
The are often put into the system class, if they arent in the root.
_________________
Discord: Shalimarwildcat
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Tue Jul 08, 2008 4:44 pm   
 
Actually, MXP variables are accessed via the global %mxp list. For example, %mxp.hp would retrieve the value of the HP entity. But it really depends upon the exact MXP commands that the MUD is sending. You can look in the MXP preferences and go to the Elements tab and select the MUD elements and see exactly how the HP, MAXHP, MP, MAXMP elements are defined. Or, as Nicodareus mentioned, turn on the Debug MXP preference to see exactly what MXP tags the MUD is sending.
Reply with quote
Halk
Newbie


Joined: 12 Jul 2003
Posts: 8
Location: United Kingdom

PostPosted: Wed Jul 09, 2008 7:06 pm   
 
> <!EN hp 2614 publish><!EN xp 758091 publish><!EN gp 485 publish><!EN maxhp 2614 publish><!EN maxgp 499 publish>

That's a sample of the MXP prompt from the mud, with debug on.

I've tried "#sa %mxp.maxgp" hoping to see 499. Nothing. I've tried %mxp.maxgp which simply sends "p" to the mud.

I'm rather puzzled with this new fangled stuff :)

Edit : I don't know if this is relevant, but they're not appearing as elements, they're appearing as entities - along with some nice other stuff that cmud has been capturing for me, without me knowing.
_________________
Reply with quote
Arde
Enchanter


Joined: 09 Sep 2007
Posts: 605

PostPosted: Wed Jul 09, 2008 7:20 pm   
 
Mxp entities are available through %mud, not %mxp!

Halk, Zugg [chuckle Mr. Green], see help predef
Code:

%mud retrieve an MXP entity (variable). For example %mud.hp would retrieve the entity called "hp"
%mxp retrieve arguments from MXP tag within an MXP Trigger. For example, <COLOR red> results in %mxp.fore="red"


So #SAY %mud.maxgp will do the trick.
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Wed Jul 09, 2008 7:50 pm   
 
Sorry, Arde is correct. Embarassed
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD 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