You can use the brAthena formula, it's the orignal kRO formula...
http://svn.brathena....rc/map/status.c
Change status_base_amotion_pc to this:
// Valores de ASPD
int status_base_amotion_pc(struct map_session_data* sd, struct status_data* status)
{
int bonus = 0, amotion;
// Bônus vindo de armas
amotion = status_amotion_pc(sd);
// Redução por status
amotion -= (int)(((float)sqrt((float)((float)pow((float)status->agi,2)/2) + ((float)pow((float)status->dex,2)/5) )/4)*10 + (bonus*status->agi/200));
// Ajustes vindo do bônus bAspd
amotion += sd->aspd_add;
// Ajustes de bônus vindo da habilidade Perícia em Esgrima
amotion += amotion * pc_checkskill(sd, GN_TRAINING_SWORD) / 100;
// Ajustes vindo para uso de escudos
if(sd->status.shield > 0)
amotion += ((aspd_base[pc_class2idx(sd->status.class_)][MAX_WEAPON_TYPE])/10);
return amotion;
}
Add above the status_base_amotion_pc, this function:
// Cálculo de ASPD para armas.
int status_amotion_pc(struct map_session_data* sd){
int i;
if( sd->status.weapon < MAX_WEAPON_TYPE )
i = aspd_base[pc_class2idx(sd->status.class_)][sd->status.weapon];
else{
i = aspd_base[pc_class2idx(sd->status.class_)][sd->weapontype1];
switch( sd->weapontype2 ){
case W_DAGGER: i += 100; break;
case W_1HSWORD: i += ((sd->status.class_ == 4065) ? 160:120); break;
case W_1HAXE: i += ((sd->status.class_ == 4065) ? 200:120); break;
}
}
return i;
}
Done.