Jump to content
  • 0

(solved) Stone Curse Success Chance


jamesandrew

Question


  • Group:  Members
  • Topic Count:  23
  • Topics Per Day:  0.07
  • Content Count:  59
  • Reputation:   3
  • Joined:  06/21/23
  • Last Seen:  

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
Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 1

  • Group:  Members
  • Topic Count:  3
  • Topics Per Day:  0.01
  • Content Count:  39
  • Reputation:   30
  • Joined:  06/08/23
  • Last Seen:  

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