CommandManager.h
Dentro de enum eCommandNumber
COMMAND_SETLVL = 109,
Dentro de class CCommandManager
bool CCommandManager::CommandSetLevel(LPOBJ lpObj,char* arg);
CommandManager.cpp
case COMMAND_SETLVL:
Result = CommandSetLevel(lpObj,argument);
break;
bool CCommandManager::CommandSetLevel(LPOBJ lpObj,char* arg) // OK
{
char name[11] = {0};
this->GetString(arg,name,sizeof(name),0);
LPOBJ lpTarget = gObjFind(name);
if(lpTarget == 0)
{
gNotice.GCNoticeSend(lpObj->Index,1,0,0,0,0,0,"O personagem não existe ou não está online.");
return 0;
}
int level = this->GetNumber(arg,1);
if(level >= 401)
{
gNotice.GCNoticeSend(lpObj->Index,1,0,0,0,0,0,"O valor que você entrou é invalido.");
return 0;
}
lpTarget->Level = level;
GCLevelUpSend(lpTarget);
gLog.Output(LOG_COMMAND,"[CommandSetLevel][%s][%s] - (Name: %s, Level: %d)",lpObj->Account,lpObj->Name,name,level);
}
Command.txt
108 "/setlvl" 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2 0 0 0 //setlvl <player> <nivel> - Editar nivel
Creditos:
SaintZeus
Emershow