Jump to content
justeyngonzales

[HOW]2nd jobs the 150dex no cast will be enabled and no fix cast time, but in 3rd jobs 10fix cast time enabled

Recommended Posts

By; clydelion

Index: src/map/battle.c
===================================================================
--- src/map/battle.c (revision 16781)
+++ src/map/battle.c (working copy)
@@ -5596,6 +5596,8 @@
  { "max_cloth_color",				    &battle_config.max_cloth_color,				 4,	  0,	  INT_MAX,	    },
  { "pet_hair_style",					 &battle_config.pet_hair_style,				  100,    0,	  INT_MAX,	    },
  { "castrate_dex_scale",				 &battle_config.castrate_dex_scale,			  150,    1,	  INT_MAX,	    },
+ { "castrate_dex_scale_2",			   &battle_config.castrate_dex_scale_2,		    150,    1,	  INT_MAX,	    },
+ { "castrate_dex_scale_3",			   &battle_config.castrate_dex_scale_3,		    150,    1,	  INT_MAX,	    },
  { "vcast_stat_scale",	 &battle_config.vcast_stat_scale,	   530,    1,	  INT_MAX,	    },
  { "area_size",						  &battle_config.area_size,					   14,	 0,	  INT_MAX,	    },
  { "zeny_from_mobs",					 &battle_config.zeny_from_mobs,				  0,	  0,	  1,			  },
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
  • Upvote 1
Link to comment
Share on other sites

By; clydelion

Index: src/map/battle.c
===================================================================
--- src/map/battle.c (revision 16781)
+++ src/map/battle.c (working copy)
@@ -5596,6 +5596,8 @@
  { "max_cloth_color",				    &battle_config.max_cloth_color,				 4,	  0,	  INT_MAX,	    },
  { "pet_hair_style",					 &battle_config.pet_hair_style,				  100,    0,	  INT_MAX,	    },
  { "castrate_dex_scale",				 &battle_config.castrate_dex_scale,			  150,    1,	  INT_MAX,	    },
+ { "castrate_dex_scale_2",			   &battle_config.castrate_dex_scale_2,		    150,    1,	  INT_MAX,	    },
+ { "castrate_dex_scale_3",			   &battle_config.castrate_dex_scale_3,		    150,    1,	  INT_MAX,	    },
  { "vcast_stat_scale",	 &battle_config.vcast_stat_scale,	   530,    1,	  INT_MAX,	    },
  { "area_size",						  &battle_config.area_size,					   14,	 0,	  INT_MAX,	    },
  { "zeny_from_mobs",					 &battle_config.zeny_from_mobs,				  0,	  0,	  1,			  },
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

SIR

 

1>..\src\map\skill.c(1843): warning C4554: '&' : check operator precedence for possible error; use parentheses to clarify precedence

1>..\src\map\script.c(6090): warning C4101: 'c3' : unreferenced local variable

1>..\src\map\script.c(6090): warning C4101: 'attr' : unreferenced local variable

1>..\src\map\script.c(6090): warning C4101: 'iden' : unreferenced local variable

1>..\src\map\script.c(6090): warning C4101: 'ref' : unreferenced local variable

1>..\src\map\script.c(6090): warning C4101: 'c1' : unreferenced local variable

1>..\src\map\script.c(6090): warning C4101: 'c2' : unreferenced local variable

1>..\src\map\script.c(6090): warning C4101: 'c4' : unreferenced local variable

 

IT WORKED WITH ERRORS. BUT FINGER OFFENSIVE STILL IN FIXED CAST. ZEN is Now in no cast.

 

Edited by justeyngonzales
Link to comment
Share on other sites

Try this;

trunk/src/config/renewal.h

/// renewal cast time
/// (disable by commenting the line)
///
/// leave this line to enable renewal casting time algorithms
/// cast time is decreased by DEX * 2 + INT while 20% of the cast time is not reduced by stats.
/// example:
/// on a skill whos cast time is 10s, only 8s may be reduced. the other 2s are part of a
/// "fixed cast time" which can only be reduced by specialist items and skills
#define RENEWAL_CAST

Put comment in #define RENEWAL_CAST

Link to comment
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
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  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.



×
×
  • Create New...

Important Information

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