GM.PiXeL 6 Posted December 29, 2013 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. Quote Share this post Link to post Share on other sites
0 pan 87 Posted December 31, 2013 No you don't, if you add that SC_FREEZE will not be started in players that have luk >= 240What 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 Quote Share this post Link to post Share on other sites
0 GM.PiXeL 6 Posted December 29, 2013 Bump, Urgent. =(( Quote Share this post Link to post Share on other sites
0 pan 87 Posted December 31, 2013 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 msSave and rebuild. Happy new year Quote Share this post Link to post Share on other sites
0 GM.PiXeL 6 Posted December 31, 2013 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 msSave and rebuild. Happy new year do i have to add return 0; after tick = 2000; // is in ms? Quote Share this post Link to post Share on other sites
0 pan 87 Posted December 31, 2013 No you don't, if you add that SC_FREEZE will not be started in players that have luk >= 240 Quote Share this post Link to post Share on other sites
0 GM.PiXeL 6 Posted December 31, 2013 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; Quote Share this post Link to post Share on other sites
0 Mhalicot 392 Posted December 31, 2013 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. Quote Share this post Link to post Share on other sites
0 GM.PiXeL 6 Posted January 1, 2014 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 >= 240What 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 Quote Share this post Link to post Share on other sites
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