Logo
live-news-icon

Noticias

Tema: Command Set Level para MuEMU

Applayo

  • *
Command Set Level para MuEMU | en: Abril 22, 2021, 12:28:17 am »

CommandManager.h
Dentro de enum eCommandNumber

Código: [Seleccionar]
COMMAND_SETLVL = 109,

Dentro de class CCommandManager

Código: [Seleccionar]
bool CCommandManager::CommandSetLevel(LPOBJ lpObj,char* arg);

CommandManager.cpp


Código: [Seleccionar]
        case COMMAND_SETLVL:
            Result = CommandSetLevel(lpObj,argument);
            break;

Código: [Seleccionar]
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

Código: [Seleccionar]
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
« Última modificación: Abril 22, 2021, 01:11:43 am por Applayo »

robins1998

  • *
Re: Command Set Level para MuEMU | Respuesta #1 en: Mayo 27, 2021, 02:29:01 am »

Very helpful, thanks for sharing.


Responder Marcar No Leido Enviar Topic Print