if (sc && sc->data[SC_AUTOSPELL] && rnd()%100 < sc->data[SC_AUTOSPELL]->val4) { int sp = 0; uint16 skill_id = sc->data[SC_AUTOSPELL]->val2; uint16 skill_lv = sc->data[SC_AUTOSPELL]->val3; int i = rnd()%100; if (sc->data[SC_SOULLINK] && sc->data[SC_SOULLINK]->val2 == SL_SAGE) i = 0; //Max chance, no skill_lv reduction. [Skotlex] if (i >= 50) skill_lv -= 2; else if (i >= 15) skill_lv--; if (skill_lv < 1) skill_lv = 1; sp = skill->get_sp(skill_id,skill_lv) * 2 / 3; if (status->charge(src, 0, sp)) { switch (skill->get_casttype(skill_id)) { case CAST_GROUND: skill->castend_pos2(src, target->x, target->y, skill_id, skill_lv, tick, flag); break; case CAST_NODAMAGE: skill->castend_nodamage_id(src, target, skill_id, skill_lv, tick, flag); break; case CAST_DAMAGE: skill->castend_damage_id(src, target, skill_id, skill_lv, tick, flag); break; } } }
this is the code for the sage skill hindsight/autospell.. it is only triggered by melee auto attacks.. i want to customize the skill so that melee skills like bash, envenom & magnum break will also trigger the spell.. in short, i want skills to affect the activation of the spells.. can someone help me on this?
I tried adding the bold line to the code but it doesn't seem to work.. can someone help me? please? thanks...
Edited by dreinorShare this post
Link to post
Share on other sites