Jump to content
  • 0
GM.PiXeL

Luk Freeze Reduction

Question

Hi Hercules,

 

How to make if a player has 240 LUK freeze status will only be 2seconds.

But if 260 LUK he will never be freeze.

 

Example:

High Wizard casts storm gust to 240 LUK player, then after 2 seconds, the freeze will removed.

 

Another Example:

High Wizard casts storm gust to 260 LUK player but did not freeze.

 

Thanks in advanced.

Share this post


Link to post
Share on other sites

9 answers to this question

Recommended Posts

  • 0

 

 

No you don't, if you add that SC_FREEZE will not be started in players that have luk >= 240

What if I want to add : 220 Luk = 3secs Freeze. it will be : 

 

          // Players that have luk above or equal 260 are immune to Freeze

if( type == SC_FREEZE && sd->battle_status.luk >= 260 )

return 0;

// Players that have luk above or equal 240 have freeze timer reduced to 2s

if( type == SC_FREEZE && sd->battle_status.luk >= 240 && tick > 2000 )

tick = 2000; // is in ms

              return 0;

          // Players that have luk above or equal 220 have freeze timer reduced to 3s

if( type == SC_FREEZE && sd->battle_status.luk >= 220 && tick > 3000 )

tick = 3000; // is in ms

 

Is this correct? only the last one will not have return 0;

 

 

No it's not correct, it should be something like:
			// Players that have luk above or equal 260 are immune to Freeze			if( type == SC_FREEZE && sd->battle_status.luk >= 260 )				return 0;			// Players that have luk above or equal 240 have freeze timer reduced to 2s			if( type == SC_FREEZE && sd->battle_status.luk >= 240 && tick > 2000 )				tick = 2000; // is in ms			if( type == SC_FREEZE && sd->battle_status.luk >= 220 && sd->battle_status.luk < 240 && tick > 3000 )				tick = 3000;
If you return, the rest of this function won't be read, then it won't activate SC_FREEZE. Note that there are two different checks regarding luk in the third condition

Share this post


Link to post
Share on other sites
  • 0

I haven't tested those changes in-game, but they should work fine c: otherwise just post and I'll correct any mistakes, ok?

Open src/map/status.c and search for:

		case SC_FREEZE:			//Undead are immune to Freeze/Stone			if (undead_flag && !(flag&1))				return 0;
Add below:
			// Players that have luk above or equal 260 are immune to Freeze			if( type == SC_FREEZE && sd->battle_status.luk >= 260 )				return 0;			// Players that have luk above or equal 240 have freeze timer reduced to 2s			if( type == SC_FREEZE && sd->battle_status.luk >= 240 && tick > 2000 )				tick = 2000; // is in ms
Save and rebuild.

 

Happy new year

Share this post


Link to post
Share on other sites
  • 0

 

I haven't tested those changes in-game, but they should work fine c: otherwise just post and I'll correct any mistakes, ok?

Open src/map/status.c and search for:

		case SC_FREEZE:			//Undead are immune to Freeze/Stone			if (undead_flag && !(flag&1))				return 0;
Add below:
			// Players that have luk above or equal 260 are immune to Freeze			if( type == SC_FREEZE && sd->battle_status.luk >= 260 )				return 0;			// Players that have luk above or equal 240 have freeze timer reduced to 2s			if( type == SC_FREEZE && sd->battle_status.luk >= 240 && tick > 2000 )				tick = 2000; // is in ms
Save and rebuild.

 

Happy new year

do i have to add return 0; after tick = 2000; // is in ms?

Share this post


Link to post
Share on other sites
  • 0

No you don't, if you add that SC_FREEZE will not be started in players that have luk >= 240

Share this post


Link to post
Share on other sites
  • 0

No you don't, if you add that SC_FREEZE will not be started in players that have luk >= 240

What if I want to add : 220 Luk = 3secs Freeze. it will be : 

 

          // Players that have luk above or equal 260 are immune to Freeze

if( type == SC_FREEZE && sd->battle_status.luk >= 260 )

return 0;

// Players that have luk above or equal 240 have freeze timer reduced to 2s

if( type == SC_FREEZE && sd->battle_status.luk >= 240 && tick > 2000 )

tick = 2000; // is in ms

              return 0;

          // Players that have luk above or equal 220 have freeze timer reduced to 3s

if( type == SC_FREEZE && sd->battle_status.luk >= 220 && tick > 3000 )

tick = 3000; // is in ms

 

Is this correct? only the last one will not have return 0;

Share this post


Link to post
Share on other sites
  • 0

please follow Hercules Forum Rules

  • [*]Posts in the support sections may be bumped with 
more information no less than 24 hours after the last post; if you have new information within less than 24h, edit your previous post.

Share this post


Link to post
Share on other sites
  • 0

 

please follow Hercules Forum Rules

[*]Posts in the support sections may be bumped with more information no less than 24 hours after the last post; if you have new information within less than 24h, edit your previous post.

Sorry. I'll never do it again. thanks also for the link of forum rules.

 

 

 

 

No you don't, if you add that SC_FREEZE will not be started in players that have luk >= 240

What if I want to add : 220 Luk = 3secs Freeze. it will be : 

 

          // Players that have luk above or equal 260 are immune to Freeze

if( type == SC_FREEZE && sd->battle_status.luk >= 260 )

return 0;

// Players that have luk above or equal 240 have freeze timer reduced to 2s

if( type == SC_FREEZE && sd->battle_status.luk >= 240 && tick > 2000 )

tick = 2000; // is in ms

              return 0;

          // Players that have luk above or equal 220 have freeze timer reduced to 3s

if( type == SC_FREEZE && sd->battle_status.luk >= 220 && tick > 3000 )

tick = 3000; // is in ms

 

Is this correct? only the last one will not have return 0;

 

No it's not correct, it should be something like:
			// Players that have luk above or equal 260 are immune to Freeze			if( type == SC_FREEZE && sd->battle_status.luk >= 260 )				return 0;			// Players that have luk above or equal 240 have freeze timer reduced to 2s			if( type == SC_FREEZE && sd->battle_status.luk >= 240 && tick > 2000 )				tick = 2000; // is in ms			if( type == SC_FREEZE && sd->battle_status.luk >= 220 && sd->battle_status.luk < 240 && tick > 3000 )				tick = 3000;
If you return, the rest of this function won't be read, then it won't activate SC_FREEZE. Note that there are two different checks regarding luk in the third condition

Thanks mate. /no1

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

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.