Exemplo n.º 1
0
        public override void OnDoubleClick(Mobile from)
        {
            if (!Sphere.CanUse(from, this))
            {
                return;
            }

            base.OnDoubleClick(from);

            from.SendLocalizedMessage(1010018); // What do you want to use this item on?

            if (HarvestSystem == null)
            {
                return;
            }
            else
            {
                from.Target = new BladedItemTarget(this);
            }

            if (IsChildOf(from.Backpack) || Parent == from)
            {
                HarvestSystem.BeginHarvesting(from, this);
            }
            else
            {
                from.SendLocalizedMessage(1042001); // That must be in your pack for you to use it.
            }
        }
Exemplo n.º 2
0
        public override void OnDoubleClick(Mobile from)
        {
            if (!Sphere.CanUse(from, this))
            {
                return;
            }

            if (from.Hits < 25)
            {
                from.LastKiller = from;
                from.Kill();
            }
            else
            {
                from.Hits -= 24;
                from.PlaySound(from.GetHurtSound());

                if (!from.Mounted)
                {
                    from.Animate(20, 5, 1, true, false, 0);
                }
                else
                {
                    from.Animate(29, 5, 1, true, false, 0);
                }

                base.OnDoubleClick(from);
            }
        }
Exemplo n.º 3
0
        public override void OnDoubleClick(Mobile from)//XUO SCROLLS
        {
            if (!Sphere.CanUse(from, this))
            {
                return;
            }

            if (from.Mana < 21)
            {
                from.LastKiller = from;
                from.Kill();
            }
            else
            {
                from.Mana -= 20;

                /*  from.PlaySound(from.GetHurtSound());
                 *
                 *  if (!from.Mounted)
                 *      from.Animate(20, 5, 1, true, false, 0);
                 *  else
                 *      from.Animate(29, 5, 1, true, false, 0);
                 */
                base.OnDoubleClick(from);
            }
        }
Exemplo n.º 4
0
        public override void OnDoubleClick(Mobile from)
        {
            if (!Sphere.CanUse(from, this))
            {
                return;
            }

            from.Target = new BladedItemTarget(this);

            base.OnDoubleClick(from);
        }
Exemplo n.º 5
0
        public override void OnDoubleClick(Mobile from)
        {
            if (!Sphere.CanUse(from, this))
            {
                return;
            }

            base.OnDoubleClick(from);

            from.SendLocalizedMessage(1010018);               // What do you want to use this item on?

            from.Target = new BladedItemTarget(this);
        }
Exemplo n.º 6
0
        public override void OnDoubleClick(Mobile from)
        {
            if (!Sphere.CanUse(from, this))
            {
                return;
            }

            base.OnDoubleClick(from);

            if (this is HammerPick || this is WarHammer)
            {
                from.Target = new SmithTarget(this, DefBlacksmithy.CraftSystem);
            }
        }
Exemplo n.º 7
0
        public override void OnDoubleClick(Mobile from)
        {
            if (!Sphere.CanUse(from, this))
            {
                return;
            }

            if (!DesignContext.Check(from))
            {
                return;                 // They are customizing
            }
            if (!IsChildOf(from.Backpack))
            {
                from.SendLocalizedMessage(1042001);                   // That must be in your pack for you to use it.
                return;
            }

            Spell spell = SpellRegistry.NewSpell(m_SpellID, from, this);

            if (spell != null)
            {
                int mana = ManaCost > 0 ? ManaCost : spell.ScaleMana(spell.GetMana());

                if (from.Mana < mana)
                {
                    from.SendAsciiMessage("You lack sufficient mana for this scroll.");
                    return;
                }

                if (from.Mana - PrecastManaCost < 0)
                {
                    from.Mana = 0;
                }
                else
                {
                    from.Mana -= PrecastManaCost;
                }

                spell.Cast();
            }
            else
            {
                from.SendLocalizedMessage(502345); // This spell has been temporarily disabled.
            }
        }
Exemplo n.º 8
0
        public override void OnDoubleClick(Mobile from)//XUO SCROLLS
        {
            if (!Sphere.CanUse(from, this))
            {
                return;
            }

            if (from.Mana < 11)
            {
                from.LastKiller = from;
                from.Kill();
            }
            else
            {
                from.Mana -= 10;

                base.OnDoubleClick(from);
            }
        }