hi... can someone help me? i'm trying to customize sonic wave skill.. i want it to heal undead & dark element monsters/players but damage monsters of every other element.. i tried using this code.. the skill hits every other element but when it is targeted on dark/undead element monsters & players, it doesn't heal the target.. it misses.. can someone help me? here is the code that i used..
case RK_SONICWAVE: //Will heal dark and undead element monsters/players. if (tstatus->def_ele==ELE_UNDEAD || tstatus->def_ele==ELE_DARK) { int heal; heal = skill->calc_heal(ss,bl,sg->skill_id,sg->skill_lv,true); status->heal(bl,heal,0,1); break; if (status->isimmune(bl)) heal = 0; clif->skill_nodamage(&src->bl, bl, AL_HEAL, heal, 1); status->heal(bl, heal, 0, 0); } else {
hi... can someone help me? i'm trying to customize sonic wave skill.. i want it to heal undead & dark element monsters/players but damage monsters of every other element.. i tried using this code.. the skill hits every other element but when it is targeted on dark/undead element monsters & players, it doesn't heal the target.. it misses.. can someone help me? here is the code that i used..
case RK_SONICWAVE:
//Will heal dark and undead element monsters/players.
if (tstatus->def_ele==ELE_UNDEAD || tstatus->def_ele==ELE_DARK) {
int heal;
heal = skill->calc_heal(ss,bl,sg->skill_id,sg->skill_lv,true);
status->heal(bl,heal,0,1);
break;
if (status->isimmune(bl))
heal = 0;
clif->skill_nodamage(&src->bl, bl, AL_HEAL, heal, 1);
status->heal(bl, heal, 0, 0);
} else {
//Damage enemies
if(battle->check_target(&src->bl,bl,BCT_ENEMY)>0)
skill->attack(BF_MISC, ss, &src->bl, bl, sg->skill_id, sg->skill_lv, tick, 0);
}
break;
Share this post
Link to post
Share on other sites