Nabolas

Member
ServUO Version
Publish 57
Ultima Expansion
Endless Journey
So I am trying to make it where all potion buffs like Agility potion will give a longer timer based on the drinker's alchemy potion. Wanting to get around 15 minute buff for a 100 alchemist. Working on making crafting skills worthwhile for people who are hunting...

Only thing I have edited is BasePotion.cs, I have changed the TimeSpan Scale to the following :

BasePotion.cs:
public static TimeSpan Scale(Mobile m, TimeSpan v)
{
    if (!Core.AOS)
        return v;

    double enhancePotionsValue = EnhancePotions(m);

    double alchemyBonus = m.Skills.Alchemy.Fixed / 9.0; // This gives a 0.1% increase per skill point

    double scalar = 1.0 + (0.01 * enhancePotionsValue) + alchemyBonus;

    return TimeSpan.FromSeconds(v.TotalSeconds * scalar);
}

No compile errors...happy dance! Unfortunately, the skill bonus didn't work

any tips would be awesome!
 
By "didn't work", what do you mean?

Skill.Fixed is equivalent to Skill.Value multiplied by 10, so at GM Alchemy, that would be 1000 / 9 == 111, which will totally eclipse the bonus from EP.

You probably need to do something more like this
C#:
// 0.1 skill == 0.1% bonus, up to 1.0% (100%)
// using the lower value of 100 or Alchemy.Base
double alchemyBonus = Math.Min(100, m.Skills.Alchemy.Base) / 100.0;
 
It wasn't changing the potion buff duration. It remains at 2 minutes.
double alchemyBonus = Math.Min(100, m.Skills.Alchemy.Base) * 9.0;

Is what I went with to give it a 15 minute base duration but still only gives 2 minute duration
 
Last edited:
Back