Jump to content
  • 0

180 dex for 3rd job SKILLS & 150 dex for non3rdjob skills


iubantot

Question


  • Group:  Members
  • Topic Count:  117
  • Topics Per Day:  0.03
  • Content Count:  312
  • Reputation:   34
  • Joined:  10/15/12
  • Last Seen:  

is this possible in rathena? if yes can someone help me

Link to comment
Share on other sites

5 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  17
  • Topics Per Day:  0.00
  • Content Count:  754
  • Reputation:   186
  • Joined:  05/22/12
  • Last Seen:  

Yes, it is. But it needs a modification.

Index: conf/battle/skill.conf
===================================================================
--- conf/battle/skill.conf	(revision 17067)
+++ conf/battle/skill.conf	(working copy)
@@ -39,6 +39,7 @@

// At what dex does the cast time become zero (instacast)?
castrate_dex_scale: 150
+castrate_dex_scale_3rd: 180 //[clydelion]

// How much (dex*2+int) does variable cast turns zero?
vcast_stat_scale: 530
Index: src/map/battle.c
===================================================================
--- src/map/battle.c	(revision 17067)
+++ src/map/battle.c	(working copy)
@@ -5710,6 +5710,7 @@
 { "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_3rd",			 &battle_config.castrate_dex_scale_3rd,		  180,	1,	  INT_MAX,		}, //[clydelion]
 { "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 17067)
+++ src/map/battle.h	(working copy)
@@ -346,6 +346,7 @@
 int pet_hair_style; // added by [skotlex]

 int castrate_dex_scale; // added by [MouseJstr]
+	int castrate_dex_scale_3rd; //[clydelion]
 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 17067)
+++ src/map/skill.c	(working copy)
@@ -13702,6 +13702,7 @@
 *------------------------------------------*/
int skill_castfix (struct block_list *bl, uint16 skill_id, uint16 skill_lv) {
 int time = skill_get_cast(skill_id, skill_lv);
+	int castrate_dex_scale = (skill_id >= 2001)? battle_config.castrate_dex_scale_3rd : battle_config.castrate_dex_scale; //[clydelion]

 nullpo_ret(bl);
#ifndef RENEWAL_CAST
@@ -13712,9 +13713,9 @@

	 // 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);
+			int scale = castrate_dex_scale - status_get_dex(bl);
		 if( scale > 0 )	// not instant cast
-				time = time * scale / battle_config.castrate_dex_scale;
+				time = time * scale / castrate_dex_scale;
		 else
			 return 0;	// instant cast
	 }
@@ -13880,7 +13881,7 @@
 int time = skill_get_delay(skill_id, skill_lv);
 struct map_session_data *sd;
 struct status_change *sc = status_get_sc(bl);
-
+	int castrate_dex_scale = (skill_id >= 2001)? battle_config.castrate_dex_scale_3rd : battle_config.castrate_dex_scale; //[clydelion]
 nullpo_ret(bl);
 sd = BL_CAST(BL_PC, bl);

@@ -13911,17 +13912,17 @@
 default:
	 if (battle_config.delay_dependon_dex && !(delaynodex&1))
	 {	// if skill delay is allowed to be reduced by dex
-			int scale = battle_config.castrate_dex_scale - status_get_dex(bl);
+			int scale = castrate_dex_scale - status_get_dex(bl);
		 if (scale > 0)
-				time = time * scale / battle_config.castrate_dex_scale;
+				time = time * scale / castrate_dex_scale;
		 else //To be capped later to minimum.
			 time = 0;
	 }
	 if (battle_config.delay_dependon_agi && !(delaynodex&1))
	 {	// if skill delay is allowed to be reduced by agi
-			int scale = battle_config.castrate_dex_scale - status_get_agi(bl);
+			int scale = castrate_dex_scale - status_get_agi(bl);
		 if (scale > 0)
-				time = time * scale / battle_config.castrate_dex_scale;
+				time = time * scale / castrate_dex_scale;
		 else //To be capped later to minimum.
			 time = 0;
	 }

http://upaste.me/raw/2841650435abfc73

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  117
  • Topics Per Day:  0.03
  • Content Count:  312
  • Reputation:   34
  • Joined:  10/15/12
  • Last Seen:  

Yes, it is. But it needs a modification.

Index: conf/battle/skill.conf
===================================================================
--- conf/battle/skill.conf	(revision 17067)
+++ conf/battle/skill.conf	(working copy)
@@ -39,6 +39,7 @@

