Código:
void MEMMngCommands::CommandAltC(int aIndex,int type)
{
char sBuff[255]={0};
int DBPreview;
if(MCTMng.ClassActive == 0)
{
LogP.ChatWisperSendToPlayer( aIndex, " %s O Comando Esta Desativado.",gObj[aIndex].Name );
return;
}
if(MCTMng.ClassPrice > gObj[aIndex].Money)
{
LogP.ChatWisperSendToPlayer( aIndex, " %s Voce nao possui zen para mudar de classe.",gObj[aIndex].Name );
return;
}
if(MCTMng.ClassLevel > gObj[aIndex].Level)
{
LogP.ChatWisperSendToPlayer( aIndex, "%s Voce nao possui level para mudar de classe.",gObj[aIndex].Name );
return;
}
char * name;
switch(type)
{
case 1: // -- Soul Master
DBPreview = 0x18;
name = "Soul Master";
break;
case 17: // -- Blade Knight
DBPreview = 0x38;
name = "Blade Knight";
break;
case 33: // -- Muse Elf
DBPreview = 0x58;
name = "Muse Elf";
break;
case 48: // -- Magic Gladiator
DBPreview = 0x78;
name = "Magic Gladiator";
break;
case 64: // -- Dark Lord
DBPreview = 0x98;
name = "Dark Lord";
break;
}
gObj[aIndex].DbClass = type;
gObj[aIndex].Money -= MCTMng.ClassPrice;
gObj[aIndex].Level -= MCTMng.ClassLevel;
GCMoneySend(aIndex,gObj[aIndex].Money);
GCLevelUpMsgSend(aIndex, 0);
gObjViewportListProtocolCreate(gObj);
LogP.ChatWisperSendToPlayer(aIndex,"%s Você acabou de se tornar %s.",gObj[aIndex].Name,name);
return;
}
CREDITOS:
Mr.Diel
Rolisso14