michaelsoftman Posted September 15, 2012 Group: Members Topic Count: 48 Topics Per Day: 0.01 Content Count: 410 Reputation: 29 Joined: 04/04/12 Last Seen: November 28, 2024 Share Posted September 15, 2012 Would it be easy to code in different instacast values for 1st and high class, 2nd and trans, and 3rd class? In other words, something like insta for 1st class - 99 dex Insta for trans - 150 dex Insta for 3rd - 190 dex If so, can someone point me in the right direction? 1 Quote Link to comment Share on other sites More sharing options...
Jasc Posted September 16, 2012 Group: Members Topic Count: 29 Topics Per Day: 0.01 Content Count: 270 Reputation: 20 Joined: 12/10/11 Last Seen: June 28, 2022 Share Posted September 16, 2012 Maybe try searching in skill.c skill.h or battle.c battle.h You will definitely need to add arguments that will specify the classes, I have never done an edit like this, good luck! Quote Link to comment Share on other sites More sharing options...
malufett Posted September 17, 2012 Group: Members Topic Count: 9 Topics Per Day: 0.00 Content Count: 554 Reputation: 70 Joined: 04/04/12 Last Seen: November 8, 2013 Share Posted September 17, 2012 here I'll give you a clue.. /*========================================== * Does cast-time reductions based on dex, item bonuses and config setting *------------------------------------------*/ int skill_castfix (struct block_list *bl, int skill_id, int skill_lv) { int time = skill_get_cast(skill_id, skill_lv); nullpo_ret(bl); #ifndef RENEWAL_CAST { struct map_session_data *sd; sd = BL_CAST(BL_PC, bl); // calculate base cast time (reduced by dex) if( !(skill_get_castnodex(skill_id, skill_lv)&1) ) { int scale = battle_config.castrate_dex_scale - status_get_dex(bl); if( scale > 0 ) // not instant cast time = time * scale / battle_config.castrate_dex_scale; else return 0; // instant cast } // calculate cast time reduced by item/card bonuses if( !(skill_get_castnodex(skill_id, skill_lv)&4) && sd ) { int i; if( sd->castrate != 100 ) time = time * sd->castrate / 100; for( i = 0; i < ARRAYLENGTH(sd->skillcast) && sd->skillcast[i].id; i++ ) { if( sd->skillcast[i].id == skill_id ) { time+= time * sd->skillcast[i].val / 100; break; } } } } #endif // config cast time multiplier if (battle_config.cast_rate != 100) time = time * battle_config.cast_rate / 100; // return final cast time return (time > 0) ? time : 0; } and sorry I can't do it for you right now.. 1 Quote Link to comment Share on other sites More sharing options...
michaelsoftman Posted September 18, 2012 Group: Members Topic Count: 48 Topics Per Day: 0.01 Content Count: 410 Reputation: 29 Joined: 04/04/12 Last Seen: November 28, 2024 Author Share Posted September 18, 2012 Got it all figured out, thanks for the tips Quote Link to comment Share on other sites More sharing options...
Cydh Posted September 18, 2012 Group: Developer Topic Count: 153 Topics Per Day: 0.03 Content Count: 2285 Reputation: 748 Joined: 06/16/12 Last Seen: February 21 Share Posted September 18, 2012 your request is good idea. Quote Link to comment Share on other sites More sharing options...
Question
michaelsoftman
Would it be easy to code in different instacast values for 1st and high class, 2nd and trans, and 3rd class?
In other words, something like
insta for 1st class - 99 dex
Insta for trans - 150 dex
Insta for 3rd - 190 dex
If so, can someone point me in the right direction?
Link to comment
Share on other sites
4 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.