Jump to content
  • 0

Dispel Chance when Enemy has GTB


Linkin Park

Question


  • Group:  Members
  • Topic Count:  42
  • Topics Per Day:  0.01
  • Content Count:  227
  • Reputation:   11
  • Joined:  11/16/11
  • Last Seen:  

How can I make Professors to be able to dispel enemies wearing GTB with chance, let's say 30% chance to dispel an enemy even though he is wearing GTB.

I checked the SA_DISPELL in skill.c and I think this is where the part where it won't dispel those who has GTB


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

Edited by RaGERO
Link to comment
Share on other sites

10 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  42
  • Topics Per Day:  0.01
  • Content Count:  227
  • Reputation:   11
  • Joined:  11/16/11
  • Last Seen:  

Thanks it's working :)

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  40
  • Topics Per Day:  0.01
  • Content Count:  587
  • Reputation:   104
  • Joined:  11/19/11
  • Last Seen:  

if(status_isimmune(bl) || !tsc || !tsc->count)

change to

if((status_isimmune(bl) &&!tsc->data[sC_HERMODE] && rnd()%100 > 30  ) || !tsc || !tsc->count)

Edited by QQfoolsorellina
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  42
  • Topics Per Day:  0.01
  • Content Count:  227
  • Reputation:   11
  • Joined:  11/16/11
  • Last Seen:  

if(status_isimmune(bl) || !tsc || !tsc->count)

change to

if((status_isimmune(bl) &&!tsc->data[sC_HERMODE] && rnd()%100 < 30  ) || !tsc || !tsc->count)

How about if the Professor is Soul Linked he can dispell those with GTBs by 30%

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  40
  • Topics Per Day:  0.01
  • Content Count:  587
  • Reputation:   104
  • Joined:  11/19/11
  • Last Seen:  

not sure whether it work or not , I am not that good at src edit :)

if(sc && sc->data[sC_SPIRIT] && sc->data[sC_SPIRIT]->val2 == SL_SAGE && status_isimmune(bl) && !tsc->data[sC_HERMODE] && rnd()%100 < 70 || !tsc || !tsc->count || status_isimmune(bl) && tsc && tsc->data[sC_HERMODE] )
   break;

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  42
  • Topics Per Day:  0.01
  • Content Count:  227
  • Reputation:   11
  • Joined:  11/16/11
  • Last Seen:  

not sure whether it work or not , I am not that good at src edit :)

if(sc && sc->data[sC_SPIRIT] && sc->data[sC_SPIRIT]->val2 == SL_SAGE && status_isimmune(bl) && !tsc->data[sC_HERMODE] && rnd()%100 < 70 || !tsc || !tsc->count || status_isimmune(bl) && tsc && tsc->data[sC_HERMODE] )
break;

Thank you! Hope it works, I'll test it out tomorrow :D

-----------

Doesn't work, it completely fail the dispell even the enemy has no GTB card on it when the Professor has Soul Link

BUT

When the Professor has no Soul Link, it can dispel the enemy 100% chance even with GTB Card.

Edited by RaGERO
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  40
  • Topics Per Day:  0.01
  • Content Count:  587
  • Reputation:   104
  • Joined:  11/19/11
  • Last Seen:  

skill.c

int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, int skillid, int skilllv, unsigned int tick, int flag)
{
struct map_session_data *sd, *dstsd;
struct mob_data *md, *dstmd;
struct homun_data *hd;
struct mercenary_data *mer;
struct status_data *sstatus, *tstatus;
struct status_change *tsc;
struct status_change_entry *tsce;
+	struct status_change *sc = status_get_sc(src);

and replace this

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

with

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

don't forget compile

It work for me !!

Edited by QQfoolsorellina
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  30
  • Topics Per Day:  0.01
  • Content Count:  782
  • Reputation:   82
  • Joined:  01/01/12
  • Last Seen:  

Pardon for asking but this will dispell the GTB's effect or dispell the buff that target has?

Edit: Oops, dispell doesn't have duration so it must be dispelling buff.

Edited by darristan
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  11
  • Topics Per Day:  0.00
  • Content Count:  196
  • Reputation:   72
  • Joined:  12/12/11
  • Last Seen:  

@QQfoolsorellina

Do you know how to Dispell check target cast skill

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  40
  • Topics Per Day:  0.01
  • Content Count:  587
  • Reputation:   104
  • Joined:  11/19/11
  • Last Seen:  

@QQfoolsorellina

Do you know how to Dispell check target cast skill

just make a guess :)

if(dstsd.ud->skilltimer != INVALID_TIMER &&  dstsd.ud->skillid == SKIllname )

Edited by QQfoolsorellina
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  11
  • Topics Per Day:  0.00
  • Content Count:  196
  • Reputation:   72
  • Joined:  12/12/11
  • Last Seen:  

@QQfoolsorellina

Thank you :)

Link to comment
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...