Compilando jaja edito
OBS:C ta fogo hj em manuh n sei qtos code c ja posto hj USuhS,C podia monta uma versaum so sua =p
-----------------------Edit-----------------------------------
kara tudo perfect adicionei o code no XikeOT e pego tudo fmz sem erro algum...particularmente gostei do /randomoutfit monsters que mostra os monstros novos e etc,bem legal pra da uma conhecida nos novos monstros
Abraços Laduxitu











info
Grupo: Campones
Registrado: 01/02/06
Posts: 74
Reputação: 0
Oi gente... Essa é a versão 2.0 do comando /randomoutfit... Nessa nova versão, você pode usar 5 tipos de RandomOutfit... Esses tipos são:
monsters: outfits de monstros
colors: mudar a cor do seu outfit
items: mudar seu outfit pra items (não sao todos os items mas são muitos ;D)
addons: mudar somente os addons
addons_colors: mudar os addons e a cor do outfit também
- Aí você usa o comando assim:
/randomoutfit tipo
Por exemplo:
/randomoutfit monsters
Lá vai o code:
---------------------------------------------
Commands.cpp
Depois de:
{"/town",&Commands::teleportToTown},Adicione:
{"/randomoutfit",&Commands::randomOutfit},---
No final do Commands.cpp adicione:
bool Commands::randomOutfit(Creature* creature, const std::string& cmd, const std::string& param){ //code by Zorzin versão 2.0 Player* player = creature->getPlayer(); if(!player) return false; if(player->changeOutfitRandom == 0 && (param != "monsters" && param != "colors" && param != "items" && param != "addons" && param != "addons_colors")) { player->sendTextMessage(MSG_STATUS_CONSOLE_BLUE, "The options are: monsters, colors, items, addons, addons_colors."); return false; } if(player->changeOutfitRandom == 0){ if(param == "monsters") player->changeOutfitRandom = 1; else if(param == "colors") player->changeOutfitRandom = 2; else if(param == "items") player->changeOutfitRandom = 3; else if(param == "addons") player->changeOutfitRandom = 4; else if(param == "addons_colors") player->changeOutfitRandom = 5; // player->sendTextMessage(MSG_INFO_DESCR, "Random Outfit Change: enabled."); return true;}else{ player->changeOutfitRandom = 0; player->currentOutfit.lookType = player->defaultOutfit.lookType; player->currentOutfit.lookHead = player->defaultOutfit.lookHead; player->currentOutfit.lookBody = player->defaultOutfit.lookBody; player->currentOutfit.lookLegs = player->defaultOutfit.lookLegs; player->currentOutfit.lookFeet = player->defaultOutfit.lookFeet; player->currentOutfit.lookAddons = player->defaultOutfit.lookAddons; g_game.internalCreatureChangeOutfit(player, player->getCurrentOutfit()); //o char vai voltar pro outfit inicial;) player->sendTextMessage(MSG_INFO_DESCR, "Random Outfit Change: disabled."); return true;} return false;}---------------------------------------------
Commands.h
Depois de:
Adicione:
---------------------------------------------
Player.cpp
Depois de:
Adicione:
---
Depois de:
Adicione:
---
No final do Player.cpp adicione:
void Player::changeRandomOtf(){ if(changeOutfitRandom == 0) return; if(changeOutfitRandom == 1) { short x = random_range(1, 2); if(x == 1) currentOutfit.lookType = random_range(2, 127); else currentOutfit.lookType = random_range(192, 247); g_game.internalCreatureChangeOutfit(this, getCurrentOutfit()); } else if(changeOutfitRandom == 2) { currentOutfit.lookHead = random_range(0, 132); currentOutfit.lookBody = random_range(0, 132); currentOutfit.lookLegs = random_range(0, 132); currentOutfit.lookFeet = random_range(0, 132); g_game.internalCreatureChangeOutfit(this, getCurrentOutfit()); } else if(changeOutfitRandom == 3) { Outfit_t outfit; short z = random_range(1, 7); if(z == 1) outfit.lookTypeEx = random_range(2376, 2456); else if(z == 2) outfit.lookTypeEx = random_range(2509, 2542); else if(z == 3) outfit.lookTypeEx = random_range(2457, 2500); else if(z == 4) outfit.lookTypeEx = random_range(2640, 2665); else if(z == 5) outfit.lookTypeEx = random_range(2261, 2316); else if(z == 6) outfit.lookTypeEx = random_range(1487, 1508); else if(z == 7) outfit.lookTypeEx = random_range(2086, 2092); g_game.internalCreatureChangeOutfit(this, outfit); } else if(changeOutfitRandom == 4) { currentOutfit.lookAddons = random_range(0, 3); g_game.internalCreatureChangeOutfit(this, getCurrentOutfit()); } else if(changeOutfitRandom == 5) { currentOutfit.lookHead = random_range(0, 132); currentOutfit.lookBody = random_range(0, 132); currentOutfit.lookLegs = random_range(0, 132); currentOutfit.lookFeet = random_range(0, 132); currentOutfit.lookAddons = random_range(0, 3); g_game.internalCreatureChangeOutfit(this, getCurrentOutfit()); }}---------------------------------------------
Player.h
Depois de:
virtual Player* getPlayer() {return this;};Adicione:
---------------------------------------------
Pronto... agora dê REBUILD ALL e divirta-se :icon1:
Não se esqueça de adicionar no data/commands.xml:
Credits: Zorzin
Obrigado,
Zorzin
Editado Dezembro 19 por Zorzin