- ServUO Version
- Publish 57
- Ultima Expansion
- Time Of Legends
EDIT:
I ended up using ChatGTP 4.0 and was given better results. I got this to work. The only issue is that I can double click and use the potion even if not poisoned or low health. I know it is in this section that I need to fix it but not quite sure how.
It tells you that you decide not to drink the potion but right under that it says this.consume. I am guessing that I need something right under the send message line to tell it not to consume.
I ended up using ChatGTP 4.0 and was given better results. I got this to work. The only issue is that I can double click and use the potion even if not poisoned or low health. I know it is in this section that I need to fix it but not quite sure how.
C#:
public override void Drink(Mobile from)
{
if (from.Poisoned || from.Hits < from.HitsMax)
{
if (from is PlayerMobile && from.Skills[SkillName.Alchemy].Base >= 100.0)
{
from.SendMessage("You feel a surge of vitality as the potion heals and cures you.");
}
from.CurePoison(from); // cure any poison
from.Hits += Utility.RandomMinMax(45, 65); // heal for 45-65 health
from.FixedParticles(0x375A, 9, 32, 5030, EffectLayer.Waist);
from.PlaySound(0x1E0);
BasePotion.PlayDrinkEffect(from);
if (!Core.AOS)
{
from.FixedParticles(0x373A, 10, 15, 5012, EffectLayer.Waist);
}
}
else
{
from.SendMessage("You decide not to drink the potion right now.");
}
this.Consume();
}
It tells you that you decide not to drink the potion but right under that it says this.consume. I am guessing that I need something right under the send message line to tell it not to consume.
Attachments
Last edited: