Exemplo n.º 1
0
        public override Item CreateBulkOrder(Mobile from, bool fromContextMenu)
        {
            PlayerMobile pm = from as PlayerMobile;

            if (pm != null && pm.NextTailorBulkOrder == TimeSpan.Zero && (fromContextMenu || 0.2 > Utility.RandomDouble()))
            {
                double theirSkill = pm.Skills[SkillName.Tailoring].Base;

                if (theirSkill >= 70.1)
                {
                    pm.NextTailorBulkOrder = TimeSpan.FromHours(6.0);
                }
                else if (theirSkill >= 50.1)
                {
                    pm.NextTailorBulkOrder = TimeSpan.FromHours(2.0);
                }
                else
                {
                    pm.NextTailorBulkOrder = TimeSpan.FromHours(1.0);
                }

                if (theirSkill >= 70.1 && ((theirSkill - 40.0) / 300.0) > Utility.RandomDouble())
                {
                    return(new LargeTailorBOD());
                }

                return(SmallTailorBOD.CreateRandomFor(from));
            }

            return(null);
        }
Exemplo n.º 2
0
        public override Item CreateBulkOrder(Mobile from, bool fromContextMenu)
        {
            if (from is PlayerMobile pm && pm.NextTailorBulkOrder == TimeSpan.Zero &&
                (fromContextMenu || Utility.RandomDouble() < 0.2))
            {
                var theirSkill = pm.Skills.Tailoring.Base;

                if (theirSkill >= 70.1)
                {
                    pm.NextTailorBulkOrder = TimeSpan.FromHours(6.0);
                }
                else if (theirSkill >= 50.1)
                {
                    pm.NextTailorBulkOrder = TimeSpan.FromHours(2.0);
                }
                else
                {
                    pm.NextTailorBulkOrder = TimeSpan.FromHours(1.0);
                }

                if (theirSkill >= 70.1 && (theirSkill - 40.0) / 300.0 > Utility.RandomDouble())
                {
                    return(new LargeTailorBOD());
                }

                return(SmallTailorBOD.CreateRandomFor(from));
            }

            return(null);
        }
Exemplo n.º 3
0
        public override void OnDoubleClick(Mobile from)
        {
            if (!from.InRange(GetWorldLocation(), 2))
            {
                from.LocalOverheadMessage(MessageType.Regular, 0x3B2, 1019045);                   // I can't reach that.
            }

            else if (m_Deed > 0)
            {
                Item Deed = null;

                switch (Utility.Random(6))
                {
                case 0: Deed = new LargeSmithBOD(); break;

                case 1: Deed = new SmallSmithBOD(); break;

                case 2: Deed = new LargeTailorBOD(); break;

                case 3: Deed = new SmallTailorBOD(); break;

                case 4: Deed = new SmallTamingBOD(); break;

                case 5: Deed = new LargeTamingBOD(); break;
                }

                int amount = Math.Min(1, m_Deed);
                Deed.Amount = amount;

                if (!from.PlaceInBackpack(Deed))
                {
                    Deed.Delete();
                    from.SendLocalizedMessage(1078837);                       // Your backpack is full! Please make room and try again.
                }
                else
                {
                    m_Deed -= amount;
                    PublicOverheadMessage(MessageType.Regular, 0x3B2, 503201);                       // You take the item.
                }
            }
            else
            {
                from.SendMessage("There are no more BOD's available.");                   // There are no more BOD's available.
            }
        }
Exemplo n.º 4
0
        public override Item CreateBulkOrder(Mobile from, bool fromContextMenu)
        {
            PlayerMobile pm = from as PlayerMobile;

            if (pm != null && pm.NextTailorBulkOrder == TimeSpan.Zero && (fromContextMenu || 0.2 > Utility.RandomDouble()))
            {
                double theirSkill = pm.Skills[SkillName.Tailoring].Base;

                //04AUG2008 Decrease time required for BOD by half *** START ***
                //if ( theirSkill >= 70.1 )
                //    pm.NextTailorBulkOrder = TimeSpan.FromHours( 6.0 );
                //else if ( theirSkill >= 50.1 )
                //    pm.NextTailorBulkOrder = TimeSpan.FromHours( 2.0 );
                //else
                //    pm.NextTailorBulkOrder = TimeSpan.FromHours( 1.0 );
                if (theirSkill >= 70.1)
                {
                    pm.NextTailorBulkOrder = TimeSpan.FromHours(3.0);
                }
                else if (theirSkill >= 50.1)
                {
                    pm.NextTailorBulkOrder = TimeSpan.FromHours(1.0);
                }
                else
                {
                    pm.NextTailorBulkOrder = TimeSpan.FromHours(0.5);
                }
                //04AUG2008 Decrease time required for BOD by half *** END  ***

                if (theirSkill >= 70.1 && ((theirSkill - 40.0) / 300.0) > Utility.RandomDouble())
                {
                    return(new LargeTailorBOD());
                }

                return(SmallTailorBOD.CreateRandomFor(from));
            }

            return(null);
        }
