Пример #1
0
        public override void OnResponse(NetState sender, RelayInfo info)
        {
            PlayerMobile pm = from as PlayerMobile;

            if (info.ButtonID == 1)
            {
                BankBox bank = from.BankBox;

                if (bank == null)
                {
                    return;
                }

                Accounting.Account acct = from.Account as Accounting.Account;

                switch (token.Type)
                {
                case PromotionalType.SoulStone:
                {
                    SoulStone ss = new SoulStone(acct.Username);

                    bank.DropItem(ss);

                    from.SendLocalizedMessage(1070743);                                       // A Soulstone has been created in your bank box!

                    break;
                }

                case PromotionalType.SoulStoneFragment:
                {
                    int offset = Utility.Random(0, 8);

                    SoulStoneFragment ssf = new SoulStoneFragment(0x2AA1 + offset, acct.Username);

                    bank.DropItem(ssf);

                    from.SendLocalizedMessage(1070976);                                       // A soulstone fragment has been created in your bank box.

                    break;
                }

                case PromotionalType.AdvancedCharacter:
                {
                    pm.SendGump(new AdvancedCharacterChoiceGump());

                    pm.ACState = AdvancedCharacterState.InUse;

                    break;
                }
                    // TODO: character transfer, seventh anniversary
                }

                token.Delete();
            }
        }
Пример #2
0
        public override void OnDoubleClick(Mobile from)
        {
            int number;

            BankBox box = from.FindBankNoCreate();

            if (m_Commodity != null)
            {
                if (box != null && IsChildOf(box))
                {
                    number = 1047031;                     // The commodity has been redeemed.

                    box.DropItem(m_Commodity);

                    m_Commodity = null;
                    Delete();
                }
                else
                {
                    number = 1047024;                     // To claim the resources ....
                }
            }
            else if (box == null || !IsChildOf(box))
            {
                number = 1047026;                 // That must be in your bank box to use it.
            }
            else
            {
                number = 1047029;                 // Target the commodity to fill this deed with.

                from.Target = new InternalTarget(this);
            }

            from.SendLocalizedMessage(number);
        }
Пример #3
0
        public override void OnDoubleClick(Mobile from)
        {
            string number;

            BankBox box = from.BankBox;

            if (m_Commodity != null)
            {
                if (box != null && IsChildOf(box))
                {
                    number = "The commodity has been redeemed.";

                    box.DropItem(m_Commodity);

                    m_Commodity = null;
                    Delete();
                }
                else
                {
                    number = "To claim the resources ....";
                }
            }
            else if (box == null || !IsChildOf(box))
            {
                number = "That must be in your bank box to use it.";
            }
            else
            {
                number = "Target the commodity to fill this deed with.";

                from.Target = new InternalTarget(this);
            }

            from.SendAsciiMessage(number);
        }
Пример #4
0
        public void EndInvasion()
        {
            WaveTimer.Stop();

            for (int i = 0; i < Spawn.Count; ++i)
            {
                Mobile m = (Mobile)Spawn[i];
                Spawn.Remove(m);
                m.Delete();
            }

            for (int i = 0; i < Players.Count; ++i)
            {
                PlayerMobile pm = (PlayerMobile)Players[i];
                Players.Remove(pm);

                BankBox bank = (BankBox)pm.BankBox;
                bank.DropItem(new BankCheck(InvasionConfig.Reward));
            }

            Killed     = 0;
            inprogress = false;
            ThisRegion.Unregister();
            ThisRegion = null;
        }
