Jump to content
  • 0

(solved) Stone Curse Success Chance


Question

Posted (edited)

Where do I look to change the success rate of MG_STONECURSE?
I want to make Lv1 at 20% chance and +10% chance for each level.

	case NPC_PETRIFYATTACK:
		sc_start2(src,bl,SC_STONEWAIT,(16+4*skill_lv),skill_lv,src->id,skill_get_time2(skill_id,skill_lv),skill_get_time(skill_id, skill_lv));
		break;

Is this correct?

Edited by jamesandrew

1 answer to this question

Recommended Posts

  • 1
Posted

Why are you editing NPC_PETRIFYATTACK instead MG_STONECURSE?

find

	case MG_STONECURSE:
		{
			if (status_has_mode(tstatus,MD_STATUSIMMUNE)) {
				if (sd)
					clif_skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0);
				break;
			}
			if(status_isimmune(bl) || !tsc)
				break;

			int32 brate = 0;

			if (sd && sd->sc.getSCE(SC_PETROLOGY_OPTION))
				brate = sd->sc.getSCE(SC_PETROLOGY_OPTION)->val3;

			if (sc_start2(src, bl, type, (skill_lv * 4 + 20) + brate, skill_lv, src->id, skill_get_time2(skill_id, skill_lv), skill_get_time(skill_id, skill_lv)))
				clif_skill_nodamage(src, bl, skill_id, skill_lv, 1);
			else if(sd) {
				clif_skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0);
				// Level 6-10 doesn't consume a red gem if it fails [celest]
				if (skill_lv > 5)
				{ // not to consume items
					map_freeblock_unlock();
					return 0;
				}
			}
		}
		break;

change to

	case MG_STONECURSE:
		{
			if (status_has_mode(tstatus,MD_STATUSIMMUNE)) {
				if (sd)
					clif_skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0);
				break;
			}
			if(status_isimmune(bl) || !tsc)
				break;

			int32 brate = 0;

			if (sd && sd->sc.getSCE(SC_PETROLOGY_OPTION))
				brate = sd->sc.getSCE(SC_PETROLOGY_OPTION)->val3;

			brate += 20 + (skill_lv - 1) * 10;

			if (sc_start2(src, bl, type, brate, skill_lv, src->id, skill_get_time2(skill_id, skill_lv), skill_get_time(skill_id, skill_lv)))
				clif_skill_nodamage(src, bl, skill_id, skill_lv, 1);
			else if(sd) {
				clif_skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0);
				// Level 6-10 doesn't consume a red gem if it fails [celest]
				if (skill_lv > 5)
				{ // not to consume items
					map_freeblock_unlock();
					return 0;
				}
			}
		}
		break;

 

  • MVP 1

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...