Exemplo n.º 5
0
        private static void GenerateBods(RewardCalculator calc, string file)
        {
            var stw = new StreamWriter("web/" + file);

            using (JsonWriter writer = new JsonTextWriter(stw))
            {
                writer.Formatting = Formatting.Indented;
                //writer.WritePropertyName("items");
                writer.WriteStartArray();
                if (calc is SmithRewardCalculator)
                {
                    SmallBOD sbod = new SmallSmithBOD();

                    sbod.Type = typeof(PlateArms);

                    GenerateItemRange(sbod, calc, writer);
                    sbod.Type = typeof(Dagger);
                    GenerateItemRange(sbod, calc, writer);

                    GenerateLBod(writer, calc, LargeBulkEntry.LargeRing);
                    GenerateLBod(writer, calc, LargeBulkEntry.LargeChain);
                    GenerateLBod(writer, calc, LargeBulkEntry.LargePlate);
                }
                else
                {
                    var sbod = new SmallTailorBOD();
                    sbod.Type = typeof(TricorneHat);
                    GenerateItemRange(sbod, calc, writer);
                    sbod.Type = typeof(LeatherArms);
                    GenerateItemRange(sbod, calc, writer);

                    GenerateLBod(writer, calc, LargeBulkEntry.LargeRing);
                    GenerateLBod(writer, calc, LargeBulkEntry.LargeChain);
                    GenerateLBod(writer, calc, LargeBulkEntry.LargePlate);
                }
            }
        }
