[7.6] Setoutfit V2.0

  • 1
  • 2

frerety

DVNO
avatar
Artesão
Artesão

INFOS

Grupo: ArtesãoRegistrado: 08/04/06Posts: 133

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 &param){     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 &param){

       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 &param);

e adicione abaixo disso:

 

    bool Commands::outFit(Creature* c, const std::string &cmd, const std::string &param);

 

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!

It's the hunger; the hunger for an alternative and the refusal to accept a life of unhappiness.


bruxo

avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 30/12/05Posts: 45

Aeee

Valeu ae, agora vo poder terminar o meu sistema ^^.

Muito obrigado!

Muito bom code!

~~Mundo de Mirage, online

Para mais informações: www.mundodemirage.com

frerety

DVNO
avatar
Artesão
Artesão

INFOS

Grupo: ArtesãoRegistrado: 08/04/06Posts: 133

@Bruxo

Ty... mas... soh uma perguntinha d curioso msm... q sistema eh esse? :bigsmile:

FlW

CyA!

PS .: Qq coisa se alguem naum tiver entendendo o code posta aki msm que eu respondo

It's the hunger; the hunger for an alternative and the refusal to accept a life of unhappiness.


colex

Serviços Prestados a Comunidade
avatar
Visconde
Visconde

INFOS

Grupo: ViscondeRegistrado: 03/10/05Posts: 301Gênero: Masculino

agora ficou mt mais legal

vlws

good work

cya~~ :bye:

bruxo

avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 30/12/05Posts: 45

Sistema de Cavalaria ^^.

90% agora ^^.

Tú sabe como eu ponho pra trancar os outfits de todos os players? Mas que ainda possa trokar as cores?

~~Mundo de Mirage, online

Para mais informações: www.mundodemirage.com

frerety

DVNO
avatar
Artesão
Artesão

INFOS

Grupo: ArtesãoRegistrado: 08/04/06Posts: 133
Sistema de Cavalaria ^^.

90% agora ^^.

Tú sabe como eu ponho pra trancar os outfits de todos os players? Mas que ainda possa trokar as cores?

 

 

 

como assim trancar os outfits dos players? não dar pra mudar o "estilo" da roupa, mas podendo mudar as cores?

FlW

CyA!

It's the hunger; the hunger for an alternative and the refusal to accept a life of unhappiness.


bruxo

avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 30/12/05Posts: 45
como assim trancar os outfits dos players? não dar pra mudar o "estilo" da roupa, mas podendo mudar as cores?

FlW

CyA!

 

 

 

Sim ^^.

Você está trabalhando em algum projeto?

~~Mundo de Mirage, online

Para mais informações: www.mundodemirage.com

frerety

DVNO
avatar
Artesão
Artesão

INFOS

Grupo: ArtesãoRegistrado: 08/04/06Posts: 133

@bruxo

ISSO NÃO É UM COMPLEMENTO DO CODE ACIMA, É APENAS UM PEDIDO DE UM CODE QUE O BRUXO ME FEZ, PORTANTO NÃO TEM NADA A VER COM O TOPICO ACIMA!

protocol76.cpp

procure:

void Protocol76::parseSetOutfit(NetworkMessage &msg)

agora nessa função localize:

  player->looktype= temp;

  player->lookmaster = player->looktype;

  player->lookhead=msg.GetByte();

  player->lookbody=msg.GetByte();

  player->looklegs=msg.GetByte();

  player->lookfeet=msg.GetByte();

Troque isso por:

//  player->looktype= temp;

//  player->lookmaster = player->looktype;

  player->lookhead=msg.GetByte();

  player->lookbody=msg.GetByte();

  player->looklegs=msg.GetByte();

  player->lookfeet=msg.GetByte();

Agora os players poderão trocar a cor da roupa, mas não poderão trocar o "estilo" dela.

PS .: naum toh trabalhando em nenhum projeto naum, toh soh aprendenu a programar, e eu aprendo fazendo codes, indende? :icon1: intaum por issu q toh postanu mts codes esses dias (embora a maioria inútil, eu sei... :confused: )... ainda soh noobaum em programação... ;(:

FlW

CyA!

It's the hunger; the hunger for an alternative and the refusal to accept a life of unhappiness.


bruxo

avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 30/12/05Posts: 45

Já testo isso ae, antes vou comer hehehe.

Vlw ae ^^.

~~Mundo de Mirage, online

Para mais informações: www.mundodemirage.com

frerety

DVNO
avatar
Artesão
Artesão

INFOS

Grupo: ArtesãoRegistrado: 08/04/06Posts: 133

e ae, bruxo, funcionô? era issu msm o que vc pdiu? <too short, i know...> <srry>

FlW

CyA!

It's the hunger; the hunger for an alternative and the refusal to accept a life of unhappiness.


GM Tavin

avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 20/03/06Posts: 46

vixi bem loko =) soh aprendendo aqui hehe

Last Sign

 

user posted imageuser posted imageuser posted image

 

user posted imageuser posted image

 

~[Gifts]~

 

[

Kih]

 

First Present by Killera ;D Ty =*

Sir Picaralhos

Lendário XTibiano =)
avatar
Artesão
Artesão

INFOS

Grupo: ArtesãoRegistrado: 08/10/05Posts: 114

Muito r0x

mas parece que tem um bug

pq tem gente que de algum jeito sabe como trocar a roupa ainda

eu ainda num descobri como mas ela consegue trocar a roupa

=/

se vc sabe o jeito que eles ta trocando e sabe como arrumar fala ae plx

vlw abraços

--- EDIT ---

Ah só entendi agora

é que tipo o serve num eh meu dai o kra falo que fez um que tava parecido com o seu tuto

soh que players tavam conseguindo faze tbm

dai vo ve aki com ele se eh pq ta essa parade de access_du_gm

vlw abraços

--- EDIT ---

Atenciosamente,

Sir Picaralhos.

janniferjopeseo9.jpg

janniferjopesbarjd6.jpg

userbar172527ez3.gif

frerety

DVNO
avatar
Artesão
Artesão

INFOS

Grupo: ArtesãoRegistrado: 08/04/06Posts: 133

@Sir Picaralhos

não estou entendendo, vc está falando de players usando o comando? se sim você terá que adicionar o access="ACCESS_DU_GM" em "commands.xml", que fica dentro da pasta "data";

Caso vc esteja falando de não conseguir alterar o outfit, lembre-se... vc terá que digitar "/of [bIXO],[NOME]". Observe que depois da vírgula não há espaço... ^^...

si naum for issu, seja mais específico... ^^

FlW

CyA!

It's the hunger; the hunger for an alternative and the refusal to accept a life of unhappiness.


gibim

avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 05/01/06Posts: 13

mt RoX se um dia eu tiveh um OT eu add issu :)

xita

avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 04/08/07Posts: 3
mt RoX se um dia eu tiveh um OT eu add issu :)

e ai como eu posso coloca ot online por favor fala com andre: meu msn: andre.rodrigues.15@hotmail.com:fmz ser vcs tiver resposta como coloca me add no msn fmz vlw

  • 1
  • 2