Пример #1
0
        //TODO: add pub 84, 88 and 95 shit
        public override void OnDoubleClick(Mobile from)
        {
            if (m_UsesRemaining > 0)
            {
                Item item = null;

                switch (Utility.Random(10))
                {
                case 0: item = new SweetPotatoPie(); break;

                case 1: item = new MashedSweetPotatoes(); break;

                case 2: item = new BasketOfRolls(); break;

                case 3: item = new TurkeyPlatter(); break;

                case 4:
                    BaseCreature bc = new Turkey(true);
                    if (0.10 > Utility.RandomDouble())
                    {
                        bc.Name = "Mister Gobbles";
                    }
                    bc.MoveToWorld(from.Location, from.Map);
                    from.SendLocalizedMessage(1153512);     //That one's not cooked!
                    break;

                case 5:
                    new InternalTimer(from);
                    from.Frozen = true;
                    break;

                case 6: item = new PottedCoffeePlant(); break;

                case 7: item = new RoastingPigOnASpitDeed(); break;

                case 8: item = new FormalDiningTableDeed(); break;

                case 9: item = new BuffetTableDeed(); break;
                }

                if (item != null)
                {
                    if (from.Backpack == null || !from.Backpack.TryDropItem(from, item, false))
                    {
                        item.MoveToWorld(from.Location, from.Map);
                    }

                    UsesRemaining--;
                }
            }
        }
Пример #2
0
        public override void OnDoubleClick(Mobile from)
        {
            if (m_UsesRemaining > 0)
            {
                Item item = null;

                switch (Utility.Random(6))
                {
                    case 0: item = new SweetPotatoPie(); break;
                    case 1: item = new MashedSweetPotatoes(); break;
                    case 2: item = new BasketOfRolls(); break;
                    case 3: item = new TurkeyPlatter(); break;
                    case 4:
                        BaseCreature bc = new Turkey(true);
                        if (0.10 > Utility.RandomDouble())
                            bc.Name = "Mister Gobbles";
                        bc.MoveToWorld(from.Location, from.Map);
                        from.SendLocalizedMessage(1153512); //That one's not cooked!
                        break;
                    case 5:
                        new InternalTimer(from);
                        from.Frozen = true;
                        break;
                }

                if (item != null)
                {
                    if (from.Backpack == null || !from.Backpack.TryDropItem(from, item, false))
                        item.MoveToWorld(from.Location, from.Map);

                    UsesRemaining--;
                }
            }
        }