Jump to content
  • 0

Stun/Freeze/Stone effect


Davi

Question


  • Group:  Members
  • Topic Count:  9
  • Topics Per Day:  0.00
  • Content Count:  28
  • Reputation:   0
  • Joined:  10/12/15
  • Last Seen:  

Hello people !

When a character get freeze, stun or stone curse effect, it takes so much time to end.
I need to reduce this time according the luk of the player that receive this atack/status.

If the player has luk 300,  the time has to be almost nothing, like 100 milliseconds, 310luk= 50 milliseconds, 320luk= no freeze/stun/stone cursed.

Thanks for now.

Link to comment
Share on other sites

12 answers to this question

Recommended Posts

  • 0

  • Group:  Developer
  • Topic Count:  34
  • Topics Per Day:  0.01
  • Content Count:  804
  • Reputation:   230
  • Joined:  01/30/13
  • Last Seen:  

Well if you want to do it properly and only want to change the duration and nothing else, then you have to do the math.

How much % reduction should each point in LUK give so that at 320 LUK, you have 100% resist?

100%/320 = 0.3125%

Unfortunately that's an odd number the program can't properly work with in its current state. You could give 0.31% reduction per LUK, then at 320 LUK you'd have 320*0.31% = 99.2% reduction.

So for example for freeze, you could put something like:

		case SC_FREEZE:
			sc_def = status->mdef*100;
			sc_def2 = status->luk*10 + status_get_lv(bl)*10 - status_get_lv(src)*10;
			tick_def = status->luk*31;
			tick_def2 = 0;
			break;

See the luk*31? There I define that each point in LUK should reduce the duration by 0.31%.

Keep in mind that MDEF will now only reduce the chance but not the duration anymore.

Edited by Playtester
  • Like 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  3
  • Topics Per Day:  0.00
  • Content Count:  70
  • Reputation:   21
  • Joined:  11/08/15
  • Last Seen:  

 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  9
  • Topics Per Day:  0.00
  • Content Count:  28
  • Reputation:   0
  • Joined:  10/12/15
  • Last Seen:  

His explanation does not worked for me, maybe i didn't understant him.  i did the alteration but nothing has changed.
 

 

Now it's worked, exactly in luk320 i can't freeze, but if i have 319luk i freeze for long time, now i need to increase the time of freeze according luk decrease.

 

if anyone can help with this, i'll be gratefull.
 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  9
  • Topics Per Day:  0.00
  • Content Count:  28
  • Reputation:   0
  • Joined:  10/12/15
  • Last Seen:  

So thanks ! it worked !

But i tried to do the same thing in other status like Stun, Stone curse, Sleep, etc, and doesn't worked.

Is it different in each one ? I really need to make all these status effects working at the same way.

Link to comment
Share on other sites

  • 0

  • Group:  Developer
  • Topic Count:  34
  • Topics Per Day:  0.01
  • Content Count:  804
  • Reputation:   230
  • Joined:  01/30/13
  • Last Seen:  

Well show me what code you put for the other status changes and I can tell you what's wrong.

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  9
  • Topics Per Day:  0.00
  • Content Count:  28
  • Reputation:   0
  • Joined:  10/12/15
  • Last Seen:  

On 24/11/2017 at 7:38 PM, Playtester said:

Well show me what code you put for the other status changes and I can tell you what's wrong.

i tried the same code as freeze.

Freeze status now is :
case SC_FREEZE:
        if (status->luk >= 320)// This means if(Luk = 320) Player is immune.
                return 0;
            sc_def = status->mdef*100;
            sc_def2 = status->luk*10 + status_get_lv(bl)*10 - status_get_lv(src)*10;
            tick_def = status->luk*32;
            tick_def2 = 0; // Caster can increase final duration with luk
            break;

Working perfectly like i want, now i need the same with the other status:
Stun;

Silence;

Sleep;

Stone curse;

Blind.

i need these status duration reducing according luk increase, and when luk is 320, immunity. 

 

Thanks!

Link to comment
Share on other sites

  • 0

  • Group:  Developer
  • Topic Count:  34
  • Topics Per Day:  0.01
  • Content Count:  804
  • Reputation:   230
  • Joined:  01/30/13
  • Last Seen:  

You didn't show me what code you put for the other status changes and I'm not going to write the full code for you. Just understand the changes I did to the code and apply the same changes to the other status changes.

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  9
  • Topics Per Day:  0.00
  • Content Count:  28
  • Reputation:   0
  • Joined:  10/12/15
  • Last Seen:  

16 hours ago, Playtester said:

You didn't show me what code you put for the other status changes and I'm not going to write the full code for you. Just understand the changes I did to the code and apply the same changes to the other status changes.

i copy and paste this part : 


tick_def = status->luk*32;
            tick_def2 = 0; // Caster can increase final duration with luk
            break;

i just did it.

Link to comment
Share on other sites

  • 0

  • Group:  Developer
  • Topic Count:  34
  • Topics Per Day:  0.01
  • Content Count:  804
  • Reputation:   230
  • Joined:  01/30/13
  • Last Seen:  

Yes that should work. If it doesn't work for stun, then paste all the code you have between "case SC_STUN:" and "break;".

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  9
  • Topics Per Day:  0.00
  • Content Count:  28
  • Reputation:   0
  • Joined:  10/12/15
  • Last Seen:  

On 25/12/2017 at 2:42 PM, Playtester said:

Yes that should work. If it doesn't work for stun, then paste all the code you have between "case SC_STUN:" and "break;".

I did it, and doesn't work with "Stone", no time reduction by luk. this is the last Status that i need to change, the duration of Stone is 15 seconds with 1 or 300 of luk. 

Link to comment
Share on other sites

  • 0

  • Group:  Developer
  • Topic Count:  34
  • Topics Per Day:  0.01
  • Content Count:  804
  • Reputation:   230
  • Joined:  01/30/13
  • Last Seen:  

		case SC_STONE:
			sc_def = status->mdef*100;
			sc_def2 = status->luk*10 + status_get_lv(bl)*10 - status_get_lv(src)*10;
			tick_def = status->luk*32;
			tick_def2 = 0;
			break;

Are you sure it's always 15 seconds? I'd think it would be 5 seconds minimum because that's the incubation time. I don't really know of an easy way to reduce incubation time because that's skill-specific and works on timers. Would require quite some rewriting. But that second phase of stone where you can't move anymore should actually be over after 100ms if you have 320 LUK.

Link to comment
Share on other sites

  • 0

  • Group:  Forum Manager
  • Topic Count:  282
  • Topics Per Day:  0.06
  • Content Count:  3123
  • Reputation:   1617
  • Joined:  03/26/12
  • Last Seen:  

Wrong section. Moved to "Source Support".

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