Пример #5
0
        public override void OnDoubleClick(Mobile from)
        {
            int number;

            BankBox          box = from.FindBankNoCreate();
            CommodityDeedBox cox = CommodityDeedBox.Find(this);

            // Veteran Rewards mods
            if (m_Commodity != null)
            {
                if (box != null && IsChildOf(box))
                {
                    number = 1047031;                     // The commodity has been redeemed.


                    box.DropItem(m_Commodity);

                    m_Commodity = null;
                    Delete();
                }
                else if (cox != null)
                {
                    if (cox.IsSecure)
                    {
                        number = 1047031;                         // The commodity has been redeemed.
                        m_Commodity.InstanceID = cox.InstanceID;
                        cox.DropItem(m_Commodity);

                        m_Commodity = null;
                        Delete();
                    }
                    else
                    {
                        number = 1080525;                         // The commodity deed box must be secured before you can use it.
                    }
                }
                else
                {
                    number = 1080526;                     // That must be in your bank box or commodity deed box to use it.
                }
            }
            else if (cox != null && !cox.IsSecure)
            {
                number = 1080525;                 // The commodity deed box must be secured before you can use it.
            }
            else if ((box == null || !IsChildOf(box)) && cox == null)
            {
                number = 1080526;                 // That must be in your bank box or commodity deed box to use it.
            }
            else
            {
                number = 1047029;                 // Target the commodity to fill this deed with.

                from.Target = new InternalTarget(this);
            }

            from.SendLocalizedMessage(number);
        }
Пример #6
0
        public override void OnDoubleClick(Mobile from)
        {
            int number;

            BankBox box = from.BankBox;

            //if ( m_Commodity != null )
            if (m_Type != null)
            {
                if (box != null && IsChildOf(box))
                {
                    number = 1047031;                     // The commodity has been redeemed.

                    Item commodity = null;
                    System.Reflection.ConstructorInfo ci = m_Type.GetConstructor(new Type[0]);
                    if (ci != null)
                    {
                        commodity = ci.Invoke(null) as Item;
                    }

                    if (commodity != null)
                    {
                        commodity.Amount = m_Amount;

                        box.DropItem(commodity);

                        Delete();
                    }
                    else
                    {
                        from.SendMessage("Error with Commodity Deed - please contact GM.");
                    }
                }
                else
                {
                    number = 1047024;                     // To claim the resources ....
                }
            }
            else if (box == null || !IsChildOf(box))
            {
                number = 1047026;                 // That must be in your bank box to use it.
            }
            else
            {
                number = 1047029;                 // Target the commodity to fill this deed with.

                from.Target = new InternalTarget(this);
            }

            from.SendLocalizedMessage(number);
        }
Пример #7
0
        private static void AddPowerScrolls( BankBox bank )
        {
            Bag bag = new Bag();

            for ( int i = 0; i < PowerScroll.Skills.Count; ++i )
                bag.DropItem( new PowerScroll( PowerScroll.Skills[i], 120.0 ) );

            bag.DropItem( new StatCapScroll( 250 ) );

            bank.DropItem( bag );
        }
