View Single Post
  #13  
Old 03-04-2003, 08:48 PM
TheOne
Sarnak
 
Join Date: Sep 2002
Location: Montreal, QC
Posts: 47
Default I found it

the NPC will return NULL if you type in $user because for some reason the variable $user doesn't exist , if you search in parser.cpp you can see that $name = client->GetName(). try $name instead of $user

Quote:
if (client) AddVar("userid", itoa(client->GetID(),temp,10));
if (client) AddVar("ulevel", itoa(client->GetLevel(),temp,10));
if (client) AddVar("name", client->GetName());
if (client) AddVar("race", GetRaceName(client->GetRace()));
if (client) AddVar("class", GetEQClassName(client->GetClass()));
if (client) AddVar("mobid", itoa(mob->GetNPCTypeID(),temp,10));
if (client) AddVar("mlevel", itoa(mob->GetLevel(),temp,10));
if (client) gClient = client;
if (client) fac = client->GetFactionLevel(client->GetID(), mob->GetID(), client->GetRace(), client->GetClass(), DEITY_AGNOSTIC, mob->CastToNPC()->GetFactionID(), mob);
if (fac) AddVar("faction", itoa(fac,temp,10));
if (zone) AddVar("zonesn",zone->GetShortName());
if (zone) AddVar("zoneln",zone->GetLongName());
__________________
Good, bad ... I'm the guy with the gun.
Reply With Quote