MXP

Posted by Mack on Sat 19 Jul 2008 05:20 PM — 6 posts, 22,990 views.

#0
Using MXP on an old mudlib, The clicking on items works, but if you look at an item in the room you get the room description not the item description. Any have a clue what i am doing wrong?
#include <tune.h>
#include <ansi2.h>
#include "../area.h"
inherit STD_ROOM;
object ob;
string myname;

void long(string str){

string real_long;
string output;
output = ESC+"[1z";
output += "<!ELEMENT RDesc '<FONT color=Red>' FLAG='RoomDesc'>\n";

write(output);
::long();
}
reset(arg)
{
set_light(1);
short_desc = "the cryogenic facility";
set_long_f("You are standing in a large laboratory that has been "+
"specifically designed for the artificial duplication of "+
"living beings. A number of capsules and vats line the "+
"northern wall, connected to a vast array of electronic "+
"control systems by a deluge of wires and cables. There "+
"is a monitor attached to the east wall which illustrates "+
"how to begin the cloning process.\n"+
ESC+"[1z<send \"press &text;\">red button </send> (click it!) \n "+
"", 70 );
Australia Forum Administrator #1
I have some suggestions about MXP here:

http://www.gammon.com.au/mushclient/addingservermxp.htm

What do you mean "if you look at an item in the room" - do you mean typing "look"? Or the hover-over text in MXP? Or what gets sent when you click? Can you post some actual output to demonstrate?
#2
Ok you standing in this room, this is the description below if you type look or if you have verbos mode on instead of brief and enter the room. If you hover over the click it the mxp part works you can use the mouse to click the button and the action you want to happen works.

But if you type look at computer (computer for example is a defined item in the room) you will get the same thing as if you just type look in the room or walked in with verbose mode on.
What is basicly happening you don't get the items you defind description you get the whole room description.

You are standing in a large laboratory that has been specifically
designed for the artificial duplication of living beings. A number of
capsules and vats line the northern wall, connected to a vast array
of electronic control systems by a deluge of wires and cables. There
is a monitor attached to the east wall which illustrates how to begin
the cloning process. red button
(click it!)
There is one obvious exit: west.
Australia Forum Administrator #3
I don't really get what this is to do with MXP. You are saying you just type "look computer" - and it shows the room description? Isn't that just a problem in look handling?

Try using gdb to work out why it is showing the wrong description.
#4
This problem didn't stat till i added the MXP code. If i remove the code you can look at the items in the room fine. I am guessing I am missing something in the code. not sure what you mean by gdb. I will keep looking, just trying to add some new stuff to our mud since we are releasing a new version for the first time in 15 years =)
Thanks for you help.
Australia Forum Administrator #5
Sounds like you have an "if" that is affecting more than you expect.

As for gdb that is the Gnu Debugger, see this post for a description of using it:

http://mushclient.com/gdb