Example #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.
            }
        }
Example #2
0
        public override void OnDoubleClick(Mobile from)
        {
            //equip before using
            base.OnDoubleClick(from);
            if (HarvestSystem == null || Deleted)
            {
                return;
            }

            Point3D loc = GetWorldLocation();

            if (!from.InLOS(loc) || !from.InRange(loc, 2))
            {
                from.LocalOverheadMessage(Server.Network.MessageType.Regular, 0x3E9, 1019045);                   // I can't reach that
                return;
            }
            else if (!this.IsAccessibleTo(from))
            {
                this.PublicOverheadMessage(MessageType.Regular, 0x3E9, 1061637);                   // You are not allowed to access this.
                return;
            }

            if (!(this.HarvestSystem is Mining))
            {
                from.SendLocalizedMessage(1010018);                   // What do you want to use this item on?
            }
            HarvestSystem.BeginHarvesting(from, this);
        }
Example #3
0
 public override void OnDoubleClick(Mobile from)
 {
     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.
     }
 }
 public override void OnDoubleClick(Mobile from)
 {
     if (HarvestSystem == null)
     {
         return;
     }
     if (IsChildOf(from.Backpack) || Parent == from)
     {
         HarvestSystem.BeginHarvesting(from, this);
     }
     else
     {
         from.SendLocalizedMessage(1042001);
     }
 }
Example #5
0
        public override void OnDoubleClick(Mobile from)
        {
            if (HarvestSystem == null)
            {
                return;
            }

            if (IsChildOf(from.Backpack) || Parent == from)
            {
                HarvestSystem.BeginHarvesting(from, this);
            }
            else
            {
                from.SendAsciiMessage("That must be in your pack for you to use it.");                   // That must be in your pack for you to use it.
            }
        }
Example #6
0
        public override void OnDoubleClick(Mobile from)
        {
            base.OnDoubleClick(from);

            if (HarvestSystem == null)
            {
                return;
            }

            double check = Utility.RandomDouble();

            if (IsChildOf(from.Backpack) || Parent == from)
            {
                HarvestSystem.BeginHarvesting(from, this);
            }
            else
            {
                from.SendAsciiMessage("That must be in your pack for you to use it.");
            }
        }
Example #7
0
        public override void OnDoubleClick(Mobile from)
        {
            if (HarvestSystem == null)
            {
                return;
            }

            Point3D loc = GetWorldLocation();

            if (!from.InLOS(loc) || !from.InRange(loc, 2))
            {
                from.LocalOverheadMessage(Server.Network.MessageType.Regular, 0x3E9, 1019045);                   // I can't reach that
                return;
            }

            if (!(HarvestSystem is Mining))
            {
                from.SendLocalizedMessage(1010018);                   // What do you want to use this item on?
            }
            HarvestSystem.BeginHarvesting(from, this);
        }
Example #8
0
        public override void OnDoubleClick(Mobile from)
        {
            // Scriptiz : gestion du double clic pour équipper un objet
            if (from.FindItemOnLayer(this.Layer) != this)
            {
                base.OnDoubleClick(from);
                return;
            }

            if (HarvestSystem == null)
            {
                return;
            }

            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.
            }
        }
Example #9
0
        public override void OnDoubleClick(Mobile from)
        {
            if (HarvestSystem == null)
            {
                return;
            }

            if (IsChildOf(from.Backpack) || Parent == from)
            {
                if (UsesRemaining > 0)
                {
                    HarvestSystem.BeginHarvesting(from, this);
                }
                else
                {
                    from.SendLocalizedMessage(1072306); // You must wait a moment for it to recharge.
                }
            }
            else
            {
                from.SendLocalizedMessage(1042001); // That must be in your pack for you to use it.
            }
        }