Пример #8
0
        public void makeready(Mobile who)
        {
            PlayerMobile c = (PlayerMobile)who;

            if (!who.Alive)
            {
                who.Resurrect();
            }

            Container bp      = c.Backpack;
            Container bankbag = new Bag();

            bankbag.Hue = 63;
            BankBox bank   = c.BankBox;
            Item    oncurs = c.Holding;

            if (oncurs != null)
            {
                bp.DropItem(oncurs);
            }

            c.SendMessage("You have 10 seconds until the duel begins");
            c.SendMessage(63, "After one of you dies, both of you will be teleported out");

            c.Criminal = true;
            c.CurePoison(c);

            c.Blessed = true;
            c.Frozen  = true;

            c.Hits = c.HitsMax;
            c.Mana = c.ManaMax;
            c.Stam = c.StamMax;

            c.StatMods.Clear();

            if (bp != null)
            {
                Item toDisarm = c.FindItemOnLayer(Layer.OneHanded);

                if (toDisarm == null || !toDisarm.Movable)
                {
                    toDisarm = c.FindItemOnLayer(Layer.TwoHanded);
                }

                if (toDisarm != null)
                {
                    bp.DropItem(toDisarm);
                }

                if (c.Mount != null)
                {
                    IMount mount = c.Mount;
                    mount.Rider = null;
                    if (mount is BaseMount)
                    {
                        BaseMount oldMount = (BaseMount)mount;
                        oldMount.Map = Map.Internal;
                        c.TempMount  = oldMount;
                    }
                }

                //while((BasePotion)bp.FindItemByType(typeof(BasePotion)) != null)
                //{
                //	BasePotion potion = (BasePotion)bp.FindItemByType(typeof(BasePotion));
                //	bankbag.DropItem(potion);
                //}
                while ((EtherealMount)bp.FindItemByType(typeof(EtherealMount)) != null)
                {
                    EtherealMount mount = (EtherealMount)bp.FindItemByType(typeof(EtherealMount));
                    bankbag.DropItem(mount);
                }

                /*Item[] weps = bp.FindItemsByType( typeof( BaseWeapon ) );
                 * for ( int i = 0; i < weps.Length; ++i )
                 * {
                 *      Item item = (Item)weps[i];
                 *      BaseWeapon weapon = item as BaseWeapon;
                 *      if( weapon.DamageLevel > WeaponDamageLevel.Regular )
                 *                              bankbag.DropItem( item );
                 * }*/
                if (bankbag.Items.Count > 0)
                {
                    bank.DropItem(bankbag);
                }
                else
                {
                    bankbag.Delete();
                }
            }
        }
Пример #9
0
        public override void OnResponse(GameClient sender, RelayInfo info)
        {
            PlayerMobile pm = from as PlayerMobile;

            if (info.ButtonID == 1)
            {
                BankBox bank = from.BankBox;

                if (bank == null)
                {
                    return;
                }

                Accounting.Account acct = from.Account as Accounting.Account;

                switch (token.Type)
                {
                case PromotionalType.SoulStone:
                {
                    SoulStone ss = new SoulStone(acct.Username);

                    bank.DropItem(ss);

                    from.SendLocalizedMessage(1070743);                                       // A Soulstone has been created in your bank box!

                    break;
                }

                case PromotionalType.BlueSoulstone:
                {
                    SoulStone ss = new BlueSoulstone(acct.Username);

                    bank.DropItem(ss);

                    from.SendMessage("A Blue Soulstone has been created in your bank box!");

                    break;
                }

                case PromotionalType.SoulStoneFragment:
                {
                    int offset = Utility.Random(0, 8);

                    SoulStoneFragment ssf = new SoulStoneFragment(0x2AA1 + offset, acct.Username);

                    bank.DropItem(ssf);

                    from.SendLocalizedMessage(1070976);                                       // A soulstone fragment has been created in your bank box.

                    break;
                }

                case PromotionalType.AdvancedCharacter:
                {
                    pm.SendGump(new AdvancedCharacterChoiceGump());

                    pm.ACState = AdvancedCharacterState.InUse;

                    break;
                }

                case PromotionalType.SeventhAnniversary:
                {
                    //Cerramos algún posible gump abierto (exploit arreglado)
                    if (!pm.HasGump(typeof(SeventhAniversaryGump)))
                    {
                        pm.SendGump(new SeventhAniversaryGump(token));
                    }

                    break;
                }

                case PromotionalType.EighthAnniversary:
                {
                    //Cerramos algún posible gump abierto (exploit arreglado)
                    if (!pm.HasGump(typeof(EighthAnniversaryGump)))
                    {
                        pm.SendGump(new EighthAnniversaryGump(token));
                    }

                    break;
                }

                case PromotionalType.BrokenFurniture:
                {
                    //Cerramos algún posible gump abierto (exploit arreglado)
                    if (!pm.HasGump(typeof(BrokenFurnitureGump)))
                    {
                        pm.SendGump(new BrokenFurnitureConfirmGump(token));
                    }

                    break;
                }

                case PromotionalType.HeritageItems:
                {
                    //Cerramos algún posible gump abierto (exploit arreglado)
                    if (!pm.HasGump(typeof(HeritageItemsGump)))
                    {
                        pm.SendGump(new HeritageItemsConfirmGump(token));
                    }

                    break;
                }

                case PromotionalType.EvilHomeDecoration:
                {
                    //Cerramos algún posible gump abierto (exploit arreglado)
                    if (!pm.HasGump(typeof(EvilHomeDecorationGump)))
                    {
                        pm.SendGump(new EvilHomeDecorationConfirmGump(token));
                    }

                    break;
                }
                    // TODO: character transfer
                }

                if (token.Type != PromotionalType.SeventhAnniversary &&
                    token.Type != PromotionalType.EighthAnniversary)
                {
                    token.Delete();
                }
            }
        }