// At what dex does the cast time become zero (instacast)?
castrate_dex_scale: 150
+castrate_dex_scale_3rd: 180 //[clydelion]

// How much (dex*2+int) does variable cast turns zero?
vcast_stat_scale: 530
Index: src/map/battle.c
===================================================================
--- src/map/battle.c	(revision 17067)
+++ src/map/battle.c	(working copy)
@@ -5710,6 +5710,7 @@
 { "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_3rd",			 &battle_config.castrate_dex_scale_3rd,		  180,	1,	  INT_MAX,		}, //[clydelion]
 { "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 17067)
+++ src/map/battle.h	(working copy)
@@ -346,6 +346,7 @@
 int pet_hair_style; // added by [skotlex]

 int castrate_dex_scale; // added by [MouseJstr]
+	int castrate_dex_scale_3rd; //[clydelion]
 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 17067)
+++ src/map/skill.c	(working copy)
@@ -13702,6 +13702,7 @@
 *------------------------------------------*/
int skill_castfix (struct block_list *bl, uint16 skill_id, uint16 skill_lv) {
 int time = skill_get_cast(skill_id, skill_lv);
+	int castrate_dex_scale = (skill_id >= 2001)? battle_config.castrate_dex_scale_3rd : battle_config.castrate_dex_scale; //[clydelion]

 nullpo_ret(bl);
#ifndef RENEWAL_CAST
@@ -13712,9 +13713,9 @@

	 // 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);
+			int scale = castrate_dex_scale - status_get_dex(bl);
		 if( scale > 0 )	// not instant cast
-				time = time * scale / battle_config.castrate_dex_scale;
+				time = time * scale / castrate_dex_scale;
		 else
			 return 0;	// instant cast
	 }
@@ -13880,7 +13881,7 @@
 int time = skill_get_delay(skill_id, skill_lv);
 struct map_session_data *sd;
 struct status_change *sc = status_get_sc(bl);
-
+	int castrate_dex_scale = (skill_id >= 2001)? battle_config.castrate_dex_scale_3rd : battle_config.castrate_dex_scale; //[clydelion]
 nullpo_ret(bl);
 sd = BL_CAST(BL_PC, bl);

@@ -13911,17 +13912,17 @@
 default:
	 if (battle_config.delay_dependon_dex && !(delaynodex&1))
	 {	// if skill delay is allowed to be reduced by dex
-			int scale = battle_config.castrate_dex_scale - status_get_dex(bl);
+			int scale = castrate_dex_scale - status_get_dex(bl);
		 if (scale > 0)
-				time = time * scale / battle_config.castrate_dex_scale;
+				time = time * scale / castrate_dex_scale;
		 else //To be capped later to minimum.
			 time = 0;
	 }
	 if (battle_config.delay_dependon_agi && !(delaynodex&1))
	 {	// if skill delay is allowed to be reduced by agi
-			int scale = battle_config.castrate_dex_scale - status_get_agi(bl);
+			int scale = castrate_dex_scale - status_get_agi(bl);
		 if (scale > 0)
-				time = time * scale / battle_config.castrate_dex_scale;
+				time = time * scale / castrate_dex_scale;
		 else //To be capped later to minimum.
			 time = 0;
	 }

http://upaste.me/raw/2841650435abfc73

i used this but the 180 instacast for 3rd job skills also affects the trans skills.

what i meant was 180instacast for ALL 3RD JOB SKILLS. and 150instacast for non 3rd job skills

Edited by ivantuting
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  17
  • Topics Per Day:  0.00
  • Content Count:  754
  • Reputation:   186
  • Joined:  05/22/12
  • Last Seen:  

Yes, it is what this does. This is different from my other mod.

EDIT:

You may add

&& skill_id <= 2498

to

skill_id >= 2001

to make it

skill_id >= 2001 && skill_id <= 2498

So that it only affects existing 3rd job skills.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  117
  • Topics Per Day:  0.03
  • Content Count:  312
  • Reputation:   34
  • Joined:  10/15/12
  • Last Seen:  

Yes, it is what this does. This is different from my other mod.

EDIT:

You may add

&& skill_id <= 2498

to

skill_id >= 2001

to make it

skill_id >= 2001 && skill_id <= 2498

So that it only affects existing 3rd job skills.

many many thanks! :)

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  24
  • Topics Per Day:  0.01
  • Content Count:  72
  • Reputation:   0
  • Joined:  04/30/13
  • Last Seen:  

BUMP ! WHO CAN GIVE ME A FULL TUTORIAL TO THIS TOPIC ? :/

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
Answer this question...

×   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...