Exemplo n.º 6
0
        public override void OnResponse(NetState state, RelayInfo info)
        {
            Mobile from = state.Mobile;

            switch (info.ButtonID)
            {
            default: from.CloseGump(typeof(OWLTRbodGump)); break;

            case 1:
            {
                if (pm_From != null && pm_From.NextSmithBulkOrder == TimeSpan.Zero)
                {
                    double theirSkill = pm_From.Skills[SkillName.Blacksmith].Base;
                    if (theirSkill < 0.1)
                    {
                        pm_From.SendMessage("You need more Blacksmithy skill to get Blacksmith bods!!!");
                        break;
                    }
                    if (theirSkill >= 70.1)
                    {
                        pm_From.NextSmithBulkOrder = TimeSpan.FromHours(6.0);
                    }
                    else if (theirSkill >= 50.1)
                    {
                        pm_From.NextSmithBulkOrder = TimeSpan.FromHours(2.0);
                    }
                    else
                    {
                        pm_From.NextSmithBulkOrder = TimeSpan.FromHours(1.0);
                    }

                    if (theirSkill >= 70.1 && ((theirSkill - 40.0) / 300.0) > Utility.RandomDouble())
                    {
                        pm_From.SendGump(new LargeBODAcceptGump(from, new LargeSmithBOD()));
                    }
                    else
                    {
                        SmallSmithBOD ssb = SmallSmithBOD.CreateRandomFor(from) as SmallSmithBOD;
                        if (ssb == null)
                        {
                            pm_From.SendMessage(32, "Due to your lack in skills you just lost the bod, you better train before you ask for another one...");
                        }
                        else
                        {
                            pm_From.SendGump(new SmallBODAcceptGump(from, ssb));
                        }
                    }
                }
                break;
            }

            case 2:
            {
                if (pm_From != null && pm_From.NextTailorBulkOrder == TimeSpan.Zero)
                {
                    double theirSkill = pm_From.Skills[SkillName.Tailoring].Base;
                    if (theirSkill < 0.1)
                    {
                        pm_From.SendMessage("You need more Tailoring skill to get Tailoring bods!!!");
                        break;
                    }
                    if (theirSkill >= 70.1)
                    {
                        pm_From.NextTailorBulkOrder = TimeSpan.FromHours(6.0);
                    }
                    else if (theirSkill >= 50.1)
                    {
                        pm_From.NextTailorBulkOrder = TimeSpan.FromHours(2.0);
                    }
                    else
                    {
                        pm_From.NextTailorBulkOrder = TimeSpan.FromHours(1.0);
                    }

                    if (theirSkill >= 70.1 && ((theirSkill - 40.0) / 300.0) > Utility.RandomDouble())
                    {
                        pm_From.SendGump(new LargeBODAcceptGump(from, new LargeTailorBOD()));
                    }
                    else
                    {
                        SmallTailorBOD stb = SmallTailorBOD.CreateRandomFor(from) as SmallTailorBOD;
                        if (stb == null)
                        {
                            pm_From.SendMessage(32, "Due to your lack in skills you just lost the bod, you better train before you ask for another one...");
                        }
                        else
                        {
                            pm_From.SendGump(new SmallBODAcceptGump(from, stb));
                        }
                    }
                }
                break;
            }

            case 3:
            {
                if (pm_From != null && pm_From.NextCarpenterBulkOrder == TimeSpan.Zero)
                {
                    double theirSkill = pm_From.Skills[SkillName.Carpentry].Base;
                    if (theirSkill < 0.1)
                    {
                        pm_From.SendMessage("You need more Carpentry skill to get Carpenter bods!!!");
                        break;
                    }
                    if (theirSkill >= 70.1)
                    {
                        pm_From.NextCarpenterBulkOrder = TimeSpan.FromHours(6.0);
                    }
                    else if (theirSkill >= 50.1)
                    {
                        pm_From.NextCarpenterBulkOrder = TimeSpan.FromHours(2.0);
                    }
                    else
                    {
                        pm_From.NextCarpenterBulkOrder = TimeSpan.FromHours(1.0);
                    }

                    if (theirSkill >= 70.1 && ((theirSkill - 40.0) / 300.0) > Utility.RandomDouble())
                    {
                        pm_From.SendGump(new LargeBODAcceptGump(from, new LargeCarpenterBOD()));
                    }
                    else
                    {
                        SmallCarpenterBOD ssb = SmallCarpenterBOD.CreateRandomFor(from) as SmallCarpenterBOD;
                        if (ssb == null)
                        {
                            pm_From.SendMessage(32, "Due to your lack in skills you just lost the bod, you better train before you ask for another one...");
                        }
                        else
                        {
                            pm_From.SendGump(new SmallBODAcceptGump(from, ssb));
                        }
                    }
                }
                break;
            }

            case 4:
            {
                if (pm_From != null && pm_From.NextFletcherBulkOrder == TimeSpan.Zero)
                {
                    double theirSkill = pm_From.Skills[SkillName.Fletching].Base;
                    if (theirSkill < 0.1)
                    {
                        pm_From.SendMessage("You need more BowFletching skill to get Fletcher bods!!!");
                        break;
                    }
                    if (theirSkill >= 70.1)
                    {
                        pm_From.NextFletcherBulkOrder = TimeSpan.FromHours(6.0);
                    }
                    else if (theirSkill >= 50.1)
                    {
                        pm_From.NextFletcherBulkOrder = TimeSpan.FromHours(2.0);
                    }
                    else
                    {
                        pm_From.NextFletcherBulkOrder = TimeSpan.FromHours(1.0);
                    }

                    if (theirSkill >= 70.1 && ((theirSkill - 40.0) / 300.0) > Utility.RandomDouble())
                    {
                        pm_From.SendGump(new LargeBODAcceptGump(from, new LargeFletcherBOD()));
                    }
                    else
                    {
                        SmallFletcherBOD stb = SmallFletcherBOD.CreateRandomFor(from) as SmallFletcherBOD;
                        if (stb == null)
                        {
                            pm_From.SendMessage(32, "Due to your lack in skills you just lost the bod, you better train before you ask for another one...");
                        }
                        else
                        {
                            pm_From.SendGump(new SmallBODAcceptGump(from, stb));
                        }
                    }
                }
                break;
            }
            }
        }
