public void DoCure(Mobile from) { bool cure = false; CureLevelInfo[] info = LevelInfo; for (int i = 0; i < info.Length; ++i) { CureLevelInfo li = info[i]; if (li.Poison == from.Poison && Scale(from, li.Chance) > Utility.RandomDouble()) { cure = true; break; } } if (cure && from.CurePoison(from)) { from.SendLocalizedMessage(500231); // You feel cured of poison! from.FixedEffect(0x373A, 10, 15); from.PlaySound(0x1E0); } else if (!cure) { from.SendLocalizedMessage(500232); // That potion was not strong enough to cure your ailment! } }
public void DoCure(Mobile from) { bool cure = false; CureLevelInfo[] info = LevelInfo; for (int i = 0; i < info.Length; ++i) { CureLevelInfo li = info[i]; if (li.Poison == from.Poison && Scale(from, li.Chance) > Utility.RandomDouble()) { cure = true; break; } } if (cure && from.CurePoison(from)) { from.SendLocalizedMessage(500231); // You feel cured of poison! from.FixedParticles(0x373A, 10, 15, 5012, EffectLayer.Waist); from.PlaySound(0x1E0); } else if (!cure && from.Poisoned) //Loki edit: It shouldn't say this if you're not actually poisoned (added second condition) { from.SendLocalizedMessage(500232); // That potion was not strong enough to cure your ailment! } }