Jump to content
  • 0

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.
  • Upvote 1

3 answers to this question

Recommended Posts

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...