[C++] Pokemon Ghost System

Tony Araujo

OrochiElf
avatar
Visconde
Visconde

INFOS

Grupo: ViscondeRegistrado: 27/02/13Posts: 446Gênero: Masculino

[C++] Pokemon Ghost System



Fala galera da Eks, hoje eu venho postar pra vocês um conteúdo que particularmente eu acho muito bom.


Esse sistema faz com que o pokemon cuja o nome seja "Gastly, Haunter ou Gengar" (é possível adicionar mais pokemons), passe por dentro das paredes.



Instalação:


Vá em creature.cpp, e procure por



void Creature::getPathSearchParams(const Creature* creature, FindPathParams& fpp) const
{
fpp.fullPathSearch = !hasFollowPath;

E abaixo adicione:



if(creature->isPlayerSummon())
{
if(!creature->getMaster()->hasCondition(CONDITION_INFIGHT))
{
if(creature->getName() == "Gengar")
fpp.clearSight = false;
if(creature->getName() == "Haunter")
fpp.clearSight = false;
if(creature->getName() == "Gastly")
fpp.clearSight = false;
}
}

Espero que façam bom uso smile.png



Créditos:


Tony Araújo (OrochiElf)


Tony Araújo :happy:

Krono

avatar
Barão
Barão

INFOS

Grupo: BarãoRegistrado: 08/04/15Posts: 247

Muito bom! Gostaria de saber se está se especializando em pokemons? Tem muitos bons scripts.

Mais uma vez obrigado pelo conteudo, espero muito+ de voce pois ja conheço o seu potencial de outros foruns.

Tony Araujo

OrochiElf
avatar
Visconde
Visconde

INFOS

Grupo: ViscondeRegistrado: 27/02/13Posts: 446Gênero: Masculino

Eu estou desenvolvendo um servidor, que a ideologia principal é trazer o antigo svke de volta :)


Logo mais eu faço um tópico sobre ele :)


Tony Araújo :happy:

alanmtd

Nao interessa!
avatar
Artesão
Artesão

INFOS

Grupo: ArtesãoRegistrado: 13/04/13Posts: 148Gênero: MasculinoChar no Tibia: tempest flower

Desculpe reviver o tópico.

 

Oi orochi queria pedir sua ajuda.

Você criou um código pra sourcer para Pokemon.

 

Eu queria saber se é possível trocar isso para um player de tal vocation estiver usando um x item. Ele possa passar pela parede. em paredes configuraveis.

 

Queria que tivesse um código pra adicionar na sourcer mais que seja configurado em um script.

Mais se não der pode ser pela sourcer msm.

 

Não entendo muito de sourcer to tentando aprender. Mais isso daria certo?

 

 

if(creature->getVocation())

{

if(!creature->getMaster()->hasCondition(CONDITION_INFIGHT))

{

if(creature->getVocation() == "Obito")

fpp.clearSight = false;

}

}

 

 

 

Pode me ajudar?

zipter98

avatar
Herói
Herói

INFOS

Grupo: HeróiRegistrado: 20/09/12Posts: 2553Gênero: Masculino

 

if(Player* player = static_cast<Player*>(creature))
{
    if(player->getVocationId() == VOCATION_ID && !hasCondition(CONDITION_INFIGHT))   // Troque VOCATION_ID pela vocação do Obito.    
        fpp.clearSight = false;
}

Não respondo PMs solicitando suporte. Já existem seções no fórum para isto.

alanmtd

Nao interessa!
avatar
Artesão
Artesão

INFOS

Grupo: ArtesãoRegistrado: 13/04/13Posts: 148Gênero: MasculinoChar no Tibia: tempest flower

Isso se a vocação óbito estiver em infight ele pode atravessar qualquer parede?

Eu queria colocar somente algumas para serem atravessadas.se não fica ruim.

 

Queria que fosse configurada em uma script normal e que só da pra ele fazer isso se ele tiver um item com ele configurável. É possível?

lucashgas

avatar
Barão
Barão

INFOS

Grupo: BarãoRegistrado: 11/11/07Posts: 245

Desculpa reviver o tópico, mas como ficaria ao invés de usar o nome usar o outfit do player/monstro atravessar as paredes?

Te ajudei? Rep++


 

Luga03

Gabriel Lucena :D
avatar
Conde
Conde

INFOS

Grupo: CondeRegistrado: 14/04/15Posts: 956Gênero: Masculino
if(Player* player = static_cast<Player*>(creature))
{
    if(player->getVocationId() == VOCATION_ID && !hasCondition(CONDITION_INFIGHT))   // Troque VOCATION_ID pela vocação do Obito.    
        fpp.clearSight = false;
}

Iai gambada, estou com uma dúvida, quando usei está função acima que o zipeter adaptou, ela deu este erro:

 

https://gyazo.com/b11c08c2ac032d7bb75ffe411b68a314

 

Ta ai a função com a modificação do Zipter:

 

void Creature::getPathSearchParams(const Creature*, FindPathParams& fpp) const
{
fpp.fullPathSearch = !hasFollowPath;
if(Player* player = static_cast<Player*>(creature))
{
   if(player->getVocationId() == 1 && !hasCondition(CONDITION_INFIGHT))   // Troque VOCATION_ID pela vocação do Obito.    
       fpp.clearSight = false;
}
fpp.clearSight = true;
fpp.maxSearchDist = 12;
fpp.minTargetDist = fpp.maxTargetDist = 1;
}

 

Teria também como fazer para tipo, eu configurar as vocações que poderam passar pela parede, no config.lua?

 

Ex:

 

GhostVocations = {1, 2, 3, 4...}

Hello! How are you? It's fine? 

 

Okay, so you like my helps? if yes, then do you can like my post, give-me a reputation, you can't?

 

Good morning for everyone! And have a good day!

KaboFlow

avatar
Visconde
Visconde

INFOS

Grupo: ViscondeRegistrado: 04/07/17Posts: 434
Em 11/04/2015 em 22:09, Tony Araujo disse:

[C++] Pokemon Ghost System

 

 

 

 

Fala galera da Eks, hoje eu venho postar pra vocês um conteúdo que particularmente eu acho muito bom.

 

 

Esse sistema faz com que o pokemon cuja o nome seja "Gastly, Haunter ou Gengar" (é possível adicionar mais pokemons), passe por dentro das paredes.

 

 

 

 

 

Instalação:

 

 

Vá em creature.cpp, e procure por

 

 



void Creature::getPathSearchParams(const Creature* creature, FindPathParams& fpp) const

{

    fpp.fullPathSearch = !hasFollowPath;

 

 

E abaixo adicione:

 

 



if(creature->isPlayerSummon())

{

    if(!creature->getMaster()->hasCondition(CONDITION_INFIGHT))

    {

        if(creature->getName() == "Gengar")

            fpp.clearSight = false;

        if(creature->getName() == "Haunter")

            fpp.clearSight = false;

        if(creature->getName() == "Gastly")

            fpp.clearSight = false;

    }

}

 

 

Espero que façam bom uso http://www.tibiaking.com/forum/public/style_emoticons/default/smile.png

 

 

 

 

 

Créditos:

 

 

Tony Araújo (OrochiElf)

 

 

 

tentando em base PokeXtibia e nao da

 

errrrrrrraaaaa.thumb.png.56cd3e94fe47d808655f6e132758e7af.png