Separate Instant Cast Setting per job


This diff will give you control over the instant cast setting per job (1st jobs, 2nd jobs, 3rd jobs)

1. Go over battle.c and diff as follows..

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,              },

2. Define the new variables in battle.h

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]

3. Now, go over your skill.c to assign cast time for each.

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
 		}
 

4. and lastly, add it to the configuration (skill.conf)

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

How to use HackShield w/ *Athena


First, diff a fresh client, (unlike what you normally choose, do not tick “Disable HShield” in the diff options)

Second, rename your client to RagexeRE.exe (if you’re using a Renewal client), or Ragexe.exe (if otherwise)

Next, execute the newly diffed and renamed client..(This would take a few minutes as the client downloads and installs HackShield files)

Screenshot #1

Screenshot #2

Screenshot #3

The window will disappear, but an icon will appear in your task bar

Final:

Now, this can easily be bypassed by players if they create their own client with HackShield disabled.

How can you ensure that they are using the same client as the one you diffed? Simple, GreenBox released a new diff that does exactly what we wanted.. refer to this link.

What it does is, it checks the md5 checksum of the client and compares it to the one you have set in its configuration.

client_hash: 0, 113e195e6c051bb1cfb12a644bb084c5
client_hash: 99, cb1ea78023d337c38e8ba5124e2338ae
Thanks GreenBox!