this is a source code mabe by sir clydelion, can someone help me to edit it, what I plan is when a char is trans or lower job, he/she will have a instant cast of 150 dex but when a char is 3rd class there will be no instant cast, it will used the renewal casting formula for 3rd class only, I hope someone can make it for me, thanks in advance
Index: src/map/battle.h
===================================================================
--- src/map/battle.h (revision 16781)
+++ src/map/battle.h (working copy)
@@ -345,6 +345,8 @@
int pet_hair_style; // added by [skotlex]
int castrate_dex_scale; // added by [MouseJstr]
+ int castrate_dex_scale_2;
+ int castrate_dex_scale_3;
int area_size; // added by [MouseJstr]
int max_def, over_def_bonus; //added by [skotlex]
Index: src/map/skill.c
===================================================================
--- src/map/skill.c (revision 16781)
+++ src/map/skill.c (working copy)
@@ -13356,10 +13356,22 @@
// 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;
+ int scale = 0;
+ if(sd && sd->class_&JOBL_THIRD)
+ scale = battle_config.castrate_dex_scale_3 - status_get_dex(bl);
+ else if (sd && sd->class_&JOBL_2)
+ scale = battle_config.castrate_dex_scale_2 - status_get_dex(bl);
else
+ scale = battle_config.castrate_dex_scale - status_get_dex(bl);
+ if( scale > 0 ){ // not instant cast
+ if(sd && sd->class_&JOBL_THIRD)
+ time = time * scale / battle_config.castrate_dex_scale_3;
+ else if (sd && sd->class_&JOBL_2)
+ time = time * scale / battle_config.castrate_dex_scale_2;
+ else
+ time = time * scale / battle_config.castrate_dex_scale;
+ }
+ else
return 0; // instant cast
}
Index: src/map/skill.c
===================================================================
--- src/map/skill.c (revision 16781)
+++ src/map/skill.c (working copy)
@@ -13356,10 +13356,22 @@
// 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;
+ int scale = 0;
+ if(sd && sd->class_&JOBL_THIRD)
+ scale = battle_config.castrate_dex_scale_3 - status_get_dex(bl);
+ else if (sd && sd->class_&JOBL_2)
+ scale = battle_config.castrate_dex_scale_2 - status_get_dex(bl);
else
+ scale = battle_config.castrate_dex_scale - status_get_dex(bl);
+ if( scale > 0 ){ // not instant cast
+ if(sd && sd->class_&JOBL_THIRD)
+ time = time * scale / battle_config.castrate_dex_scale_3;
+ else if (sd && sd->class_&JOBL_2)
+ time = time * scale / battle_config.castrate_dex_scale_2;
+ else
+ time = time * scale / battle_config.castrate_dex_scale;
+ }
+ else
return 0; // instant cast
}
Index: conf/battle/skill.conf
===================================================================
--- conf/battle/skill.conf (revision 16781)
+++ conf/battle/skill.conf (working copy)
@@ -38,7 +38,9 @@
no_skill_delay: 2
// At what dex does the cast time become zero (instacast)?
-castrate_dex_scale: 150
+castrate_dex_scale: 150 //1st class
+castrate_dex_scale_2: 150 //2nd class
+castrate_dex_scale_3: 150 //3rd class
// How much (dex*2+int) does variable cast turns zero?
vcast_stat_scale: 530
Question
Thanna
this is a source code mabe by sir clydelion, can someone help me to edit it, what I plan is when a char is trans or lower job, he/she will have a instant cast of 150 dex but when a char is 3rd class there will be no instant cast, it will used the renewal casting formula for 3rd class only, I hope someone can make it for me, thanks in advance
Link to comment
Share on other sites
1 answer 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.