Posts: 2
Threads: 1
Thanks Received:
0 in 0 posts
Thanks Given: 0
Joined: May 2023
Reputation:
0
Hello community.
I was wondering if it's possible when you activate premium that an additional skill can be performed.
which runs just as long as Premium.
creating the skill is no problem.
Installing it in the premium function is a bit complicated.
Can someone help me with that?
Thanks
Posts: 603
Threads: 73
Thanks Received:
0 in 0 posts
Thanks Given: 0
Joined: Aug 2011
Reputation:
0
you have some examples in the code already
after the else add something like this
if (d->m_pChar->m_premiumChar.isActive())
{
CSkill* pSkill = gserver->m_skillProtoList.Create(490, 1); //replace 490 with your ID
if (pSkill)
{
bool bApply = false;
ApplySkill(d->m_pChar, d->m_pChar, pSkill, -1, bApply);
if (!bApply)
{
GAMELOG << init("EVENT XMAS SKILL FAILED (LOGIN) ", d->m_pChar) << end;// ½ºÅ³ Àû¿ë ½ÇÆÐ
}
}
}
else
{
if(d->m_pChar->m_assist.FindBySkillIndex(490)) //replace 490 with your id
{
d->m_pChar->m_assist.CureBySkillIndex(490); //replace 490 with your id
}
}
Posts: 2
Threads: 1
Thanks Received:
0 in 0 posts
Thanks Given: 0
Joined: May 2023
Reputation:
0
Perfect
it is working.
Thanks so much