public ResourceStorageKeySpellCastersTarget(ResourceStorageKeySpellCasters key)
     : base(17, false, TargetFlags.None)//changed from 18
 {
     m_Key = key;
 }
        public ResourceStorageKeySpellCastersGump(PlayerMobile from, ResourceStorageKeySpellCasters key)
            : base(25, 25)
        {
            m_From = from;
            m_Key  = key;

            m_From.CloseGump(typeof(ResourceStorageKeySpellCastersGump));

            AddPage(0);

            AddBackground(50, 10, 455, 430, 5054);
            AddImageTiled(58, 20, 438, 410, 2624);
            AddAlphaRegion(58, 20, 438, 410);

            AddLabel(200, 25, 88, "Spell Caster's Warehouse");
// Kazuha
            AddLabel(125, 50, 0x486, "Withdraw Increment");
            AddLabel(275, 50, 0x480, key.WithdrawIncrement.ToString());
            AddButton(330, 50, 4011, 4012, 28, GumpButtonType.Reply, 0);
            AddButton(360, 50, 4011, 4012, 29, GumpButtonType.Reply, 0);
            AddButton(390, 50, 4011, 4012, 30, GumpButtonType.Reply, 0);
// /Kazuha

            AddLabel(125, 75, 0x486, "BlackPearl");
            AddButton(75, 75, 4005, 4007, 1, GumpButtonType.Reply, 0);
            if (m_Key.Regs.ContainsKey(typeof(BlackPearl)))
            {
                AddLabel(225, 75, 0x480, m_Key.Regs[typeof(BlackPearl)].ToString());
            }
            else
            {
                AddLabel(225, 75, 0x480, "0");
            }

            AddLabel(125, 100, 0x486, "Bloodmoss");
            AddButton(75, 100, 4005, 4007, 2, GumpButtonType.Reply, 0);
            if (m_Key.Regs.ContainsKey(typeof(Bloodmoss)))
            {
                AddLabel(225, 100, 0x480, m_Key.Regs[typeof(Bloodmoss)].ToString());
            }
            else
            {
                AddLabel(225, 100, 0x480, "0");
            }

            AddLabel(125, 125, 0x486, "Garlic");
            AddButton(75, 125, 4005, 4007, 3, GumpButtonType.Reply, 0);
            if (m_Key.Regs.ContainsKey(typeof(Garlic)))
            {
                AddLabel(225, 125, 0x480, m_Key.Regs[typeof(Garlic)].ToString());
            }
            else
            {
                AddLabel(225, 125, 0x480, "0");
            }

            AddLabel(125, 150, 0x486, "Ginseng");
            AddButton(75, 150, 4005, 4007, 4, GumpButtonType.Reply, 0);
            if (m_Key.Regs.ContainsKey(typeof(Ginseng)))
            {
                AddLabel(225, 150, 0x480, m_Key.Regs[typeof(Ginseng)].ToString());
            }
            else
            {
                AddLabel(225, 150, 0x480, "0");
            }

            AddLabel(125, 175, 0x486, "MandrakeRoot");
            AddButton(75, 175, 4005, 4007, 5, GumpButtonType.Reply, 0);
            if (m_Key.Regs.ContainsKey(typeof(MandrakeRoot)))
            {
                AddLabel(225, 175, 0x480, m_Key.Regs[typeof(MandrakeRoot)].ToString());
            }
            else
            {
                AddLabel(225, 175, 0x480, "0");
            }

            AddLabel(125, 200, 0x486, "Nightshade");
            AddButton(75, 200, 4005, 4007, 6, GumpButtonType.Reply, 0);
            if (m_Key.Regs.ContainsKey(typeof(Nightshade)))
            {
                AddLabel(225, 200, 0x480, m_Key.Regs[typeof(Nightshade)].ToString());
            }
            else
            {
                AddLabel(225, 200, 0x480, "0");
            }

            AddLabel(125, 225, 0x486, "SulfurousAsh");
            AddButton(75, 225, 4005, 4007, 7, GumpButtonType.Reply, 0);
            if (m_Key.Regs.ContainsKey(typeof(SulfurousAsh)))
            {
                AddLabel(225, 225, 0x480, m_Key.Regs[typeof(SulfurousAsh)].ToString());
            }
            else
            {
                AddLabel(225, 225, 0x480, "0");
            }

            AddLabel(125, 250, 0x486, "SpidersSilk");
            AddButton(75, 250, 4005, 4007, 8, GumpButtonType.Reply, 0);
            if (m_Key.Regs.ContainsKey(typeof(SpidersSilk)))
            {
                AddLabel(225, 250, 0x480, m_Key.Regs[typeof(SpidersSilk)].ToString());
            }
            else
            {
                AddLabel(225, 250, 0x480, "0");
            }

            AddLabel(125, 275, 0x486, "BatWing");
            AddButton(75, 275, 4005, 4007, 9, GumpButtonType.Reply, 0);
            if (m_Key.Regs.ContainsKey(typeof(BatWing)))
            {
                AddLabel(225, 275, 0x480, m_Key.Regs[typeof(BatWing)].ToString());
            }
            else
            {
                AddLabel(225, 275, 0x480, "0");
            }

            AddLabel(125, 300, 0x486, "GraveDust");
            AddButton(75, 300, 4005, 4007, 10, GumpButtonType.Reply, 0);
            if (m_Key.Regs.ContainsKey(typeof(GraveDust)))
            {
                AddLabel(225, 300, 0x480, m_Key.Regs[typeof(GraveDust)].ToString());
            }
            else
            {
                AddLabel(225, 300, 0x480, "0");
            }

            AddLabel(125, 325, 0x486, "DaemonBlood");
            AddButton(75, 325, 4005, 4007, 11, GumpButtonType.Reply, 0);
            if (m_Key.Regs.ContainsKey(typeof(DaemonBlood)))
            {
                AddLabel(225, 325, 0x480, m_Key.Regs[typeof(DaemonBlood)].ToString());
            }
            else
            {
                AddLabel(225, 325, 0x480, "0");
            }

            AddLabel(125, 350, 0x486, "NoxCrystal");
            AddButton(75, 350, 4005, 4007, 12, GumpButtonType.Reply, 0);
            if (m_Key.Regs.ContainsKey(typeof(NoxCrystal)))
            {
                AddLabel(225, 350, 0x480, m_Key.Regs[typeof(NoxCrystal)].ToString());
            }
            else
            {
                AddLabel(225, 350, 0x480, "0");
            }

            AddLabel(125, 375, 0x486, "PigIron");
            AddButton(75, 375, 4005, 4007, 13, GumpButtonType.Reply, 0);
            if (m_Key.Regs.ContainsKey(typeof(PigIron)))
            {
                AddLabel(225, 375, 0x480, m_Key.Regs[typeof(PigIron)].ToString());
            }
            else
            {
                AddLabel(225, 375, 0x480, "0");
            }

//            AddLabel(325, 75, 0x486, "Bone");
//            AddLabel(425, 75, 0x480, key.Bone.ToString());
//            AddButton(275, 75, 4005, 4007, 18, GumpButtonType.Reply, 0);

            AddLabel(325, 100, 0x486, "Daemon Bone");
            AddButton(275, 100, 4005, 4007, 19, GumpButtonType.Reply, 0);
            if (m_Key.Regs.ContainsKey(typeof(DaemonBone)))
            {
                AddLabel(425, 100, 0x480, m_Key.Regs[typeof(DaemonBone)].ToString());
            }
            else
            {
                AddLabel(425, 100, 0x480, "0");
            }

            AddLabel(325, 125, 0x486, "PotionKeg");
            AddLabel(425, 125, 0x480, key.PotionKeg.ToString());
            AddButton(275, 125, 4005, 4007, 20, GumpButtonType.Reply, 0);

            AddLabel(325, 150, 0x486, "BlankScroll");
            AddLabel(425, 150, 0x480, key.BlankScroll.ToString());
            AddButton(275, 150, 4005, 4007, 21, GumpButtonType.Reply, 0);

            //Styx
            AddLabel(125, 400, 0x486, "Recall Rune");
            AddLabel(225, 400, 0x480, key.Rune.ToString());
            AddButton(75, 400, 4005, 4007, 27, GumpButtonType.Reply, 0);
            //Styx

            AddLabel(325, 175, 0x486, "Bottle");
            AddLabel(425, 175, 0x480, key.Bottle.ToString());
            AddButton(275, 175, 4005, 4007, 22, GumpButtonType.Reply, 0);

            AddLabel(325, 200, 0x486, "Sand");
            AddLabel(425, 200, 0x480, key.Sand.ToString());
            AddButton(275, 200, 4005, 4007, 23, GumpButtonType.Reply, 0);
            // daat99 keyring 6/7
            AddLabel(325, 225, 0x486, "KeyRing");
            AddLabel(425, 225, 0x480, key.KeyRing.ToString());
            AddButton(275, 225, 4005, 4007, 24, GumpButtonType.Reply, 0);
            //
            AddLabel(325, 250, 0x486, "Bees Wax");
            AddButton(275, 250, 4005, 4007, 17, GumpButtonType.Reply, 0);
            if (m_Key.Regs.ContainsKey(typeof(Beeswax)))
            {
                AddLabel(425, 250, 0x480, m_Key.Regs[typeof(Beeswax)].ToString());
            }
            else
            {
                AddLabel(425, 250, 0x480, "0");
            }

            AddLabel(325, 275, 0x486, "Dead Wood");
            AddButton(275, 275, 4005, 4007, 14, GumpButtonType.Reply, 0);
            if (m_Key.Regs.ContainsKey(typeof(DeadWood)))
            {
                AddLabel(425, 275, 0x480, m_Key.Regs[typeof(DeadWood)].ToString());
            }
            else
            {
                AddLabel(425, 275, 0x480, "0");
            }

//            AddLabel(325, 300, 0x486, "Executioner's Cap");
//            AddButton(275, 300, 4005, 4007, 15, GumpButtonType.Reply, 0);
//            if (m_Key.Regs.ContainsKey(typeof(ExecutionersCap)))
//                AddLabel(425, 300, 0x480, m_Key.Regs[typeof(ExecutionersCap)].ToString());
//            else
//                AddLabel(425, 300, 0x480, "0");
//
            AddLabel(325, 325, 0x486, "Fertile Dirt");
            AddButton(275, 325, 4005, 4007, 16, GumpButtonType.Reply, 0);
            if (m_Key.Regs.ContainsKey(typeof(FertileDirt)))
            {
                AddLabel(425, 325, 0x480, m_Key.Regs[typeof(FertileDirt)].ToString());
            }
            else
            {
                AddLabel(425, 325, 0x480, "0");
            }

            AddLabel(325, 350, 88, "Each Max:");
            AddLabel(425, 350, 0x480, key.StorageLimit.ToString());

            AddLabel(325, 375, 88, "Add resource or item");
            AddButton(275, 375, 4005, 4007, 25, GumpButtonType.Reply, 0);

            AddLabel(325, 400, 88, "Collect regs from backpack");
            AddButton(275, 400, 4005, 4007, 26, GumpButtonType.Reply, 0);
        }
        public ResourceStorageKeySpellCastersGump(PlayerMobile from, ResourceStorageKeySpellCasters key)
            : base(25, 25)
        {
            m_From = from;
            m_Key = key;

            m_From.CloseGump(typeof(ResourceStorageKeySpellCastersGump));

            AddPage(0);

            AddBackground(50, 10, 455, 430, 5054);
            AddImageTiled(58, 20, 438, 410, 2624);
            AddAlphaRegion(58, 20, 438, 410);

            AddLabel(200, 25, 88, "Spell Caster's Warehouse");
// Kazuha
	    AddLabel(125, 50, 0x486, "Withdraw Increment");
	    AddLabel(275, 50, 0x480, key.WithdrawIncrement.ToString());
	    AddButton(330, 50, 4011, 4012, 28, GumpButtonType.Reply, 0);
	    AddButton(360, 50, 4011, 4012, 29, GumpButtonType.Reply, 0);
	    AddButton(390, 50, 4011, 4012, 30, GumpButtonType.Reply, 0);
// /Kazuha

            AddLabel(125, 75, 0x486, "BlackPearl");
            AddButton(75, 75, 4005, 4007, 1, GumpButtonType.Reply, 0);
            if (m_Key.Regs.ContainsKey(typeof(BlackPearl)))
                AddLabel(225, 75, 0x480, m_Key.Regs[typeof(BlackPearl)].ToString());
            else
                AddLabel(225, 75, 0x480, "0");

            AddLabel(125, 100, 0x486, "Bloodmoss");
            AddButton(75, 100, 4005, 4007, 2, GumpButtonType.Reply, 0);
            if (m_Key.Regs.ContainsKey(typeof(Bloodmoss)))
                AddLabel(225, 100, 0x480, m_Key.Regs[typeof(Bloodmoss)].ToString());
            else
                AddLabel(225, 100, 0x480, "0");

            AddLabel(125, 125, 0x486, "Garlic");
            AddButton(75, 125, 4005, 4007, 3, GumpButtonType.Reply, 0);
            if (m_Key.Regs.ContainsKey(typeof(Garlic)))
                AddLabel(225, 125, 0x480, m_Key.Regs[typeof(Garlic)].ToString());
            else
                AddLabel(225, 125, 0x480, "0");

            AddLabel(125, 150, 0x486, "Ginseng");
            AddButton(75, 150, 4005, 4007, 4, GumpButtonType.Reply, 0);
            if (m_Key.Regs.ContainsKey(typeof(Ginseng)))
                AddLabel(225, 150, 0x480, m_Key.Regs[typeof(Ginseng)].ToString());
            else
                AddLabel(225, 150, 0x480, "0");

            AddLabel(125, 175, 0x486, "MandrakeRoot");
            AddButton(75, 175, 4005, 4007, 5, GumpButtonType.Reply, 0);
            if (m_Key.Regs.ContainsKey(typeof(MandrakeRoot)))
                AddLabel(225, 175, 0x480, m_Key.Regs[typeof(MandrakeRoot)].ToString());
            else
                AddLabel(225, 175, 0x480, "0");

            AddLabel(125, 200, 0x486, "Nightshade");
            AddButton(75, 200, 4005, 4007, 6, GumpButtonType.Reply, 0);
            if (m_Key.Regs.ContainsKey(typeof(Nightshade)))
                AddLabel(225, 200, 0x480, m_Key.Regs[typeof(Nightshade)].ToString());
            else
                AddLabel(225, 200, 0x480, "0");

            AddLabel(125, 225, 0x486, "SulfurousAsh");
            AddButton(75, 225, 4005, 4007, 7, GumpButtonType.Reply, 0);
            if (m_Key.Regs.ContainsKey(typeof(SulfurousAsh)))
                AddLabel(225, 225, 0x480, m_Key.Regs[typeof(SulfurousAsh)].ToString());
            else
                AddLabel(225, 225, 0x480, "0");

            AddLabel(125, 250, 0x486, "SpidersSilk");
            AddButton(75, 250, 4005, 4007, 8, GumpButtonType.Reply, 0);
            if (m_Key.Regs.ContainsKey(typeof(SpidersSilk)))
                AddLabel(225, 250, 0x480, m_Key.Regs[typeof(SpidersSilk)].ToString());
            else
                AddLabel(225, 250, 0x480, "0");

            AddLabel(125, 275, 0x486, "BatWing");
            AddButton(75, 275, 4005, 4007, 9, GumpButtonType.Reply, 0);
            if (m_Key.Regs.ContainsKey(typeof(BatWing)))
                AddLabel(225, 275, 0x480, m_Key.Regs[typeof(BatWing)].ToString());
            else
                AddLabel(225, 275, 0x480, "0");

            AddLabel(125, 300, 0x486, "GraveDust");
            AddButton(75, 300, 4005, 4007, 10, GumpButtonType.Reply, 0);
            if (m_Key.Regs.ContainsKey(typeof(GraveDust)))
                AddLabel(225, 300, 0x480, m_Key.Regs[typeof(GraveDust)].ToString());
            else
                AddLabel(225, 300, 0x480, "0");

            AddLabel(125, 325, 0x486, "DaemonBlood");
            AddButton(75, 325, 4005, 4007, 11, GumpButtonType.Reply, 0);
            if (m_Key.Regs.ContainsKey(typeof(DaemonBlood)))
                AddLabel(225, 325, 0x480, m_Key.Regs[typeof(DaemonBlood)].ToString());
            else
                AddLabel(225, 325, 0x480, "0");

            AddLabel(125, 350, 0x486, "NoxCrystal");
            AddButton(75, 350, 4005, 4007, 12, GumpButtonType.Reply, 0);
            if (m_Key.Regs.ContainsKey(typeof(NoxCrystal)))
                AddLabel(225, 350, 0x480, m_Key.Regs[typeof(NoxCrystal)].ToString());
            else
                AddLabel(225, 350, 0x480, "0");

            AddLabel(125, 375, 0x486, "PigIron");
            AddButton(75, 375, 4005, 4007, 13, GumpButtonType.Reply, 0);
            if (m_Key.Regs.ContainsKey(typeof(PigIron)))
                AddLabel(225, 375, 0x480, m_Key.Regs[typeof(PigIron)].ToString());
            else
                AddLabel(225, 375, 0x480, "0");
           
//            AddLabel(325, 75, 0x486, "Bone");
//            AddLabel(425, 75, 0x480, key.Bone.ToString());
//            AddButton(275, 75, 4005, 4007, 18, GumpButtonType.Reply, 0);

            AddLabel(325, 100, 0x486, "Daemon Bone");
            AddButton(275, 100, 4005, 4007, 19, GumpButtonType.Reply, 0);
            if (m_Key.Regs.ContainsKey(typeof(DaemonBone)))
                AddLabel(425, 100, 0x480, m_Key.Regs[typeof(DaemonBone)].ToString());
            else
                AddLabel(425, 100, 0x480, "0");

            AddLabel(325, 125, 0x486, "PotionKeg");
            AddLabel(425, 125, 0x480, key.PotionKeg.ToString());
            AddButton(275, 125, 4005, 4007, 20, GumpButtonType.Reply, 0);

            AddLabel(325, 150, 0x486, "BlankScroll");
            AddLabel(425, 150, 0x480, key.BlankScroll.ToString());
            AddButton(275, 150, 4005, 4007, 21, GumpButtonType.Reply, 0);

             //Styx
            AddLabel(125, 400, 0x486, "Recall Rune");
            AddLabel(225, 400, 0x480, key.Rune.ToString());
            AddButton(75, 400, 4005, 4007, 27, GumpButtonType.Reply, 0);
            //Styx

            AddLabel(325, 175, 0x486, "Bottle");
            AddLabel(425, 175, 0x480, key.Bottle.ToString());
            AddButton(275, 175, 4005, 4007, 22, GumpButtonType.Reply, 0);

            AddLabel(325, 200, 0x486, "Sand");
            AddLabel(425, 200, 0x480, key.Sand.ToString());
            AddButton(275, 200, 4005, 4007, 23, GumpButtonType.Reply, 0);
            // daat99 keyring 6/7			
            AddLabel(325, 225, 0x486, "KeyRing");
            AddLabel(425, 225, 0x480, key.KeyRing.ToString());
            AddButton(275, 225, 4005, 4007, 24, GumpButtonType.Reply, 0);
            //
            AddLabel(325, 250, 0x486, "Bees Wax");
            AddButton(275, 250, 4005, 4007, 17, GumpButtonType.Reply, 0);
            if (m_Key.Regs.ContainsKey(typeof(Beeswax)))
                AddLabel(425, 250, 0x480, m_Key.Regs[typeof(Beeswax)].ToString());
            else
                AddLabel(425, 250, 0x480, "0");

            AddLabel(325, 275, 0x486, "Dead Wood");
            AddButton(275, 275, 4005, 4007, 14, GumpButtonType.Reply, 0);
            if (m_Key.Regs.ContainsKey(typeof(DeadWood)))
                AddLabel(425, 275, 0x480, m_Key.Regs[typeof(DeadWood)].ToString());
            else
                AddLabel(425, 275, 0x480, "0");

//            AddLabel(325, 300, 0x486, "Executioner's Cap");
//            AddButton(275, 300, 4005, 4007, 15, GumpButtonType.Reply, 0);
//            if (m_Key.Regs.ContainsKey(typeof(ExecutionersCap)))
//                AddLabel(425, 300, 0x480, m_Key.Regs[typeof(ExecutionersCap)].ToString());
//            else
//                AddLabel(425, 300, 0x480, "0");
//
            AddLabel(325, 325, 0x486, "Fertile Dirt");
            AddButton(275, 325, 4005, 4007, 16, GumpButtonType.Reply, 0);
            if (m_Key.Regs.ContainsKey(typeof(FertileDirt)))
                AddLabel(425, 325, 0x480, m_Key.Regs[typeof(FertileDirt)].ToString());
            else
                AddLabel(425, 325, 0x480, "0");

            AddLabel(325, 350, 88, "Each Max:");
            AddLabel(425, 350, 0x480, key.StorageLimit.ToString());

            AddLabel(325, 375, 88, "Add resource or item");
            AddButton(275, 375, 4005, 4007, 25, GumpButtonType.Reply, 0);

            AddLabel(325, 400, 88, "Collect regs from backpack");
            AddButton(275, 400, 4005, 4007, 26, GumpButtonType.Reply, 0);
        }
 public ResourceStorageKeySpellCastersTarget(ResourceStorageKeySpellCasters key)
     : base(17, false, TargetFlags.None)//changed from 18
 {
     m_Key = key;
 }