Пример #10
0
        public override void OnDoubleClick(Mobile from)
        {
            int number;

            BankBox          box  = from.FindBankNoCreate();
            CommodityDeedBox cox  = CommodityDeedBox.Find(this);
            GalleonHold      hold = this.RootParent as GalleonHold;

            // Veteran Rewards mods
            if (this.m_Commodity != null)
            {
                if (box != null && this.IsChildOf(box))
                {
                    number = 1047031; // The commodity has been redeemed.

                    box.DropItem(this.m_Commodity);

                    this.m_Commodity = null;
                    this.Delete();
                }
                else if (cox != null)
                {
                    if (cox.IsSecure)
                    {
                        number = 1047031; // The commodity has been redeemed.

                        cox.DropItem(this.m_Commodity);

                        this.m_Commodity = null;
                        this.Delete();
                    }
                    else
                    {
                        number = 1080525; // The commodity deed box must be secured before you can use it.
                    }
                }
                else if (hold != null)
                {
                    number = 1047031; // The commodity has been redeemed.

                    hold.DropItem(m_Commodity);
                    m_Commodity = null;

                    Delete();
                }
                else
                {
                    if (Core.ML)
                    {
                        number = 1080526; // That must be in your bank box or commodity deed box to use it.
                    }
                    else
                    {
                        number = 1047024; // To claim the resources ....
                    }
                }
            }
            else if (cox != null && !cox.IsSecure)
            {
                number = 1080525; // The commodity deed box must be secured before you can use it.
            }
            else if ((box == null || !this.IsChildOf(box)) && cox == null && hold == null)
            {
                if (Core.ML)
                {
                    number = 1080526; // That must be in your bank box or commodity deed box to use it.
                }
                else
                {
                    number = 1047026; // That must be in your bank box to use it.
                }
            }
            else
            {
                number = 1047029; // Target the commodity to fill this deed with.

                from.Target = new InternalTarget(this);
            }

            from.SendLocalizedMessage(number);
        }
        public override void OnDoubleClick(Mobile from)
        {
            BankBox box = from.FindBankNoCreate();

            if (box != null && IsChildOf(box))
            {
                from.SendMessage(88, "Your goods are returned to you.");
                switch (m_Resource)
                {
                case 0: break;

                case 1: box.DropItem(new IronIngot(m_Amount)); this.Delete(); break;

                case 2: box.DropItem(new DullCopperIngot(m_Amount)); this.Delete(); break;

                case 3: box.DropItem(new ShadowIronIngot(m_Amount)); this.Delete(); break;

                case 4: box.DropItem(new CopperIngot(m_Amount)); this.Delete(); break;

                case 5: box.DropItem(new BronzeIngot(m_Amount)); this.Delete(); break;

                case 6: box.DropItem(new GoldIngot(m_Amount)); this.Delete(); break;

                case 7: box.DropItem(new SilverIngot(m_Amount)); this.Delete(); break;

                case 8: box.DropItem(new AgapiteIngot(m_Amount)); this.Delete(); break;

                case 9: box.DropItem(new VeriteIngot(m_Amount)); this.Delete(); break;

                case 10: box.DropItem(new ValoriteIngot(m_Amount)); this.Delete(); break;

                case 11: box.DropItem(new JadeIngot(m_Amount)); this.Delete(); break;

                case 12: box.DropItem(new MoonstoneIngot(m_Amount)); this.Delete(); break;

                case 13: box.DropItem(new SunstoneIngot(m_Amount)); this.Delete(); break;
                //case 13: box.DropItem(new Ingot(m_Amount)); this.Delete(); break;


                case 101: box.DropItem(new Leather(m_Amount)); this.Delete(); break;

                case 102: box.DropItem(new SpinedLeather(m_Amount)); this.Delete(); break;

                case 103: box.DropItem(new HornedLeather(m_Amount)); this.Delete(); break;

                case 104: box.DropItem(new BarbedLeather(m_Amount)); this.Delete(); break;

                case 105: box.DropItem(new DaemonLeather(m_Amount)); this.Delete(); break;

                case 106: box.DropItem(new DragonLeather(m_Amount)); this.Delete(); break;
                //case 107: box.DropItem(new Leather(m_Amount)); this.Delete(); break;

                case 201: box.DropItem(new RedScales(m_Amount)); this.Delete(); break;

                case 202: box.DropItem(new YellowScales(m_Amount)); this.Delete(); break;

                case 203: box.DropItem(new BlackScales(m_Amount)); this.Delete(); break;

                case 204: box.DropItem(new GreenScales(m_Amount)); this.Delete(); break;

                case 205: box.DropItem(new WhiteScales(m_Amount)); this.Delete(); break;

                case 206: box.DropItem(new BlueScales(m_Amount)); this.Delete(); break;
                //case 207: box.DropItem(new Scales(m_Amount)); this.Delete(); break;

                case 301: box.DropItem(new Log(m_Amount)); this.Delete(); break;

                case 302: box.DropItem(new OakLog(m_Amount)); this.Delete(); break;

                case 303: box.DropItem(new AshLog(m_Amount)); this.Delete(); break;

                case 304: box.DropItem(new YewLog(m_Amount)); this.Delete(); break;

                case 305: box.DropItem(new HeartwoodLog(m_Amount)); this.Delete(); break;

                case 306: box.DropItem(new BloodwoodLog(m_Amount)); this.Delete(); break;

                case 307: box.DropItem(new FrostwoodLog(m_Amount)); this.Delete(); break;

                case 308: box.DropItem(new PineLog(m_Amount)); this.Delete(); break;

                case 309: box.DropItem(new CedarLog(m_Amount)); this.Delete(); break;

                case 310: box.DropItem(new CherryLog(m_Amount)); this.Delete(); break;

                case 311: box.DropItem(new MahoganyLog(m_Amount)); this.Delete(); break;

                case 401: box.DropItem(new Board(m_Amount)); this.Delete(); break;

                case 402: box.DropItem(new OakBoard(m_Amount)); this.Delete(); break;

                case 403: box.DropItem(new AshBoard(m_Amount)); this.Delete(); break;

                case 404: box.DropItem(new YewBoard(m_Amount)); this.Delete(); break;

                case 405: box.DropItem(new HeartwoodBoard(m_Amount)); this.Delete(); break;

                case 406: box.DropItem(new BloodwoodBoard(m_Amount)); this.Delete(); break;

                case 407: box.DropItem(new FrostwoodBoard(m_Amount)); this.Delete(); break;

                case 408: box.DropItem(new PineBoard(m_Amount)); this.Delete(); break;

                case 409: box.DropItem(new CedarBoard(m_Amount)); this.Delete(); break;

                case 410: box.DropItem(new CherryBoard(m_Amount)); this.Delete(); break;

                case 411: box.DropItem(new MahoganyBoard(m_Amount)); this.Delete(); break;
                }
            }
            else
            {
                from.SendMessage(88, "The deed only works in your bankbox.");
            }
        }
