Jump to content
  • 0
Sign in to follow this  
prism

Assumptio Cancel Kyrie if Kyrie level is < 11

Question

Level 11 Kyrie and higher is possible with a certain build on my server. However, I wait to make it so that if a player casts Assumptio on a player that has Kyrie that is less than level 11, it will dispel it. I have the opposite working where if Kyrie level is less than level 11 it will cancel Assumptio. Getting the status level and canceling it is is my problem however.

 

I tried this in status.c

 

case SC_ASSUMPTIO:
            if (sc->data[sC_KYRIE] && sc->data[sC_KYRIE]->val1 < 11)
            status_change_end(bl, SC_KYRIE, INVALID_TIMER);
            break;

 

Also tried this in skill.c:

 

case HP_ASSUMPTIO:
            if( sd && dstmd )
                clif->skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0);
            else
                clif->skill_nodamage(src,bl,skill_id,skill_lv,
                    sc_start(src,bl,type,100,skill_lv,skill->get_time(skill_id,skill_lv)));
            if( tsc && tsc->data[sC_KYRIE] && tsc->data[sC_KYRIE]->val1 < 11 )
        {
            status_change_end(bl, SC_KYRIE, INVALID_TIMER);
            
        }
 
            break;
 
I've tried changing the val1 from 1-4 and the 11 to various numbers as well as reversing the > and <. but no luck getting what I want.

 

Code for canceling Assumptio for reference:

 

case PR_KYRIE:
        //case SL_KAAHI:
        case MER_KYRIE:
            clif->skill_nodamage(bl, bl, skill_id, -1,
                sc_start(src, bl, type, 100, skill_lv, skill->get_time(skill_id, skill_lv)));
            if( skill_lv < 11 )
        {
            status_change_end(bl, SC_ASSUMPTIO, INVALID_TIMER);
            
        }
            break;
Edited by prism

Share this post


Link to post
Share on other sites

2 answers to this question

Recommended Posts

  • 0

In status.c, find:

 

case SC_ASSUMPTIO:
			status_change_end(bl, SC_KYRIE, INVALID_TIMER);
			status_change_end(bl, SC_KAITE, INVALID_TIMER);
			break;

And comment these lines:

 

case SC_ASSUMPTIO:
			//status_change_end(bl, SC_KYRIE, INVALID_TIMER);
			//status_change_end(bl, SC_KAITE, INVALID_TIMER);
			break;

 

In skill.c, find:

 

		case PR_KYRIE:
		case MER_KYRIE:
		case SU_TUNAPARTY:

And replace for:

		case PR_KYRIE:
			clif->skill_nodamage(bl, bl, skill_id, -1,
				sc_start(src, bl, type, 100, skill_lv, skill->get_time(skill_id, skill_lv)));			
			if (tsc && tsc->data[SC_ASSUMPTIO] && tsc->data[SC_ASSUMPTIO]->val1 < 11)
				status_change_end(bl, SC_ASSUMPTIO, INVALID_TIMER);
			break;
		case MER_KYRIE:
		case SU_TUNAPARTY:

Later find:

 

		case HP_ASSUMPTIO:
			if( sd && dstmd )
				clif->skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0);
			else
				clif->skill_nodamage(src,bl,skill_id,skill_lv,
					sc_start(src,bl,type,100,skill_lv,skill->get_time(skill_id,skill_lv)));
                                        break;

And replace for:

case HP_ASSUMPTIO:
			if( sd && dstmd )
				clif->skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0);
			else
				clif->skill_nodamage(src,bl,skill_id,skill_lv,
					sc_start(src,bl,type,100,skill_lv,skill->get_time(skill_id,skill_lv)));
			if (tsc && tsc->data[SC_KYRIE] && tsc->data[SC_KYRIE]->val1 < 11)
				status_change_end(bl, SC_KYRIE, INVALID_TIMER);
			break;

 

This will cancel these states if the target have kyrie/assumptio lower level than 11.

 

The problems with this:

 

- If player get Assumptio/Kyrie by a NPC/Script, buffs can be stacked.

- Cancellation of buffs only can work by skills.

Share this post


Link to post
Share on other sites
  • 0

Thanks a lot! It's working perfectly.

 

Also thanks for the heads up. Good to keep in mind though I can't see myself giving out Kyrie/Assump through script.

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.