Esempio n. 1
0
            protected override void OnTarget(Mobile from, object targeted)
            {
                PlayerMobile pm = from as PlayerMobile;

                if (pm == null || m_Item == null || m_Item.Deleted)
                {
                    return;
                }

                PlantItem plant = targeted as PlantItem;

                if (null == plant || PlantStatus.DecorativePlant != plant.PlantStatus)
                {
                    from.SendLocalizedMessage(1112119); // You may only use these clippers on decorative plants.
                    return;
                }

                if (pm.ToggleCutClippings)
                {
                    from.PlaySound(0x248);
                    from.AddToBackpack(
                        new PlantClippings
                    {
                        Hue      = ((PlantItem)targeted).Hue,
                        PlantHue = plant.PlantHue
                    });
                    plant.Delete();
                    m_Item.ConsumeUse(from);
                }
                else if (pm.ToggleCutReeds)
                {
                    from.PlaySound(0x248);
                    from.AddToBackpack(
                        new DryReeds
                    {
                        Hue      = ((PlantItem)targeted).Hue,
                        PlantHue = plant.PlantHue
                    });
                    plant.Delete();
                    m_Item.ConsumeUse(from);
                }
                else if (pm.ToggleCutTopiaries)
                {
                    if (plant.PlantType == PlantType.HedgeTall || plant.PlantType == PlantType.HedgeShort || plant.PlantType == PlantType.JuniperBush)
                    {
                        from.CloseGump(typeof(TopiaryGump));
                        from.SendGump(new TopiaryGump(plant, m_Item));
                    }
                }
            }
Esempio n. 2
0
        public override void OnResponse(NetState sender, RelayInfo info)
        {
            Mobile from = sender.Mobile;

            switch (info.ButtonID)
            {
            case 0:
            {
                break;
            }

            case 1:
            {
                from.PlaySound(0x248);
                m_plant.ItemID = 18713;
                m_clippers.ConsumeUse(from);
                break;
            }

            case 2:
            {
                from.PlaySound(0x248);
                m_plant.ItemID = 18714;
                m_clippers.ConsumeUse(from);
                break;
            }

            case 3:
            {
                from.PlaySound(0x248);
                m_plant.ItemID = 18715;
                m_clippers.ConsumeUse(from);
                break;
            }

            case 4:
            {
                from.PlaySound(0x248);
                m_plant.ItemID = 18736;
                m_clippers.ConsumeUse(from);
                break;
            }

            case 5:
            {
                from.PlaySound(0x248);
                m_plant.ItemID = 18813;
                m_clippers.ConsumeUse(from);
                break;
            }

            case 6:
            {
                from.PlaySound(0x248);
                m_plant.ItemID = 18814;
                m_clippers.ConsumeUse(from);
                break;
            }

            case 7:
            {
                from.PlaySound(0x248);
                m_plant.ItemID = 18814;
                m_clippers.ConsumeUse(from);
                break;
            }

            case 8:
            {
                from.PlaySound(0x248);
                m_plant.ItemID = 18713;
                m_clippers.ConsumeUse(from);
                break;
            }

            case 9:
            {
                from.PlaySound(0x248);
                m_plant.ItemID = 19369;
                m_clippers.ConsumeUse(from);
                break;
            }
            }
        }