Exemplo n.º 7
0
        public override void DoTransmute(Mobile from, Recipe r)
        {
            if (r == null || from == null)
            {
                return;
            }

            Recipes rid = (Recipes)r.RecipeID;

            switch (rid)
            {
            case Recipes.PowerScrollSkillChange:
            {
                // get the target value from one of the powerscrolls
                Item[] slist = this.FindItemsByType(typeof(PowerScroll), true);

                double value = 0;
                // make sure they are all of the same value
                foreach (Item s in slist)
                {
                    if (value == 0)
                    {
                        value = ((PowerScroll)s).Value;
                    }
                    else
                    {
                        if (value != ((PowerScroll)s).Value)
                        {
                            from.SendMessage("All powerscrolls must be of the same level");
                            return;
                        }
                    }
                }

                PowerScroll newps = PowerScroll.CreateRandom((int)(value - 100), (int)(value - 100));

                // consume ingredients
                this.ConsumeAll();

                // add the new powerscroll
                this.DropItem(newps);

                break;
            }

            case Recipes.SmallBODChange:
            {
                // get the target value from one of the powerscrolls
                Item[] slist = this.FindItemsByType(typeof(SmallBOD), true);

                Type t = null;
                // make sure they are all of the same type
                foreach (Item s in slist)
                {
                    if (t == null)
                    {
                        t = ((SmallBOD)s).GetType();
                    }
                    else
                    {
                        if (t != ((SmallBOD)s).GetType())
                        {
                            from.SendMessage("All BODs must be of the same type");
                            return;
                        }
                    }
                }

                SmallBOD newbod = null;

                if (t == typeof(SmallTailorBOD))
                {
                    newbod = new SmallTailorBOD();
                }
                else if (t == typeof(SmallSmithBOD))
                {
                    newbod = new SmallSmithBOD();
                }
                else
                {
                    from.SendMessage("Cannot transmute those BODs");
                    return;
                }

                if (newbod == null)
                {
                    return;
                }

                // consume ingredients
                this.ConsumeAll();

                // add the new powerscroll
                this.DropItem(newbod);

                break;
            }

            case Recipes.LargeBODChange:
            {
                // get the target value from one of the powerscrolls
                Item[] slist = this.FindItemsByType(typeof(LargeBOD), true);

                Type t = null;
                // make sure they are all of the same type
                foreach (Item s in slist)
                {
                    if (t == null)
                    {
                        t = ((LargeBOD)s).GetType();
                    }
                    else
                    {
                        if (t != ((LargeBOD)s).GetType())
                        {
                            from.SendMessage("All BODs must be of the same type");
                            return;
                        }
                    }
                }

                LargeBOD newbod = null;

                if (t == typeof(LargeTailorBOD))
                {
                    newbod = new LargeTailorBOD();
                }
                else if (t == typeof(LargeSmithBOD))
                {
                    newbod = new LargeSmithBOD();
                }
                else
                {
                    from.SendMessage("Cannot transmute those BODs");
                    return;
                }

                if (newbod == null)
                {
                    return;
                }

                // consume ingredients
                this.ConsumeAll();

                // add the new powerscroll
                this.DropItem(newbod);

                break;
            }

            case Recipes.UpgradeAncientAugment:
            {
                // check what type of augment is being upgraded
                BaseSocketAugmentation augment = null;
                if (this.Items.Count > 0)
                {
                    augment = this.Items[0] as BaseSocketAugmentation;
                }

                if (augment == null)
                {
                    return;
                }

                // make sure they are all the same
                foreach (Item i in this.Items)
                {
                    if (augment.GetType() != i.GetType())
                    {
                        return;
                    }
                }

                // take the ingredients
                this.ConsumeAll();
                // and add the result
                if (augment is AncientDiamond)
                {
                    this.DropItem(new LegendaryDiamond());
                }
                else if (augment is AncientSapphire)
                {
                    this.DropItem(new LegendarySapphire());
                }
                else if (augment is AncientSkull)
                {
                    this.DropItem(new LegendarySkull());
                }
                else if (augment is AncientTourmaline)
                {
                    this.DropItem(new LegendaryTourmaline());
                }
                else if (augment is AncientWood)
                {
                    this.DropItem(new LegendaryWood());
                }
                else if (augment is AncientRuby)
                {
                    this.DropItem(new LegendaryRuby());
                }
                else if (augment is AncientEmerald)
                {
                    this.DropItem(new LegendaryEmerald());
                }
                else if (augment is AncientAmethyst)
                {
                    this.DropItem(new LegendaryAmethyst());
                }

                break;
            }

            case Recipes.UpgradeLegendaryAugment:
            {
                // check what type of augment is being upgraded
                BaseSocketAugmentation augment = null;
                if (this.Items.Count > 0)
                {
                    augment = this.Items[0] as BaseSocketAugmentation;
                }

                if (augment == null)
                {
                    return;
                }

                // make sure they are all the same
                foreach (Item i in this.Items)
                {
                    if (augment.GetType() != i.GetType())
                    {
                        return;
                    }
                }

                // take the ingredients
                this.ConsumeAll();

                // and add the result
                if (augment is LegendaryDiamond)
                {
                    this.DropItem(new MythicDiamond());
                }
                else if (augment is LegendarySapphire)
                {
                    this.DropItem(new MythicSapphire());
                }
                else if (augment is LegendarySkull)
                {
                    this.DropItem(new MythicSkull());
                }
                else if (augment is LegendaryTourmaline)
                {
                    this.DropItem(new MythicTourmaline());
                }
                else if (augment is LegendaryWood)
                {
                    this.DropItem(new MythicWood());
                }
                else if (augment is LegendaryRuby)
                {
                    this.DropItem(new MythicRuby());
                }
                else if (augment is LegendaryEmerald)
                {
                    this.DropItem(new MythicEmerald());
                }
                else if (augment is LegendaryAmethyst)
                {
                    this.DropItem(new MythicAmethyst());
                }

                break;
            }

            case Recipes.UpgradeCrystalAugment:
            {
                // check what type of augment is being upgraded
                BaseSocketAugmentation augment = null;
                if (this.Items.Count > 0)
                {
                    augment = this.Items[0] as BaseSocketAugmentation;
                }

                if (augment == null)
                {
                    return;
                }

                // make sure they are all the same
                foreach (Item i in this.Items)
                {
                    if (augment.GetType() != i.GetType())
                    {
                        return;
                    }
                }

                // take the ingredients
                this.ConsumeAll();

                // and add the result
                if (augment is RhoCrystal)
                {
                    this.DropItem(new RadiantRhoCrystal());
                }
                else if (augment is RysCrystal)
                {
                    this.DropItem(new RadiantRysCrystal());
                }
                else if (augment is WyrCrystal)
                {
                    this.DropItem(new RadiantWyrCrystal());
                }
                else if (augment is FreCrystal)
                {
                    this.DropItem(new RadiantFreCrystal());
                }
                else if (augment is TorCrystal)
                {
                    this.DropItem(new RadiantTorCrystal());
                }
                else if (augment is VelCrystal)
                {
                    this.DropItem(new RadiantVelCrystal());
                }
                else if (augment is XenCrystal)
                {
                    this.DropItem(new RadiantXenCrystal());
                }
                else if (augment is PolCrystal)
                {
                    this.DropItem(new RadiantPolCrystal());
                }
                else if (augment is WolCrystal)
                {
                    this.DropItem(new RadiantWolCrystal());
                }
                else if (augment is BalCrystal)
                {
                    this.DropItem(new RadiantBalCrystal());
                }
                else if (augment is TalCrystal)
                {
                    this.DropItem(new RadiantTalCrystal());
                }
                else if (augment is JalCrystal)
                {
                    this.DropItem(new RadiantJalCrystal());
                }
                else if (augment is RalCrystal)
                {
                    this.DropItem(new RadiantRalCrystal());
                }
                else if (augment is KalCrystal)
                {
                    this.DropItem(new RadiantKalCrystal());
                }

                break;
            }

            case Recipes.RecoverAugmentation:
            {
                // does item have any sockets on it?
                Item b = this.FindItemByType(typeof(BaseArmor), true);
                if (b == null)
                {
                    b = this.FindItemByType(typeof(BaseWeapon), true);
                }
                if (b == null)
                {
                    b = this.FindItemByType(typeof(BaseJewel), true);
                }

                XmlSockets a = XmlAttach.FindAttachment(b, typeof(XmlSockets)) as XmlSockets;
                if (a == null)
                {
                    // if so then forget it
                    from.SendMessage("This item is not socketed.");
                    return;
                }

                if (a.NSockets == 0)
                {
                    from.SendMessage("This item is has no sockets.");
                    return;
                }

                BaseSocketAugmentation augment = a.RecoverRandomAugmentation(from, b);

                if (augment != null)
                {
                    // consume the crystal
                    this.ConsumeTotal(typeof(AncientRuby), 1, true);

                    // put the recovered augment in the container
                    this.DropItem(augment);

                    from.SendMessage("Recovered a {0} augmentation.", augment.Name);

                    // update the sockets gump
                    a.OnIdentify(from);
                }
                else
                {
                    from.SendMessage("Failed to recover augmentation.");
                }

                break;
            }

            case Recipes.HammerOfRecovery:
            {
                // consume ingredients
                this.ConsumeAll();

                // add the hammer
                this.DropItem(new HammerOfRecovery(1));

                break;
            }

            case Recipes.ExceptionalSocketHammer:
            {
                // consume ingredients
                this.ConsumeAll();

                // add the hammer
                this.DropItem(new ExceptionalSocketHammer(1));

                break;
            }

            case Recipes.SocketWeapon:
            {
                // does the weapon already have any sockets on it?
                Item          b = this.FindItemByType(typeof(BaseWeapon), true);
                XmlAttachment a = XmlAttach.FindAttachment(b, typeof(XmlSockets));
                if (a != null)
                {
                    // if so then forget it
                    from.SendMessage("Weapon already socketed.");
                    return;
                }
                // otherwise add the socket
                XmlAttach.AttachTo(b, new XmlSockets(1));
                // consume the crystal
                this.ConsumeTotal(typeof(RadiantRhoCrystal), 1, true);
                break;
            }

            case Recipes.SocketArmor:
            {
                // does the armor already have any sockets on it?
                Item          b = this.FindItemByType(typeof(BaseArmor), true);
                XmlAttachment a = XmlAttach.FindAttachment(b, typeof(XmlSockets));
                if (a != null)
                {
                    // if so then forget it
                    from.SendMessage("Armor already socketed.");
                    return;
                }
                // otherwise add the socket
                XmlAttach.AttachTo(b, new XmlSockets(1));
                // consume the crystal
                this.ConsumeTotal(typeof(RadiantRhoCrystal), 1, true);
                break;
            }

                // Uncomment the follow recipes if you have XmlMobFactions installed and you would like to allow faction gain through these recipes
            #if (XMLMOBFACTIONS)
            case Recipes.UndeadFaction:
            {
                // how much gold is being offered
                Item b     = FindItemByType(typeof(Gold), true);
                int  value = 0;
                if (b != null)
                {
                    value = b.Amount / 10;
                }
                // take the ingredients
                ConsumeAll();
                // add the faction
                XmlAttach.AttachTo(from, new XmlAddFaction("Undead", value));
                break;
            }

            case Recipes.AbyssFaction:
            {
                // how much gold is being offered
                Item b     = FindItemByType(typeof(Gold), true);
                int  value = 0;
                if (b != null)
                {
                    value = b.Amount / 10;
                }
                // take the ingredients
                ConsumeAll();
                // add the faction
                XmlAttach.AttachTo(from, new XmlAddFaction("Abyss", value));
                break;
            }

            case Recipes.HumanoidFaction:
            {
                // how much gold is being offered
                Item b     = FindItemByType(typeof(Gold), true);
                int  value = 0;
                if (b != null)
                {
                    value = b.Amount / 10;
                }
                // take the ingredients
                ConsumeAll();
                // add the faction
                XmlAttach.AttachTo(from, new XmlAddFaction("Humanoid", value));
                break;
            }

            case Recipes.ReptilianFaction:
            {
                // how much gold is being offered
                Item b     = FindItemByType(typeof(Gold), true);
                int  value = 0;
                if (b != null)
                {
                    value = b.Amount / 10;
                }
                // take the ingredients
                ConsumeAll();
                // add the faction
                XmlAttach.AttachTo(from, new XmlAddFaction("Reptilian", value));
                break;
            }

            case Recipes.ArachnidFaction:
            {
                // how much gold is being offered
                Item b     = FindItemByType(typeof(Gold), true);
                int  value = 0;
                if (b != null)
                {
                    value = b.Amount / 10;
                }
                // take the ingredients
                ConsumeAll();
                // add the faction
                XmlAttach.AttachTo(from, new XmlAddFaction("Arachnid", value));
                break;
            }

            case Recipes.ElementalFaction:
            {
                // how much gold is being offered
                Item b     = FindItemByType(typeof(Gold), true);
                int  value = 0;
                if (b != null)
                {
                    value = b.Amount / 10;
                }
                // take the ingredients
                ConsumeAll();
                // add the faction
                XmlAttach.AttachTo(from, new XmlAddFaction("Elemental", value));
                break;
            }

            case Recipes.UnderworldFaction:
            {
                // how much gold is being offered
                Item b     = FindItemByType(typeof(Gold), true);
                int  value = 0;
                if (b != null)
                {
                    value = b.Amount / 10;
                }
                // take the ingredients
                ConsumeAll();
                // add the faction
                XmlAttach.AttachTo(from, new XmlAddFaction("Underworld", value));
                break;
            }
// end of commented-out XmlMobFactions recipes
            #endif
            }

            // give effects for successful transmutation
            from.PlaySound(503);

            base.DoTransmute(from, r);
        }