Пример #12
0
        private static void AddPowerScrolls( BankBox bank )
        {
            Bag bag = new Bag();

            for ( int i = 0; i < PowerScroll.Skills.Length; ++i )
                //bag.DropItem( new PowerScroll( PowerScroll.Skills[i], 100.0 ) );

            //bag.DropItem( new StatCapScroll( 225 ) );

            bank.DropItem( bag );
        }
Пример #13
0
        // genova: flags PowerScrolls and StatusCapScrolls
        private static void AddPowerScrolls(BankBox bank)
        {
            Bag bag = new Bag();

            if (GeNovaXML.Flags_Active(XMLNames.PowerScrolls))
            {
                for (int i = 0; i < PowerScroll.Skills.Length; ++i)
                    bag.DropItem(new PowerScroll(PowerScroll.Skills[i], 120.0));
            }

            if (GeNovaXML.Flags_Active(XMLNames.StatusCapScrolls))
                bag.DropItem(new StatCapScroll(250));

            if (bag.Items.Count > 0)
                bank.DropItem(bag);
        }
Пример #14
0
            protected override void OnTarget(Mobile from, object targeted)
            {
                if (m_Deed.Deleted)
                {
                    return;
                }

                int number;

                if (m_Deed.Commodity != null)
                {
                    number = 1047028;                     // The commodity deed has already been filled.
                }
                else if (targeted is Item)
                {
                    BankBox box          = from.FindBankNoCreate();
                    string  XferResource = "...";
                    int     XferAmount   = 0;
                    int     r            = 0;

                    if (box != null && m_Deed.IsChildOf(box) && ((Item)targeted).IsChildOf(box))
                    {
                        // RESOURCE EDIT
                        if (targeted is BaseIngot) // || targeted is BaseBoards || targeted is BaseLog || targeted is BaseLeather || targeted is BaseScales || targeted is BasePowder || targeted is BaseCrystal)
                        {
                            from.SendMessage("You require a 'Special Commodity Deed' for this custom resource item...");
                            number = 1047027;
                            m_Deed.Delete();

                            BaseIngot youringots = (BaseIngot)targeted;
                            string    s_resource = Convert.ToString(youringots.Resource);
                            XferAmount = youringots.Amount;
                            switch (s_resource)
                            {
                            case "Iron": r = 1; box.DropItem(new SpecialCommodityDeed(XferAmount, r)); youringots.Delete(); break;

                            case "DullCopper": r = 2; box.DropItem(new SpecialCommodityDeed(XferAmount, r)); youringots.Delete(); break;

                            case "ShadowIron": r = 3; box.DropItem(new SpecialCommodityDeed(XferAmount, r)); youringots.Delete(); break;

                            case "Copper": r = 4; box.DropItem(new SpecialCommodityDeed(XferAmount, r)); youringots.Delete(); break;

                            case "Bronze": r = 5; box.DropItem(new SpecialCommodityDeed(XferAmount, r)); youringots.Delete(); break;

                            case "Gold": r = 6; box.DropItem(new SpecialCommodityDeed(XferAmount, r)); youringots.Delete(); break;

                            case "Silver": r = 7; box.DropItem(new SpecialCommodityDeed(XferAmount, r)); youringots.Delete(); break;

                            case "Agapite": r = 8; box.DropItem(new SpecialCommodityDeed(XferAmount, r)); youringots.Delete(); break;

                            case "Verite": r = 9; box.DropItem(new SpecialCommodityDeed(XferAmount, r)); youringots.Delete(); break;

                            case "Valorite": r = 10; box.DropItem(new SpecialCommodityDeed(XferAmount, r)); youringots.Delete(); break;

                            case "Jade": r = 11; box.DropItem(new SpecialCommodityDeed(XferAmount, r)); youringots.Delete(); break;

                            case "Moonstone": r = 12; box.DropItem(new SpecialCommodityDeed(XferAmount, r)); youringots.Delete(); break;

                            case "Sunstone": r = 13; box.DropItem(new SpecialCommodityDeed(XferAmount, r)); youringots.Delete(); break;
                                //case "": r = 13; box.DropItem(new YaksCommodityDeed(XferAmount, r)); youringots.Delete(); break;
                            }
                        }
                        else if (targeted is BaseLeather) // || targeted is BaseBoards || targeted is BaseLog || targeted is BaseLeather || targeted is BaseScales || targeted is BasePowder || targeted is BaseCrystal)
                        {
                            from.SendMessage("You require a 'Special Commodity Deed' for this custom resource item...");
                            number = 1047027;
                            m_Deed.Delete();

                            BaseLeather youritem   = (BaseLeather)targeted;
                            string      s_resource = Convert.ToString(youritem.Resource);
                            XferAmount = youritem.Amount;
                            switch (s_resource)
                            {
                            case "RegularLeather": r = 101; box.DropItem(new SpecialCommodityDeed(XferAmount, r)); youritem.Delete(); break;

                            case "SpinedLeather": r = 102; box.DropItem(new SpecialCommodityDeed(XferAmount, r)); youritem.Delete(); break;

                            case "HornedLeather": r = 103; box.DropItem(new SpecialCommodityDeed(XferAmount, r)); youritem.Delete(); break;

                            case "BarbedLeather": r = 104; box.DropItem(new SpecialCommodityDeed(XferAmount, r)); youritem.Delete(); break;

                            case "DaemonLeather": r = 105; box.DropItem(new SpecialCommodityDeed(XferAmount, r)); youritem.Delete(); break;

                            case "DragonLeather": r = 106; box.DropItem(new SpecialCommodityDeed(XferAmount, r)); youritem.Delete(); break;
                            }
                        }
                        else if (targeted is BaseScales) // || targeted is BaseBoards || targeted is BaseLog || targeted is BaseLeather || targeted is BaseScales || targeted is BasePowder || targeted is BaseCrystal)
                        {
                            from.SendMessage("You require a 'Special Commodity Deed' for this custom resource item...");
                            number = 1047027;
                            m_Deed.Delete();

                            BaseScales youritem   = (BaseScales)targeted;
                            string     s_resource = Convert.ToString(youritem.Resource);
                            XferAmount = youritem.Amount;
                            switch (s_resource)
                            {
                            case "RedScales": r = 201; box.DropItem(new SpecialCommodityDeed(XferAmount, r)); youritem.Delete(); break;

                            case "YellowScales": r = 202; box.DropItem(new SpecialCommodityDeed(XferAmount, r)); youritem.Delete(); break;

                            case "BlackScales": r = 203; box.DropItem(new SpecialCommodityDeed(XferAmount, r)); youritem.Delete(); break;

                            case "GreenScales": r = 204; box.DropItem(new SpecialCommodityDeed(XferAmount, r)); youritem.Delete(); break;

                            case "WhiteScales": r = 205; box.DropItem(new SpecialCommodityDeed(XferAmount, r)); youritem.Delete(); break;

                            case "BlueScales": r = 206; box.DropItem(new SpecialCommodityDeed(XferAmount, r)); youritem.Delete(); break;
                                //case "IceScales": r = 207; box.DropItem(new YaksCommodityDeed(XferAmount, r)); youritem.Delete(); break;
                            }
                        }
                        else if (targeted is BaseLog)// || targeted is BaseLog || targeted is BaseLeather || targeted is BaseScales || targeted is BasePowder || targeted is BaseCrystal)
                        {
                            from.SendMessage("You require a 'Special Commodity Deed' for this custom resource item...");
                            number = 1047027;
                            m_Deed.Delete();

                            BaseLog youritem   = (BaseLog)targeted;
                            string  s_resource = Convert.ToString(youritem.Resource);
                            XferAmount = youritem.Amount;
                            switch (s_resource)
                            {
                            case "Regular": r = 301; box.DropItem(new SpecialCommodityDeed(XferAmount, r)); youritem.Delete(); break;

                            case "Oak": r = 302; box.DropItem(new SpecialCommodityDeed(XferAmount, r)); youritem.Delete(); break;

                            case "Ash": r = 303; box.DropItem(new SpecialCommodityDeed(XferAmount, r)); youritem.Delete(); break;

                            case "Yew": r = 304; box.DropItem(new SpecialCommodityDeed(XferAmount, r)); youritem.Delete(); break;

                            case "Heartwood": r = 305; box.DropItem(new SpecialCommodityDeed(XferAmount, r)); youritem.Delete(); break;

                            case "Bloodwood": r = 306; box.DropItem(new SpecialCommodityDeed(XferAmount, r)); youritem.Delete(); break;

                            case "Frostwood": r = 307; box.DropItem(new SpecialCommodityDeed(XferAmount, r)); youritem.Delete(); break;

                            case "Pine": r = 308; box.DropItem(new SpecialCommodityDeed(XferAmount, r)); youritem.Delete(); break;

                            case "Cedar": r = 309; box.DropItem(new SpecialCommodityDeed(XferAmount, r)); youritem.Delete(); break;

                            case "Cherry": r = 310; box.DropItem(new SpecialCommodityDeed(XferAmount, r)); youritem.Delete(); break;

                            case "Mahogany": r = 311; box.DropItem(new SpecialCommodityDeed(XferAmount, r)); youritem.Delete(); break;
                            }
                        }
                        else if (targeted is BaseBoards)// || targeted is BaseLog || targeted is BaseLeather || targeted is BaseScales || targeted is BasePowder || targeted is BaseCrystal)
                        {
                            from.SendMessage("You require a 'Special Commodity Deed' for this custom resource item...");
                            number = 1047027;
                            m_Deed.Delete();

                            BaseBoards youritem   = (BaseBoards)targeted;
                            string     s_resource = Convert.ToString(youritem.Resource);
                            XferAmount = youritem.Amount;
                            switch (s_resource)
                            {
                            case "Regular": r = 401; box.DropItem(new SpecialCommodityDeed(XferAmount, r)); youritem.Delete(); break;

                            case "Oak": r = 402; box.DropItem(new SpecialCommodityDeed(XferAmount, r)); youritem.Delete(); break;

                            case "Ash": r = 03; box.DropItem(new SpecialCommodityDeed(XferAmount, r)); youritem.Delete(); break;

                            case "Yew": r = 404; box.DropItem(new SpecialCommodityDeed(XferAmount, r)); youritem.Delete(); break;

                            case "Heartwood": r = 405; box.DropItem(new SpecialCommodityDeed(XferAmount, r)); youritem.Delete(); break;

                            case "Bloodwood": r = 406; box.DropItem(new SpecialCommodityDeed(XferAmount, r)); youritem.Delete(); break;

                            case "Frostwood": r = 407; box.DropItem(new SpecialCommodityDeed(XferAmount, r)); youritem.Delete(); break;

                            case "Pine": r = 408; box.DropItem(new SpecialCommodityDeed(XferAmount, r)); youritem.Delete(); break;

                            case "Cedar": r = 409; box.DropItem(new SpecialCommodityDeed(XferAmount, r)); youritem.Delete(); break;

                            case "Cherry": r = 410; box.DropItem(new SpecialCommodityDeed(XferAmount, r)); youritem.Delete(); break;

                            case "Mahogany": r = 411; box.DropItem(new SpecialCommodityDeed(XferAmount, r)); youritem.Delete(); break;
                            }
                        }
                        else
                        {
                            if (m_Deed.SetCommodity((Item)targeted))
                            {
                                number = 1047030; // The commodity deed has been filled.
                            }
                            else
                            {
                                number = 1047027; // That is not a commodity the bankers will fill a commodity deed with.
                            }
                        }
                    }
                    else
                    {
                        number = 1047026;                         // That must be in your bank box to use it.
                    }
                }
                else
                {
                    number = 1047027;                     // That is not a commodity the bankers will fill a commodity deed with.
                }

                from.SendLocalizedMessage(number);
            }