public override void Drink(Mobile from)
        {
            if (TransformationSpellHelper.UnderTransformation(from, typeof(Spells.Necromancy.VampiricEmbraceSpell)))
            {
                from.SendLocalizedMessage(1061652); // The garlic in the potion would surely kill you.
            }
            else if (from.Poisoned)
            {
                DoCure(from);

                BasePotion.PlayDrinkEffect(from);

                from.FixedParticles(0x373A, 10, 15, 5012, EffectLayer.Waist);
                from.PlaySound(0x1E0);

                if (!Engines.ConPVP.DuelContext.IsFreeConsume(from))
                {
                    this.Consume();
                }
            }
            else
            {
                from.SendLocalizedMessage(1042000); // You are not poisoned.
            }
        }
        public override void Drink(Mobile from)
        {
            if (from.Hits < from.HitsMax)
            {
                if (from.Poisoned || MortalStrike.IsWounded(from))
                {
                    from.LocalOverheadMessage(MessageType.Regular, 0x22, 1005000); // You can not heal yourself in your current state.
                }
                else
                {
                    if (from.BeginAction(typeof(BaseHealPotion)))
                    {
                        DoHeal(from);

                        BasePotion.PlayDrinkEffect(from);

                        if (!Engines.ConPVP.DuelContext.IsFreeConsume(from))
                        {
                            this.Consume();
                        }

                        Timer.DelayCall(TimeSpan.FromSeconds(Delay), new TimerStateCallback(ReleaseHealLock), from);
                    }
                    else
                    {
                        from.LocalOverheadMessage(MessageType.Regular, 0x22, 500235); // You must wait 10 seconds before using another healing potion.
                    }
                }
            }
            else
            {
                from.SendLocalizedMessage(1049547); // You decide against drinking this potion, as you are already at full health.
            }
        }
        public override void Drink(Mobile from)
        {
            DoPoison(from);

            BasePotion.PlayDrinkEffect(from);

            if (!Engines.ConPVP.DuelContext.IsFreeConsume(from))
            {
                this.Consume();
            }
        }
Exemple #4
0
        public override void Drink(Mobile from)
        {
            if (DoStrength(from))
            {
                BasePotion.PlayDrinkEffect(from);

                if (!Engines.ConPVP.DuelContext.IsFreeConsume(from))
                {
                    this.Consume();
                }
            }
        }
Exemple #5
0
        public override void Drink(Mobile from)
        {
            if (from.Stam < from.StamMax)
            {
                from.Stam += Scale(from, (int)(Refresh * from.StamMax));

                BasePotion.PlayDrinkEffect(from);

                if (!Engines.ConPVP.DuelContext.IsFreeConsume(from))
                {
                    this.Consume();
                }
            }
            else
            {
                from.SendMessage("You decide against drinking this potion, as you are already at full stamina.");
            }
        }
Exemple #6
0
        public override void Drink(Mobile from)
        {
            if (from.BeginAction(typeof(LightCycle)))
            {
                new LightCycle.NightSightTimer(from).Start();
                from.LightLevel = LightCycle.DungeonLevel / 2;

                from.FixedParticles(0x376A, 9, 32, 5007, EffectLayer.Waist);
                from.PlaySound(0x1E3);

                BasePotion.PlayDrinkEffect(from);

                if (!Engines.ConPVP.DuelContext.IsFreeConsume(from))
                {
                    this.Consume();
                }
            }
            else
            {
                from.SendMessage("You already have nightsight.");
            }
        }