Jump to content
  • 0
Sign in to follow this  
SSky

Applying iRO ASPD

Question

Hello everyone, I am curious how do i apply iRO ASPD to my server, Since i dont understand the variables used in hercules' src.
 

 

// Basic ASPD value
int status_base_amotion_pc(struct map_session_data *sd, struct status_data *st) {
int amotion;
#ifdef RENEWAL_ASPD
short mod = -1;
 
switch( sd->weapontype2 ){ // adjustment for dual weilding
case W_DAGGER: mod = 0; break; // 0, 1, 1
case W_1HSWORD:
case W_1HAXE: mod = 1;
if( (sd->class_&MAPID_THIRDMASK) == MAPID_GUILLOTINE_CROSS ) // 0, 2, 3
mod = sd->weapontype2 / W_1HSWORD + W_1HSWORD / sd->weapontype2 ;
}
 
amotion = ( sd->status.weapon < MAX_WEAPON_TYPE && mod < 0 )
? (status->aspd_base[pc->class2idx(sd->status.class_)][sd->status.weapon]) // single weapon
: ((status->aspd_base[pc->class2idx(sd->status.class_)][sd->weapontype2] // dual-wield
+ status->aspd_base[pc->class2idx(sd->status.class_)][sd->weapontype2]) * 6 / 10 + 10 * mod
- status->aspd_base[pc->class2idx(sd->status.class_)][sd->weapontype2]
+ status->aspd_base[pc->class2idx(sd->status.class_)][sd->weapontype1]);
 
if ( sd->status.shield )
amotion += ( 2000 - status->aspd_base[pc->class2idx(sd->status.class_)][W_FIST] ) +
( status->aspd_base[pc->class2idx(sd->status.class_)][MAX_WEAPON_TYPE] - 2000 );
 
#else
// base weapon delay
amotion = (sd->status.weapon < MAX_WEAPON_TYPE)
? (status->aspd_base[pc->class2idx(sd->status.class_)][sd->status.weapon]) // single weapon
: (status->aspd_base[pc->class2idx(sd->status.class_)][sd->weapontype1] + status->aspd_base[pc->class2idx(sd->status.class_)][sd->weapontype2])*7/10; // dual-wield
 
// percentual delay reduction from stats
amotion -= amotion * (4*st->agi + st->dex)/1000;
#endif
// raw delay adjustment from bAspd bonus
amotion += sd->bonus.aspd_add;
 
return amotion;
}
 

 

Here's the formula for iRO ASPD

 

 

Each class has a Base ASPD (146 or 156) which is affected by the weapon (-50 ~ +2). Equipping a shield reduces ASPD by 5 ~ 10.


ASPD Penalty = [ 1 − { Job Base ASPD − 144 } ÷ 50 ]

Note: Limit down to a maximum of 0.96. Keep 2 decimals.


ASPD Correction = [ { √( 205 ) − √( AGI ) } ÷ 7.15 ]

Note: Round up to 3 decimals.


Equip ASPD % = [ { 195 − Base ASPD } × Total of Equip ASPD Mod ]

Note: Round down to 1 decimal.


Base ASPD = [ 200 − { 200 − ( Job Base ASPD + Shield Penalty − ASPD Correction + √[ AGI × 9.999 + DEX × 0.19212 ] × Aspd Penalty ) } × { 1 − Potion ASPD Mod − Skill ASPD Mod } ]

Note: Round down to 2 decimal.


Final ASPD = [ Base ASPD + { Equip ASPD % } + Equip ASPD Fixed ]


Thank you everyone!

Share this post


Link to post
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

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.   Restore formatting

  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.

Loading...
Sign in to follow this  

×
×
  • Create New...

Important Information

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