Jump to content
  • 0
Sign in to follow this  
Muyo

Luk and freezing

Question

On old emulator this do that LUK unfreeze more fast

 

src/map/status.c

 

case SC_FREEZE:			sc_def = status->mdef*100;			sc_def2 = status->luk*10;			tick = status->luk>249?0:tick; // luk:250 = unfreeze			break;

 

Now, the new emulator is (src/map/status.c)

 

case SC_FREEZE:		sc_def = st->mdef*100;		sc_def2 = st->luk*10 + SCDEF_LVL_DIFF(bl, src, 99, 10);		tick_def = 0; //No duration reduction

And if add this "tick = status->luk>249?0:tick;" gives error.

 

Sorry my english...

 

How do for not freeze with luk = 250?

 

Thanks

Share this post


Link to post
Share on other sites

12 answers to this question

Recommended Posts

  • 0

Sigh. The example above will give you at least 2 compiling errors.

 

case SC_FREEZE:		sc_def = st->mdef*100;		sc_def2 = st->luk*10 + SCDEF_LVL_DIFF(bl, src, 99, 10);		tick_def = st->luk*40;

Try this one, should reduce it in % manner. Every 25 luk will reduce duration by additinal 10%.

Like this:

25 luk -> 10% freeze time reduction

50 -> 20%

75 -> 30%

and so on. On 250 you'll reach immunity.

Share this post


Link to post
Share on other sites
  • 0

 

try add

 

tick_def = st->luk>249?0:tick_def;

 

I try this

 

case SC_FREEZE:		sc_def = st->mdef*100;		sc_def2 = st->luk*10 + SCDEF_LVL_DIFF(bl, src, 99, 10);		tick_def = 0; //No duration reduction		tick_def = st->luk>249?0:tick_def;

but no sucess. Time of unfreeze continue even. More idea?

Share this post


Link to post
Share on other sites
  • 0

Umm, tick_def is the reduction. In your case, you just set it up to 0 :D Of course it had no effect. Try it like this:

case SC_FREEZE:		sc_def = st->mdef*100;		sc_def2 = st->luk*10 + SCDEF_LVL_DIFF(bl, src, 99, 10);		tick_def = (st->luk>249)?10000:0;

Share this post


Link to post
Share on other sites
  • 0

 

 

try add

 

tick_def = st->luk>249?0:tick_def;

 

I try this

 

case SC_FREEZE:		sc_def = st->mdef*100;		sc_def2 = st->luk*10 + SCDEF_LVL_DIFF(bl, src, 99, 10);		tick_def = 0; //No duration reduction		tick_def = st->luk>249?0:tick_def;

but no sucess. Time of unfreeze continue even. More idea?

I gave changed line, this mean need remove old "tick_def = 0; //No duration reduction"

Share this post


Link to post
Share on other sites
  • 0

 

Umm, tick_def is the reduction. In your case, you just set it up to 0 :D Of course it had no effect. Try it like this:

case SC_FREEZE:		sc_def = st->mdef*100;		sc_def2 = st->luk*10 + SCDEF_LVL_DIFF(bl, src, 99, 10);		tick_def = (st->luk>249)?10000:0;

 

I tried this and continue slow.

 

 

 

 

 

try add

 

tick_def = st->luk>249?0:tick_def;

 

I try this

 

case SC_FREEZE:		sc_def = st->mdef*100;		sc_def2 = st->luk*10 + SCDEF_LVL_DIFF(bl, src, 99, 10);		tick_def = 0; //No duration reduction		tick_def = st->luk>249?0:tick_def;

but no sucess. Time of unfreeze continue even. More idea?

I gave changed line, this mean need remove old "tick_def = 0; //No duration reduction"

 

Ok, too tried this and no success, slow for unfreeze.

 

=[ 

 

More idea?  Please, say "yes".

Share this post


Link to post
Share on other sites
  • 0

Wait wait wait. According to the code you gave there was no reduction to the freeze time whatsoever, just after 250 luk you were pretty much immune to the status change. Like with curse and 100 vit - status still strikes, but is removed same moment.

Can you clearify what do you want? So that luk would bring linear reduction to freeze time? Or % reduction? How much each point of luck should reduce?

Share this post


Link to post
Share on other sites
  • 0

Wait wait wait. According to the code you gave there was no reduction to the freeze time whatsoever, just after 250 luk you were pretty much immune to the status change. Like with curse and 100 vit - status still strikes, but is removed same moment.

Can you clearify what do you want? So that luk would bring linear reduction to freeze time? Or % reduction? How much each point of luck should reduce?

 

Dude, in little words. More luk the player = less time frozen. 
 
Equal the cause of curse with VIT.

Share this post


Link to post
Share on other sites
  • 0
case SC_FREEZE:		sc_def = st->mdef*100;		sc_def2 = st->luk*10 + SCDEF_LVL_DIFF(bl, src, 99, 10);		tick_def = 0; //No duration reduction		tick_def = st->luk>249?0:tick_def;

to this.

case SC_FREEZE:                sc_def = status->mdef*100;                sc_def2 = status->luk*100/35 + status_get_lv(bl)*10 - status_get_lv(src)*10;                tick_def2 = status->luk*10 + status_src->luk*-10; // Caster can increase final duration with luk

 

or refer to this http://rathena.org/board/topic/99448-about-frozen-and-luk-resistane/

Share this post


Link to post
Share on other sites
  • 0

Sigh. The example above will give you at least 2 compiling errors.

 

case SC_FREEZE:		sc_def = st->mdef*100;		sc_def2 = st->luk*10 + SCDEF_LVL_DIFF(bl, src, 99, 10);		tick_def = st->luk*40;

Try this one, should reduce it in % manner. Every 25 luk will reduce duration by additinal 10%.

Like this:

25 luk -> 10% freeze time reduction

50 -> 20%

75 -> 30%

and so on. On 250 you'll reach immunity.

 

Thanks, love. But... one question. How I can increase or decrease the need for LUK? Can you explain this "equation"? Maybe change of 250 for 300.

 

(Sorry my english xD)

 

 

I LOVE YOU!

Edited by Muyo

Share this post


Link to post
Share on other sites
  • 0

It's pretty simple, first thing you'll need to know is that max for tick_def is 10000 (100%). Out of this and luk that you want immunity on you solve simple equation:

x = 10000 / ChosenLuk;

 

After that just change this line:

 

tick_def = st->luk*40;

to

tick_def = st->luk*x;

Where x is the result of equation.

Example: You want immunity on 300 luk, that means

x = 10000 / 300;

x = 34;

(It's for you to decide where to round, up or down. I rounded up. That measn that actual luk you'll need for immunity is 295. If you round it down, then needed luk will be 303)

So the resulting line will be:

tick_def = st->luk*34;
Edited by Garr

Share this post


Link to post
Share on other sites
  • 0

 

It's pretty simple, first thing you'll need to know is that max for tick_def is 10000 (100%). Out of this and luk that you want immunity on you solve simple equation:

x = 10000 / ChosenLuk;

 

After that just change this line:

 

tick_def = st->luk*40;

to

tick_def = st->luk*x;

Where x is the result of equation.

Example: You want immunity on 300 luk, that means

x = 10000 / 300;

x = 34;

(It's for you to decide where to round, up or down. I rounded up. That measn that actual luk you'll need for immunity is 295. If you round it down, then needed luk will be 303)

So the resulting line will be:

tick_def = st->luk*34;

 

Thank you. = ]

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.