Bom Como aprendi a compilar a Uns 2 Dias, meu primeiro contato com C, Acho que ta +- até.
Se jah existir esse code aki ou em outro lugar, Acredito que os creditos deste aqui sao meus.
Bom resumindo, é um comando de Dar Exp, Como vi que na verção do Evolution Server Version 0.6.3 CVS 0.5 que eu baxei nao tinha resolvi fazer 1.
Em commands.cpp Adicione
{"/addexp",&Commands::Addexp},
Em seguida Adicione no commands.cpp ainda
bool Commands::Addexp(Creature* creature, const std::string& cmd, const std::string& param){
Player* player = creature->getPlayer();
std::string charac = param;
int pos = param.find(",");
Player* characPlayer = game->getPlayerByName(charac.substr(0, pos).c_str());
if(!player)
return false;
if(characPlayer){
PremiumVariables premiumVariables;
std::string name = characPlayer->getName();
charac.erase(0, pos+1);
int characExp = atoi(charac.c_str());
if(characExp < 1 || characExp > 9999999){
player->sendTextMessage(MSG_STATUS_CONSOLE_RED,"Choose value between 1-9999999.");
characExp = 0;
}
char buffer [7];
itoa (characExp,buffer,10);
characPlayer->addExperience(characExp);
return true;
}
return false;
}
Ai em commands.h Coloque
bool Addexp(Creature* creature, const std::string& cmd, const std::string& param);
Adicione a Esta Linha ao seu command.xml
<command cmd="/addexp" access="5" />
Modo de Usar: /addexp Nome_Do_Player, EXP
Gostaria que comentacem se tem como melhorar ou se ta falatando alguma coisa ^^, vlw