I have a problem with MXP.
The element entry is thus....
/* Immortal tag to load/edit/slay/stat/kill mobs that you see */
write_to_buffer( d, MXPTAG
("!ELEMENT Mobs \"<send href='"
"medit '&vnum;'|"
"load mob '&vnum;'|"
"kill '&desc;'|"
"slay '&desc;'|"
"stat mob '&desc;'"
"' "
"hint='RH mouse click to use this object|"
"Edit &desc;|"
"Load &desc;|"
"Kill &desc;|"
"Slay &desc;|"
"Stat &desc;"
"'>\" ATT='vnum name desc'"),
0);
The code to show it to MXP enabled clients is this.
if (IS_NPC(victim) && IS_IMMORTAL(ch) && (!IS_SET (ch->comm,COMM_NOVNUM)))
{
sprintf( buf3, "[" MXPTAG ("mobs %d %s %s") "%d" MXPTAG("/mobs")"]",victim->pIndexData->vnum,victim->name,victim->short_descr,victim->pIndexData->vnum);
strcat(buf,buf3);
}
I *THOUGHT* I did this correctly. Can someone point out my error?
When I hit Edit I need it to medit <vnum>
When I hit Load I need it to load mob <vnum>
When I hit kill I need it to kill <name>
When I hit slay I need it to slay <name>
When I hit stat I need it to stat mob <name>
The last 3 work but I cant get the medit and load mob to show vnums. It instead gives me medit <name> and load mob <name>...
What am I missing?
TIA!
The element entry is thus....
/* Immortal tag to load/edit/slay/stat/kill mobs that you see */
write_to_buffer( d, MXPTAG
("!ELEMENT Mobs \"<send href='"
"medit '&vnum;'|"
"load mob '&vnum;'|"
"kill '&desc;'|"
"slay '&desc;'|"
"stat mob '&desc;'"
"' "
"hint='RH mouse click to use this object|"
"Edit &desc;|"
"Load &desc;|"
"Kill &desc;|"
"Slay &desc;|"
"Stat &desc;"
"'>\" ATT='vnum name desc'"),
0);
The code to show it to MXP enabled clients is this.
if (IS_NPC(victim) && IS_IMMORTAL(ch) && (!IS_SET (ch->comm,COMM_NOVNUM)))
{
sprintf( buf3, "[" MXPTAG ("mobs %d %s %s") "%d" MXPTAG("/mobs")"]",victim->pIndexData->vnum,victim->name,victim->short_descr,victim->pIndexData->vnum);
strcat(buf,buf3);
}
I *THOUGHT* I did this correctly. Can someone point out my error?
When I hit Edit I need it to medit <vnum>
When I hit Load I need it to load mob <vnum>
When I hit kill I need it to kill <name>
When I hit slay I need it to slay <name>
When I hit stat I need it to stat mob <name>
The last 3 work but I cant get the medit and load mob to show vnums. It instead gives me medit <name> and load mob <name>...
What am I missing?
TIA!