Jump to content
  • 0
mawjustin

Bypass GTB when Professor is on Soul Link

Question

Posted (edited)

Hi Team,

How do we do this? bypass when in Soul Link?

I understand that this enables Dispel on GTB. But can we add an additional script that it will only work if the player (Sage/Professor) is on Soul Link?

if((status_isimmune(bl) &&!tsc->data[SC_HERMODE] && rnd()%100 > 30  ))
				break;

I tried this, but no luck.


 if((status_isimmune(bl) &&!tsc->data[SC_HERMODE] && sd->sc.data[SC_SPIRIT] && sd->sc.data[SC_SPIRIT]->val2 == SL_SAGE && rnd()%100 > 30  ))
				break;

 

This is from src/map/skill.cpp

	case SA_DISPELL:
		if (flag&1 || (i = skill_get_splash(skill_id, skill_lv)) < 1) {
			if (sd && dstsd && !map_flag_vs(sd->bl.m) && (!sd->duel_group || sd->duel_group != dstsd->duel_group) && (!sd->status.party_id || sd->status.party_id != dstsd->status.party_id))
				break; // Outside PvP it should only affect party members and no skill fail message
			clif_skill_nodamage(src,bl,skill_id,skill_lv,1);
			if((dstsd && (dstsd->class_&MAPID_UPPERMASK) == MAPID_SOUL_LINKER)
				|| (tsc && tsc->data[SC_SPIRIT] && tsc->data[SC_SPIRIT]->val2 == SL_ROGUE) //Rogue's spirit defends againt dispel.
				|| rnd()%100 >= 50+10*skill_lv)
			{
				if (sd)
					clif_skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0);
				break;
			}
			if((status_isimmune(bl) &&!tsc->data[SC_HERMODE] && rnd()%100 > 30  ))
				break;

			//Remove bonus_script by Dispell
			if (dstsd)
				pc_bonus_script_clear(dstsd,BSF_REM_ON_DISPELL);

			if(!tsc || !tsc->count)
				break;

			for(i=0;i<SC_MAX;i++) {
				if (!tsc->data[i])
					continue;
				switch (i) {

 

 

Edit: 

Found a fix on this one: from

 

Just change 

clif_skill_fail(sd,skillid,USESKILL_FAIL_LEVEL,0);

to

clif_skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0);

And fix the typo.. from sC to SC

	case SA_DISPELL:
		if (flag&1 || (i = skill_get_splash(skill_id, skill_lv)) < 1) {
			if (sd && dstsd && !map_flag_vs(sd->bl.m) && (!sd->duel_group || sd->duel_group != dstsd->duel_group) && (!sd->status.party_id || sd->status.party_id != dstsd->status.party_id))
				break; // Outside PvP it should only affect party members and no skill fail message
			clif_skill_nodamage(src,bl,skill_id,skill_lv,1);
			if((dstsd && (dstsd->class_&MAPID_UPPERMASK) == MAPID_SOUL_LINKER)
				|| (tsc && tsc->data[SC_SPIRIT] && tsc->data[SC_SPIRIT]->val2 == SL_ROGUE) //Rogue's spirit defends againt dispel.
				|| rnd()%100 >= 50+10*skill_lv)
			{
				if (sd)
					clif_skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0);
				break;
			}

  	 		if(sc && sc->data[SC_SPIRIT] && sc->data[SC_SPIRIT]->val2 == SL_SAGE && status_isimmune(bl) && !tsc->data[SC_HERMODE] && rnd()%100 < 70 
			|| status_isimmune(bl) && !(sc && sc->data[SC_SPIRIT] && sc->data[SC_SPIRIT]->val2 == SL_SAGE) ){
				if (sd)
					clif_skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0);
				break;
			}

			//Remove bonus_script by Dispell

 

Edited by mawjustin
found a fix.

Share this post


Link to post
Share on other sites

3 answers to this question

Recommended Posts

  • 0

Hello! is chance percentage working? i tried this before when i change to low chances it keeps dispel, in short chance of percentage is not working

Share this post


Link to post
Share on other sites
  • 0

separate the condition to make it work.

Share this post


Link to post
Share on other sites
  • 0
17 hours ago, BeWan said:

separate the condition to make it work.

Hello sir, how to separate it to make it work?

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.   Paste as plain text instead

  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.


×
×
  • Create New...

Important Information

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