/* Only update room stuff if they've changed room */
if ( pRoom && pRoom->vnum != d->pProtocol->pVariables[eMSDP_ROOM_VNUM]->ValueInt )
{
int i; /* Loop counter */
buf[0] = '\0';
for ( i = DIR_NORTH; i < MAX_DIR; ++i )
{
if ( pRoom->exit[i] != NULL ) // restrict exits from being shown here.
{
const char MsdpVar = (char)MSDP_VAR;
const char MsdpVal = (char)MSDP_VAL;
extern char *const dir_name[];
char buf2[MSL];
sprintf(buf2, "%c%s%c%d",MsdpVar, dir_name[i], MsdpVal, pRoom->exit[i]->u1.to_room->vnum);
strcat(buf,buf2);
}
}
if ( pRoom->area != NULL )
MSDPSetString( d, eMSDP_AREA_NAME, pRoom->area->name );
MSDPSetString( d, eMSDP_ROOM_NAME, pRoom->name );
MSDPSetTable( d, eMSDP_ROOM_EXITS, buf );
MSDPSetNumber( d, eMSDP_ROOM_VNUM, pRoom->vnum );
}
Affects 2553
Areas 158
ExDes 951
Exits 92902
Helps 1064
Socials 308
Mobs 2679(2679 new format)
(in use) 3299
Objs 4538(4538 new format)
Resets 8430
Rooms 28600
Shops 229
Strings 39303 strings of 7387298 bytes (max 11304960).
Perms 183017 blocks of 19266744 bytes.
extern int top_area;
static const char *GetMSSP_Area()
{
static char Buffer[32];
sprintf( Buffer, "%d", top_area );
return Buffer;
}
{ "AREAS", FUNCTION_CALL( GetMSSP_Area ) },
When I added mxp, it added a LOT of text to send, because I started to use it in lot of places, and even had to change most of the buffer size to handle it.
(another reason your mud may crash btw, if you are not careful with it, especially if you use external method to add the tags like addRoomMxp(exitBuffer), that can add more to the exitBuffer than its size can handle)
So MCCP really helps. Depends on your mud average text output off course.
For version I don't remember which I used, I think I ended up tweaking one. I did not upload it as I am far from being confident I did a good job out of it.
I can copy paste the code for the class, it is short enough. Instruction in how to plug it should be the same than the one I downloaded. (look the comments at start)
Kavir snippet makes it then very easy to plug (only other modification are in comm.c I think) and I added two commands for player (to toggle it) and imp to check if everything 'seems' ok