Jump to content

[REQUEST] Give an aura to a player ?!


Recommended Posts

Posted
I want the player to benefit from an aura when he types the command of teleportation.

Yes, this is possible. Use similar code in teleport command handler:

    caster->CastSpell(caster,your_spell_id, false);

Posted

I have an error with :

Player *pPlayer = m_session->GetPlayer();

if(!pPlayer->isInCombat())

{

caster->CastSpell(caster,64886, false);

pPlayer->TeleportTo(1, -8501.848633, 2022.142334, 104.750320, 3.531070);

return true;

}

Error : identifier "caster" is undefined

Erreur : the left of '-> CastSpell' must point to a type class / struct / union / generic

And if I did it:

Player *pPlayer = m_session->GetPlayer();

if(!pPlayer->isInCombat())

{

pPlayer->CastSpell(caster,64886, false);

pPlayer->TeleportTo(1, -8501.848633, 2022.142334, 104.750320, 3.531070);

return true;

}

Error : Error : identifier "caster" is undefined

I do not know what to do ...

Posted

I try my script in the game and the player does not receive aura :

Player *pPlayer = m_session->GetPlayer();

if(!pPlayer->isInCombat())

{

pPlayer->CastSpell(pPlayer,64886, false);

pPlayer->TeleportTo(1, -8745.377930, 2342.961914, 116.156097, 4.496416);

return true;

}

Posted
wait a second, in the first post you said you want to have 64373 cast on player, now you use 64886 o.O

Oh my god, I had not seen!

I try to play and everything works perfectly, thank you all for your help!

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use