Jump to content
  • 0
Sign in to follow this  
nasagnilac

Absorb Spirits Modification Help

Question

7 answers to this question

Recommended Posts

  • 0

How can I disable Absorb Spirit effect when the opponents already hide.

Do you mean by this example?

 

- You cast "Absorb Spirit" on the enemy but in mid casting, the enemy hides and his spheres still get absorbed? You want it so that the hiding cancels the absorb cast/or doesn't absorb when in hiding?

Share this post


Link to post
Share on other sites
  • 0

 

How can I disable Absorb Spirit effect when the opponents already hide.

Do you mean by this example?

 

- You cast "Absorb Spirit" on the enemy but in mid casting, the enemy hides and his spheres still get absorbed? You want it so that the hiding cancels the absorb cast/or doesn't absorb when in hiding?

yes it is.

Share this post


Link to post
Share on other sites
  • 0

 

 

How can I disable Absorb Spirit effect when the opponents already hide.

Do you mean by this example?

 

- You cast "Absorb Spirit" on the enemy but in mid casting, the enemy hides and his spheres still get absorbed? You want it so that the hiding cancels the absorb cast/or doesn't absorb when in hiding?

yes it is.

	case MO_ABSORBSPIRITS:		i = 0;		if (dstsd && dstsd->spiritball && (sd == dstsd || map_flag_vs(src->m) || (sd && sd->state.pvpmode && dstsd->state.pvpmode)) && ((dstsd->class_&MAPID_BASEMASK) != MAPID_GUNSLINGER || (dstsd->class_&MAPID_UPPERMASK) != MAPID_REBELLION || (dstsd->class_&MAPID_UPPERMASK) != MAPID_THIEF || (dstsd->class_&MAPID_UPPERMASK) != MAPID_ASSASSIN))		{	// split the if for readability, and included gunslingers in the check so that their coins cannot be removed [Reddozen]			i = dstsd->spiritball * 7;			pc_delspiritball(dstsd,dstsd->spiritball,0);		} else if (dstmd && !(tstatus->mode&MD_BOSS) && rnd() % 100 < 20)		{	// check if target is a monster and not a Boss, for the 20% chance to absorb 2 SP per monster's level [Reddozen]			i = 2 * dstmd->level;			mob_target(dstmd,src,0);		}		if (i) status_heal(src, 0, i, 3);		clif_skill_nodamage(src,bl,skill_id,skill_lv,i?1:0);		break;

HERE TRY IT!

Share this post


Link to post
Share on other sites
  • 0

I've just made up a solution.
open src/map/status.c
 

find:
 

// Applies even if the target hides
if ((skill->get_ele(skill_id,1) == ELE_EARTH && skill_id != MG_STONECURSE) // Ground type
 || (flag&1 && skill->get_nk(skill_id)&NK_NO_DAMAGE && skill_id != ALL_RESURRECTION )) // Buff/debuff skills started before hiding
hide_flag &= ~OPTION_HIDE;


Then just add this " && skill_id !=  MO_ABSORBSPIRITS "

It would be look like this:



if ((skill->get_ele(skill_id,1) == ELE_EARTH && skill_id != MG_STONECURSE) // Ground type
 || (flag&1 && skill->get_nk(skill_id)&NK_NO_DAMAGE && skill_id != ALL_RESURRECTION && skill_id !=  MO_ABSORBSPIRITS )) // Buff/debuff skills started before hiding
hide_flag &= ~OPTION_HIDE;


 

tested it ^_^

 

Sorry i dont know how to use box code

Edited by Ranz

Share this post


Link to post
Share on other sites
  • 0

I've just made up a solution.

open src/map/status.c

 

find:

 

// Applies even if the target hides
if ((skill->get_ele(skill_id,1) == ELE_EARTH && skill_id != MG_STONECURSE) // Ground type
 || (flag&1 && skill->get_nk(skill_id)&NK_NO_DAMAGE && skill_id != ALL_RESURRECTION )) // Buff/debuff skills started before hiding
hide_flag &= ~OPTION_HIDE;

 

Then just add this " && skill_id !=  MO_ABSORBSPIRITS "

 

It would be look like this:

 

if ((skill->get_ele(skill_id,1) == ELE_EARTH && skill_id != MG_STONECURSE) // Ground type
 || (flag&1 && skill->get_nk(skill_id)&NK_NO_DAMAGE && skill_id != ALL_RESURRECTION && skill_id !=  MO_ABSORBSPIRITS )) // Buff/debuff skills started before hiding
hide_flag &= ~OPTION_HIDE;

 

 

tested it ^_^

 

Sorry i dont know how to use box code

NICE !

Share this post


Link to post
Share on other sites

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.