Jump to content
  • 0

Super Novice Link


Question

Posted

Hi ! Can you teach me how to make this 10% chance ? Because on this topic they made it 100% .. I dont know how to make it 10% only 

SUPER NOVICE SPIRIT SKILL

- Super Novices above LV 90 have 1% chance to 'erase' the death record - which means, the last 1% EXP loss will be recovered.

 

3 answers to this question

Recommended Posts

  • 0
Posted (edited)

Go to the same line and simply remove a 0 from the 100 after rnd()%

it should look like this:

		if (skill_id == SL_SUPERNOVICE && dstsd && dstsd->die_counter && !(rnd()%10))
		{	//Erase death count 1% of the casts
			pc_setparam(dstsd, SP_PCDIECOUNTER, 0);
			clif_specialeffect(bl, EF_ANGEL2, AREA);
			//SC_SPIRIT invokes status_calc_pc for us.
		}

 

Edited by TheKingDino
  • Upvote 1
  • 0
Posted
1 minute ago, TheKingDino said:

Go to the same line and simply remove a 0 from the 100 after rnd()%

it should look like this:

		if (skill_id == SL_SUPERNOVICE && dstsd && dstsd->die_counter && !(rnd()%10))
		{	//Erase death count 1% of the casts
			pc_setparam(dstsd, SP_PCDIECOUNTER, 0);
			clif_specialeffect(bl, EF_ANGEL2, AREA);
			//SC_SPIRIT invokes status_calc_pc for us.
		}

 

Thanks ! I will try this

  • 0
Posted (edited)

If I understand this correctly: The idea is the random number is divisible by 100, aka a 1 in 100 chance. So a 10 would make in a 1 in 10 chance.

Because ! means "NOT" and && means "and" when it's checking.

% is the modulus operator


Someone smarter can correct me if I'm wrong! I'm p sure that's the idea though.

Edited by TheKingDino

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