I want to have a new effect in the skill spell breaker.. I want it to work that whenever the caster breaks a target's spell, the specific spell that was casted will be on forced cooldown for 5 secs, the target can still cast other spells but not the disrupted one.. this is the part of the skill that disrupts the casting,
case SA_SPELLBREAKER:
{
int sp;
if(tsc && tsc->data[sC_MAGICROD]) {
sp = skill_get_sp(skill_id,skill_lv);
sp = sp * tsc->data[sC_MAGICROD]->val2 / 100;
if(sp < 1) sp = 1;
status_heal(bl,0,sp,2);
status_percent_damage(bl, src, 0, -20, false); //20% max SP damage.
} else {
struct unit_data *ud = unit_bl2ud(bl);
int bl_skill_id=0,bl_skill_lv=0,hp = 0;
if (!ud || ud->skilltimer == INVALID_TIMER)
break; //Nothing to cancel.
bl_skill_id = ud->skill_id;
bl_skill_lv = ud->skill_lv;
if (tstatus->mode & MD_BOSS)
{ //Only 10% success chance against bosses. [skotlex]
if (rnd()%100 < 90)
{ if (sd) clif_skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0);
break;
}
is this the code for the effect that i want?
if (sd) skill_blockpc_start (sd, ud->skill_id, 5000)? if it is the code, where should i put it? sorry i'm not that good at this..
I want to have a new effect in the skill spell breaker.. I want it to work that whenever the caster breaks a target's spell, the specific spell that was casted will be on forced cooldown for 5 secs, the target can still cast other spells but not the disrupted one.. this is the part of the skill that disrupts the casting,
case SA_SPELLBREAKER:
{
int sp;
if(tsc && tsc->data[sC_MAGICROD]) {
sp = skill_get_sp(skill_id,skill_lv);
sp = sp * tsc->data[sC_MAGICROD]->val2 / 100;
if(sp < 1) sp = 1;
status_heal(bl,0,sp,2);
status_percent_damage(bl, src, 0, -20, false); //20% max SP damage.
} else {
struct unit_data *ud = unit_bl2ud(bl);
int bl_skill_id=0,bl_skill_lv=0,hp = 0;
if (!ud || ud->skilltimer == INVALID_TIMER)
break; //Nothing to cancel.
bl_skill_id = ud->skill_id;
bl_skill_lv = ud->skill_lv;
if (tstatus->mode & MD_BOSS)
{ //Only 10% success chance against bosses. [skotlex]
if (rnd()%100 < 90)
{ if (sd) clif_skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0);
break;
}
is this the code for the effect that i want?
if (sd) skill_blockpc_start (sd, ud->skill_id, 5000) ? if it is the code, where should i put it? sorry i'm not that good at this..
Edited by dreinorShare this post
Link to post
Share on other sites