Hey all,
I am trying to sort out this old custom script - "Guaranteed Gain System & Rate Over Time System". I found it here on the forums, and the creator had been gone 5 yrs now.
I cannot quite understand how the following would be adjusted for faster/slower gains.
I inserted the attached custom script to a newly built shard running the following version-
RunUO 2.5 with UO patched all the way.
Oh, and this code is in a custom .cs file in the scripts/customs folder called RateOverTime.cs
What I am trying to do is set some, not all skills have their gains slow down ALOT once they get to 90 and slow even more if they get scrolls to go over 100. As it is our gains seem fine but are just too fast at higher levels. Ideally I would like it start to slow @ 80, then slow more @ 90, then come to a crawl @ 100 with some kind of GGS for .1 gain an hour.
Any Help would be appreciated.
I am trying to sort out this old custom script - "Guaranteed Gain System & Rate Over Time System". I found it here on the forums, and the creator had been gone 5 yrs now.
I cannot quite understand how the following would be adjusted for faster/slower gains.
I inserted the attached custom script to a newly built shard running the following version-
RunUO 2.5 with UO patched all the way.
Oh, and this code is in a custom .cs file in the scripts/customs folder called RateOverTime.cs
Code:
public static bool SkillGainAllowed( Mobile from, Skill skill )
{
if ( from.Player )
{
MobileRateInfo mobileInfo = MobileRateInfo.GetMobileInfo( from );
SkillRateInfo skillInfo = mobileInfo.GetSkillInfo( skill );
// SKILL GAIN RESTRICTIONS
// Here you can edit restrictions suitable for your needs
if ( skill.Base >= 100.0 && ( mobileInfo.SkillGainsCount >= 72 || DateTime.Now - skillInfo.LastGainTime < TimeSpan.FromMinutes( 5.0 ) ) )
return false;
if ( skill.Base >= 90.0 && ( mobileInfo.SkillGainsCount >= 30 || DateTime.Now - skillInfo.LastGainTime < TimeSpan.FromMinutes( 10.0 ) ) )
return false;
else if ( skill.Base >= 80.0 && ( mobileInfo.SkillGainsCount >= 60 || DateTime.Now - skillInfo.LastGainTime < TimeSpan.FromMinutes( 5.0 ) ) )
return false;
else if ( skill.Base >= 70.0 && ( mobileInfo.SkillGainsCount >= 100 || DateTime.Now - skillInfo.LastGainTime < TimeSpan.FromMinutes( 3.0 ) ) )
return false;
else if ( skill.Base < 70.0 )
return true;
// End!
mobileInfo.SkillGainsCount++;
skillInfo.LastGainTime = DateTime.Now;
skillInfo.GainsCount++;
What I am trying to do is set some, not all skills have their gains slow down ALOT once they get to 90 and slow even more if they get scrolls to go over 100. As it is our gains seem fine but are just too fast at higher levels. Ideally I would like it start to slow @ 80, then slow more @ 90, then come to a crawl @ 100 with some kind of GGS for .1 gain an hour.
Any Help would be appreciated.