Jump to content
  • 0
Sign in to follow this  
dreinor

Sage Skill Hindsight

Question

 

	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?

 

( wd.flag&BF_SKILLMASK && sc && sc->data[sC_AUTOSPELL] && rnd()%100 < sc->data[sC_AUTOSPELL]->val4)

 

I tried adding the bold line to the code but it doesn't seem to work.. can someone help me? please? thanks...

Edited by dreinor

Share this post


Link to post
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.