Luk Freeze Reduction

GM.PiXeL

New member
Messages
56
Points
0
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.

 
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:
Code:
			// 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

 
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:
Code:
			// 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?

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

 
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;

 
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.

 
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:
Code:
			// 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
 
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

 
Back
Top