HiHo!
Como estavam pedindo, lancei agora a versão 2.0 do meu comando de mudar o outfit.
--------------------------- Novidades --------------------------
- Agora o Gm pode alterar o outfit dos players também. -
- Adicionado o outfit do Deer... (você poderá adicionar creaturas facilmente, apenas analizando o code...
------------------------------------------------------------------
Lets Go!
Commands.cpp
caso você não tenha a versão 1.0, procure por
{"/kick",&Commands::kickPlayer},
e add em baixo:
{"/of",&Commands::outFit},
Agora no final adicione: (mesmo se você já tiver a versão 1.0)
bool Commands::outFit(Creature* c, const std::string &cmd, const std::string ¶m){ std::string tmp = param; std::string::size_type pos; std::string outfit; pos = tmp.find(","); if(pos){ outfit = tmp.substr(0, pos).c_str(); tmp.erase(0, pos+1); } else{ outfit = param; } Creature* creature = game->getCreatureByName(tmp); Player* target = dynamic_cast<Player*>(creature); Player* player = dynamic_cast<Player*>©; if(target){ if(outfit == "Gm"){ target->looktype = 75; game->creatureChangeOutfit(target); } else if(outfit == "Hero"){ target->looktype = 73; game->creatureChangeOutfit(target); } else if(outfit == "Ghost"){ target->looktype = 48; game->creatureChangeOutfit(target); } else if(outfit == "Deer"){ target->looktype = 31; game->creatureChangeOutfit(target); } else if(outfit == "Demon"){ target->looktype = 35; game->creatureChangeOutfit(target); } else if(outfit == "Lich"){ target->looktype = 99; game->creatureChangeOutfit(target); } else if(outfit == "Serpent Spawn"){ target->looktype = 220; game->creatureChangeOutfit(target); } else if(outfit == "Beholder"){ target->looktype = 17; game->creatureChangeOutfit(target); } } else{ if(outfit == "Gm"){ c->looktype = 75; game->creatureChangeOutfit©; } else if(outfit == "Hero"){ c->looktype = 73; game->creatureChangeOutfit©; } else if(outfit == "Deer"){ target->looktype = 31; game->creatureChangeOutfit(target); } else if(outfit == "Ghost"){ c->looktype = 48; game->creatureChangeOutfit©; } else if(outfit == "Demon"){ c->looktype = 35; game->creatureChangeOutfit©; } else if(outfit == "Lich"){ c->looktype = 99; game->creatureChangeOutfit©; } else if(outfit == "Serpent Spawn"){ c->looktype = 220; game->creatureChangeOutfit©; } else if(outfit == "Beholder"){ c->looktype = 17; game->creatureChangeOutfit©; } } return true;}
Se você tiver a versão 1.0 nos sources procure por
bool Commands::outFit(Creature* c, const std::string &cmd, const std::string ¶m){if(param == "Gm"){
c->looktype = 75;
game->creatureChangeOutfit( c );
}
else if(param == "Hero"){
c->looktype = 73;
game->creatureChangeOutfit( c );
}
else if(param == "Ghost"){
c->looktype = 48;
game->creatureChangeOutfit( c );
}
else if(param == "Demon"){
c->looktype = 35;
game->creatureChangeOutfit( c );
}
else if(param == "Lich"){
c->looktype = 99;
game->creatureChangeOutfit( c );
}
else if(param == "Serpent Spawn"){
c->looktype = 220;
game->creatureChangeOutfit( c );
}
else if(param == "Beholder"){
c->looktype = 17;
game->creatureChangeOutfit( c );
}
return true;
}
Delete tudo. Se você tiver instalado a versão 1.0 compile. Se não tiver a versão 1.0 instalada abra Commands.h e procure por:
bool kickPlayer(Creature* c, const std::string &cmd, const std::string ¶m);
e adicione abaixo disso:
bool Commands::outFit(Creature* c, const std::string &cmd, const std::string ¶m);
AGORA COMPILE TUDO
----- Como usar -----
- Digite /of [bIXO],[NOME]
- PS01 .: Para colocar o nome não pode ter espaço depois da vírgula.
- PS02 .: Para mudar seu próprio outfit apenas digite /of [bIXO]
-------------------------
Sei que o tópico está meio confuso (tentei fazer com que ficasse menos confuso, mas tive que fazer isso para não deixar as 2 versões como dois comandos diferentes) mas qq dúvida poste aqui que eu respondo... ^^
FlW
CyA!