Full Version : Faster decreasing stamina
xmlspawner >>Scripting Support >>Faster decreasing stamina
<< Prev | Next >>
Galfaroth- 02-18-2006
Hello all. I didn't know where to post it (because it is Server problem, maybe no Script). Is there any way to increase decreasing of stamina (so players can't run everytime)?
Dian- 02-18-2006
most of what you are looking for is in scripts/RegenRates.cs
That file controlls how fast you regenerate your stats, when they are reduced.
As to how much stamina is lost, without checking atm I would guess it is in the PlayerMobile.. or Mobile file in an MoveOver method of some kind.. if you are still stuck, I can research it a bit farther.
Galfaroth- 02-18-2006
Thank you Dian. The script was in Scripts/Misc/RegenRates.cs

CODE
private static TimeSpan Mobile_StamRegenRate( Mobile from ) { if ( from.Skills == null ) return Mobile.DefaultStamRate; CheckBonusSkill( from, from.Stam, from.StamMax, SkillName.Focus );
int points = AosAttributes.GetValue( from, AosAttribute.RegenStam ) +
(int)(from.Skills[SkillName.Focus].Value * 0.1);
if ( CheckTransform( from, typeof( VampiricEmbraceSpell ) ) )
points += 15;
if ( from is Mobiles.BaseCreature && ((Mobiles.BaseCreature)from).IsParagon )
points += 40;
if ( points < -1 )
points = -1;
return TimeSpan.FromSeconds( 1.0 / (0.1 * (2 + points)) );
}

To make it slower regen we have to change last line:
return TimeSpan.FromSeconds( 1.0 / (0.1 * (2 + points)) );
and set 1.0 to bigger amounts. I'll try it tomorrow.
Dian- 02-18-2006

QUOTE (Galfaroth @ Feb 18 2006, 10:51 PM)
Thank you Dian. The script was in Scripts/Misc/RegenRates.cs

doh.. was typing to fast I guess