Beispiel #1
0
        private static void CheckMaxAttributes(BaseHat hat)
        {
            int props = 0;

            foreach (int i in Enum.GetValues(typeof(AosAttribute)))
            {
                if (hat.Attributes[(AosAttribute)i] > 0)
                {
                    ++props;
                }
            }

            foreach (int i in Enum.GetValues(typeof(AosArmorAttribute)))
            {
                if ((AosArmorAttribute)i != AosArmorAttribute.LowerStatReq && hat.ClothingAttributes[(AosArmorAttribute)i] > 0)
                {
                    ++props;
                }
            }

            if (props >= SpellCraftConfig.MaxPropsAllowed)
            {
                throw new SpellCraftException(MsgNums.MaxProperties);
            }
        }
 public InternalTarget2(Mobile from, CraftSystem craftSystem, BaseTool tool, BaseHat hat) : base(2, false,
                                                                                                 TargetFlags.None)
 {
     m_From        = from;
     m_CraftSystem = craftSystem;
     m_Tool        = tool;
     m_Hat         = hat;
 }
Beispiel #3
0
 public static void MarkHat(Mobile crafter, BaseHat hat)
 {
     if (false == hat.PlayerConstructed &&
         (crafter.Skills[SkillName.Inscribe]).Value == SpellCraftConfig.MaximumSkillValue &&
         (crafter.Skills[SkillName.Alchemy]).Value == SpellCraftConfig.MaximumSkillValue &&
         Utility.RandomDouble() < SpellCraftConfig.CraftersMarkChance)
     {
         hat.PlayerConstructed = true;
         hat.Crafter           = crafter;
     }
 }
Beispiel #4
0
        private static void CheckItem(Mobile m, BaseHat hat, bool addingAttribute)
        {
            if (!((Item)hat).IsChildOf(m))
            {
                throw new SpellCraftException(MsgNums.BackPack);
            }

            if (!SpellCraftConfig.ArtifactCraftable && hat.ArtifactRarity > 0)
            {
                throw new SpellCraftException(MsgNums.Artifact);
            }

            if (addingAttribute)
            {
                CheckMaxAttributes(hat);
            }
        }
Beispiel #5
0
        public static void SpecialItem(Item item, Mobile m)
        {
            int min   = (int)(m.Fame / 200);
            int max   = (int)(m.Fame / 100);
            int props = (int)(m.Fame / 1500) + Utility.RandomMinMax(0, (int)(m.Fame / 2000));

            if (item is BaseHat)
            {
                BaseHat hat = (BaseHat)item; BaseRunicTool.ApplyAttributesTo(hat, false, 0, props, min, max);
            }
            else if (item is BaseClothing)
            {
                BaseClothing cloth = (BaseClothing)item; BaseRunicTool.ApplyAttributesTo(cloth, false, 0, props, min, max);
            }
            else if (item is BaseArmor)
            {
                BaseArmor armor = (BaseArmor)item; BaseRunicTool.ApplyAttributesTo(armor, false, 0, props, min, max);
            }
            else if (item is BaseWeapon)
            {
                BaseWeapon weapon = (BaseWeapon)item; BaseRunicTool.ApplyAttributesTo(weapon, false, 0, props, min, max);
            }
        }
Beispiel #6
0
            protected override void OnTarget(Mobile from, object targeted)
            {
                /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
                if (targeted is MagicRobe && from.Backpack != null)
                {
                    Item      ba        = targeted as Item;
                    Container pack      = from.Backpack;
                    int       toConsume = 0;

                    if (ba.ItemID != 0x1F03 && ba.ItemID != 0x1F04)
                    {
                        int nCost = 5;

                        if (BeggingPose(from) > 0)                           // LET US SEE IF THEY ARE BEGGING - WIZARD
                        {
                            nCost = nCost - (int)((from.Skills[SkillName.Begging].Value * 0.005) * nCost); if (nCost < 1)
                            {
                                nCost = 1;
                            }
                        }
                        toConsume = nCost;
                    }
                    else
                    {
                        m_Weaver.SayTo(from, "That does not need my services.");
                    }

                    if (toConsume == 0)
                    {
                        return;
                    }

                    if (pack.ConsumeTotal(typeof(Gold), toConsume))
                    {
                        if (BeggingPose(from) > 0)
                        {
                            Titles.AwardKarma(from, -BeggingKarma(from), true);
                        }                                                                                                               // DO ANY KARMA LOSS
                        m_Weaver.SayTo(from, "Here is your robe.");
                        from.SendMessage(String.Format("You pay {0} gold.", toConsume));
                        Effects.PlaySound(from.Location, from.Map, 0x248);
                        ba.ItemID = 0x1F03;
                        ba.Name   = "robe";
                    }
                    else
                    {
                        m_Weaver.SayTo(from, "It would cost you {0} gold to have that done.", toConsume);
                        from.SendMessage("You do not have enough gold.");
                    }
                }
                /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
                else if (targeted is MagicCloak && from.Backpack != null)
                {
                    Item      ba        = targeted as Item;
                    Container pack      = from.Backpack;
                    int       toConsume = 0;

                    if (ba.ItemID != 0x1515 && ba.ItemID != 0x1530)
                    {
                        int nCost = 5;

                        if (BeggingPose(from) > 0)                           // LET US SEE IF THEY ARE BEGGING - WIZARD
                        {
                            nCost = nCost - (int)((from.Skills[SkillName.Begging].Value * 0.005) * nCost); if (nCost < 1)
                            {
                                nCost = 1;
                            }
                        }
                        toConsume = nCost;
                    }
                    else
                    {
                        m_Weaver.SayTo(from, "That does not need my services.");
                    }

                    if (toConsume == 0)
                    {
                        return;
                    }

                    if (pack.ConsumeTotal(typeof(Gold), toConsume))
                    {
                        if (BeggingPose(from) > 0)
                        {
                            Titles.AwardKarma(from, -BeggingKarma(from), true);
                        }                                                                                                               // DO ANY KARMA LOSS
                        m_Weaver.SayTo(from, "Here is your cloak.");
                        from.SendMessage(String.Format("You pay {0} gold.", toConsume));
                        Effects.PlaySound(from.Location, from.Map, 0x248);
                        ba.ItemID = 0x1515;
                        ba.Name   = "cloak";
                    }
                    else
                    {
                        m_Weaver.SayTo(from, "It would cost you {0} gold to have that done.", toConsume);
                        from.SendMessage("You do not have enough gold.");
                    }
                }
                /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
                else if (targeted is BaseHat && from.Backpack != null && !(targeted is DeerMask) && !(targeted is BearMask))
                {
                    BaseHat   ba        = targeted as BaseHat;
                    Container pack      = from.Backpack;
                    int       toConsume = 0;

                    if (ba.HitPoints < ba.MaxHitPoints)
                    {
                        int nCost = 10;

                        if (BeggingPose(from) > 0)                           // LET US SEE IF THEY ARE BEGGING - WIZARD
                        {
                            nCost = nCost - (int)((from.Skills[SkillName.Begging].Value * 0.005) * nCost); if (nCost < 1)
                            {
                                nCost = 1;
                            }
                            toConsume = (ba.MaxHitPoints - ba.HitPoints) * nCost;
                        }
                        else
                        {
                            toConsume = (ba.MaxHitPoints - ba.HitPoints) * nCost;
                        }
                    }
                    else if (ba.HitPoints >= ba.MaxHitPoints)
                    {
                        m_Weaver.SayTo(from, "That does not need to be repaired.");
                    }
                    else
                    {
                        m_Weaver.SayTo(from, "I cannot repair that.");
                    }

                    if (toConsume == 0)
                    {
                        return;
                    }

                    if (pack.ConsumeTotal(typeof(Gold), toConsume))
                    {
                        if (BeggingPose(from) > 0)
                        {
                            Titles.AwardKarma(from, -BeggingKarma(from), true);
                        }                                                                                                               // DO ANY KARMA LOSS
                        m_Weaver.SayTo(from, "Here is your hat.");
                        from.SendMessage(String.Format("You pay {0} gold.", toConsume));
                        Effects.PlaySound(from.Location, from.Map, 0x248);
                        ba.MaxHitPoints -= 1;
                        ba.HitPoints     = ba.MaxHitPoints;
                    }
                    else
                    {
                        m_Weaver.SayTo(from, "It would cost you {0} gold to have that repaired.", toConsume);
                        from.SendMessage("You do not have enough gold.");
                    }
                }
                /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
                else if (targeted is UnidentifiedItem)
                {
                    Container        packs    = from.Backpack;
                    int              nCost    = 200;
                    UnidentifiedItem WhatIsIt = (UnidentifiedItem)targeted;

                    if (BeggingPose(from) > 0)                       // LET US SEE IF THEY ARE BEGGING - WIZARD
                    {
                        nCost = nCost - (int)((from.Skills[SkillName.Begging].Value * 0.005) * nCost); if (nCost < 1)
                        {
                            nCost = 1;
                        }
                    }
                    int toConsume = nCost;

                    if (WhatIsIt.VendorCanID != "Tailor")
                    {
                        m_Weaver.SayTo(from, "Sorry, I cannot tell what that is.");
                    }
                    else if (packs.ConsumeTotal(typeof(Gold), toConsume))
                    {
                        string      MyItemName = "item";
                        Container   pack       = (Container)targeted;
                        List <Item> items      = new List <Item>();
                        foreach (Item item in pack.Items)
                        {
                            items.Add(item);
                        }
                        foreach (Item item in items)
                        {
                            MyItemName = item.Name;
                            from.AddToBackpack(item);
                        }
                        if (MyItemName == "")
                        {
                            MyItemName = "item";
                        }
                        from.SendMessage(String.Format("You pay {0} gold.", toConsume));
                        m_Weaver.SayTo(from, "Let me tell you about this item...");
                        WhatIsIt.Delete();
                    }
                    else
                    {
                        m_Weaver.SayTo(from, "It would cost you {0} gold to have that identified.", toConsume);
                        from.SendMessage("You do not have enough gold.");
                    }
                }
                /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
                else
                {
                    m_Weaver.SayTo(from, "That does not need my services.");
                }
            }
Beispiel #7
0
        private void Fill(int level)
        {
            TrapType  = TrapType.ExplosionTrap;
            TrapPower = level * 25;
            TrapLevel = level;
            Locked    = true;

            switch (level)
            {
            case 1: RequiredSkill = 36; break;

            case 2: RequiredSkill = 76; break;

            case 3: RequiredSkill = 84; break;

            case 4: RequiredSkill = 92; break;

            case 5: RequiredSkill = 100; break;
            }

            LockLevel    = RequiredSkill - 10;
            MaxLockLevel = RequiredSkill + 40;

            DropItem(new Gold(level * 200));

            for (int i = 0; i < level; ++i)
            {
                DropItem(Loot.RandomScroll(0, 63, SpellbookType.Regular));
            }

            for (int i = 0; i < level * 2; ++i)
            {
                Item item;

                if (Core.AOS)
                {
                    item = Loot.RandomArmorOrShieldOrWeaponOrJewelry();
                }
                else
                {
                    item = Loot.RandomArmorOrShieldOrWeapon();
                }

                if (item is BaseWeapon)
                {
                    BaseWeapon weapon = (BaseWeapon)item;

                    if (Core.AOS)
                    {
                        int attributeCount;
                        int min, max;

                        GetRandomAOSStats(out attributeCount, out min, out max);

                        BaseRunicTool.ApplyAttributesTo(weapon, attributeCount, min, max);
                    }
                    else
                    {
                        weapon.DamageLevel     = (WeaponDamageLevel)Utility.Random(6);
                        weapon.AccuracyLevel   = (WeaponAccuracyLevel)Utility.Random(6);
                        weapon.DurabilityLevel = (WeaponDurabilityLevel)Utility.Random(6);
                    }

                    DropItem(item);
                }
                else if (item is BaseArmor)
                {
                    BaseArmor armor = (BaseArmor)item;

                    if (Core.AOS)
                    {
                        int attributeCount;
                        int min, max;

                        GetRandomAOSStats(out attributeCount, out min, out max);

                        BaseRunicTool.ApplyAttributesTo(armor, attributeCount, min, max);
                    }
                    else
                    {
                        armor.ProtectionLevel = (ArmorProtectionLevel)Utility.Random(6);
                        armor.Durability      = (ArmorDurabilityLevel)Utility.Random(6);
                    }

                    DropItem(item);
                }
                else if (item is BaseHat)
                {
                    BaseHat hat = (BaseHat)item;

                    if (Core.AOS)
                    {
                        int attributeCount;
                        int min, max;

                        GetRandomAOSStats(out attributeCount, out min, out max);

                        BaseRunicTool.ApplyAttributesTo(hat, attributeCount, min, max);
                    }

                    DropItem(item);
                }
                else if (item is BaseJewel)
                {
                    int attributeCount;
                    int min, max;

                    GetRandomAOSStats(out attributeCount, out min, out max);

                    BaseRunicTool.ApplyAttributesTo((BaseJewel)item, attributeCount, min, max);

                    DropItem(item);
                }
            }

            for (int i = 0; i < level; i++)
            {
                Item item = Loot.RandomPossibleReagent();
                item.Amount = Utility.RandomMinMax(40, 60);
                DropItem(item);
            }

            for (int i = 0; i < level; i++)
            {
                Item item = Loot.RandomGem();
                DropItem(item);
            }

            DropItem(new TreasureMap(level + 1, (Utility.RandomBool() ? Map.Felucca : Map.Trammel)));
        }
        public BloodChimera() : base(AIType.AI_Melee, FightMode.Closest, 6, 1, 0.175, 0.350)
        {
            Name = "a blood chimera";
            Body = 359;
            Hue  = 0x648;

            SetStr(376, 449);
            SetDex(218, 252);
            SetInt(138, 164);

            SetHits(494, 527);

            SetDamage(13, 19);

            SetDamageType(ResistanceType.Physical, 100);

            SetResistance(ResistanceType.Physical, 50);
            SetResistance(ResistanceType.Fire, 40);
            SetResistance(ResistanceType.Cold, 30);
            SetResistance(ResistanceType.Poison, 40);
            SetResistance(ResistanceType.Energy, 40);

            SetSkill(SkillName.MagicResist, 65.1, 80.0);
            SetSkill(SkillName.Tactics, 65.4, 88.5);
            SetSkill(SkillName.Wrestling, 68.8, 81.7);

            Fame  = 35500;
            Karma = -35500;

            PackReg(25);

            Container pack = new Backpack();

            pack.DropItem(new Gold(Utility.RandomMinMax(57, 76)));
            pack.DropItem(Loot.RandomStatue());
            pack.DropItem(Loot.RandomClothing());

            if (Utility.RandomDouble() < 0.4)
            {
                PackItem(new TreasureMap(2, Map.Malas));
            }

            if (Utility.RandomDouble() < 0.03)
            {
                BaseHat hat = Loot.RandomHat(true);
                BaseRunicTool.ApplyAttributesTo(hat, 4, 25, 30);

                pack.DropItem(hat);
            }


            if (Utility.RandomDouble() < 0.04)
            {
                BaseWeapon weapon = Loot.RandomRangedWeapon(true);
                BaseRunicTool.ApplyAttributesTo(weapon, 5, 25, 40);

                pack.DropItem(weapon);
            }

            if (Utility.RandomDouble() < 0.05)
            {
                BaseArmor armor = Loot.RandomArmor(true);
                BaseRunicTool.ApplyAttributesTo(armor, 5, 25, 40);

                pack.DropItem(armor);
            }

            Container bag = new Bag();

            bag.DropItem(new Gold(Utility.RandomMinMax(37, 71)));
            bag.DropItem(Loot.RandomInstrument());
            bag.DropItem(Loot.RandomShield());
            bag.DropItem(Loot.RandomPotion());
            bag.DropItem(Loot.RandomGem());
            bag.DropItem(Loot.RandomGem());

            if (Utility.RandomDouble() < 0.05)
            {
                BaseClothing clothing = Loot.RandomClothing(true);
                BaseRunicTool.ApplyAttributesTo(clothing, 4, 20, 25);

                bag.DropItem(clothing);
            }

            if (Utility.RandomDouble() < 0.05)
            {
                BaseJewel jewel = new SilverRing();
                if (Core.AOS)
                {
                    BaseRunicTool.ApplyAttributesTo(jewel, 4, 25, 40);
                }

                bag.DropItem(jewel);
            }

            Item ScrollLoot = Loot.RandomScroll(0, 50, SpellbookType.Regular);

            ScrollLoot.Amount = Utility.Random(2, 5);
            bag.DropItem(ScrollLoot);

            pack.DropItem(bag);

            PackItem(pack);
        }
Beispiel #9
0
        public override bool OnDragDrop(Mobile from, Item dropped)
        {
            Mobile       m      = from;
            PlayerMobile mobile = m as PlayerMobile;

            if (mobile != null)
            {
                if (dropped is Gold && dropped.Amount == 5)
                {
                    mobile.AddToBackpack(new QuestScroll(1));
                    this.PrivateOverheadMessage(MessageType.Regular, 1153, false, "Return the Quest parchment to me when you are done...for your reward.", mobile.NetState);
                    return(true);
                }
                else if (dropped is Gold && dropped.Amount == 10)
                {
                    mobile.AddToBackpack(new QuestScroll(2));
                    this.PrivateOverheadMessage(MessageType.Regular, 1153, false, "Return the Quest parchment to me when you are done...for your reward.", mobile.NetState);
                    return(true);
                }
                else if (dropped is Gold && dropped.Amount == 15)
                {
                    mobile.AddToBackpack(new QuestScroll(3));
                    this.PrivateOverheadMessage(MessageType.Regular, 1153, false, "Return the Quest parchment to me when you are done...for your reward.", mobile.NetState);
                    return(true);
                }
                else if (dropped is Gold && dropped.Amount == 20)
                {
                    mobile.AddToBackpack(new QuestScroll(4));
                    this.PrivateOverheadMessage(MessageType.Regular, 1153, false, "Return the Quest parchment to me when you are done...for your reward.", mobile.NetState);
                    return(true);
                }
                else if (dropped is Gold && dropped.Amount == 25)
                {
                    mobile.AddToBackpack(new QuestScroll(5));
                    this.PrivateOverheadMessage(MessageType.Regular, 1153, false, "Return the Quest parchment to me when you are done...for your reward.", mobile.NetState);
                    return(true);
                }
                else if (dropped is Gold && dropped.Amount == 30)
                {
                    mobile.AddToBackpack(new QuestScroll(6));
                    this.PrivateOverheadMessage(MessageType.Regular, 1153, false, "Return the Quest parchment to me when you are done...for your reward.", mobile.NetState);
                    return(true);
                }
                else if (dropped is Gold)
                {
                    this.PrivateOverheadMessage(MessageType.Regular, 1153, false, "That is not the amount I am looking for.", mobile.NetState);
                    return(false);
                }
                else if (dropped is QuestScroll)
                {
                    QuestScroll m_Quest = (QuestScroll)dropped;

                    if (m_Quest.NNeed > m_Quest.NGot)
                    {
                        mobile.AddToBackpack(dropped);
                        this.PrivateOverheadMessage(MessageType.Regular, 1153, false, "You have not completed this quest.", mobile.NetState);
                        return(false);
                    }

                    string sMessage = "";
                    if (m_Quest.NType == 1)
                    {
                        sMessage = "I see you were victorious. Here is your reward.";
                    }
                    else
                    {
                        sMessage = "Ahh...you have found " + m_Quest.NItemName + "! Here is your reward";
                    }

                    if (Utility.RandomMinMax(1, 4) == 1)
                    {
                        mobile.AddToBackpack(new Gold(m_Quest.NLevel * Utility.RandomMinMax(125, 200)));
                    }
                    else
                    {
                        mobile.AddToBackpack(new Gold(m_Quest.NLevel * Utility.RandomMinMax(75, 150)));

                        Item item;

                        if (Core.AOS)
                        {
                            item = Loot.RandomArmorOrShieldOrWeaponOrJewelry();
                        }
                        else
                        {
                            item = Loot.RandomArmorOrShieldOrWeapon();
                        }

                        if (item is BaseWeapon)
                        {
                            BaseWeapon weapon = (BaseWeapon)item;

                            if (Core.AOS)
                            {
                                int attributeCount;
                                int min, max;

                                GetRandomAOSStats(out attributeCount, out min, out max, m_Quest.NLevel);

                                BaseRunicTool.ApplyAttributesTo(weapon, attributeCount, min, max);
                            }
                            else
                            {
                                weapon.DamageLevel     = (WeaponDamageLevel)Utility.Random(6);
                                weapon.AccuracyLevel   = (WeaponAccuracyLevel)Utility.Random(6);
                                weapon.DurabilityLevel = (WeaponDurabilityLevel)Utility.Random(6);
                            }

                            mobile.AddToBackpack(item);
                        }
                        else if (item is BaseArmor)
                        {
                            BaseArmor armor = (BaseArmor)item;

                            if (Core.AOS)
                            {
                                int attributeCount;
                                int min, max;

                                GetRandomAOSStats(out attributeCount, out min, out max, m_Quest.NLevel);

                                BaseRunicTool.ApplyAttributesTo(armor, attributeCount, min, max);
                            }
                            else
                            {
                                armor.ProtectionLevel = (ArmorProtectionLevel)Utility.Random(6);
                                armor.Durability      = (ArmorDurabilityLevel)Utility.Random(6);
                            }

                            mobile.AddToBackpack(item);
                        }
                        else if (item is BaseHat)
                        {
                            BaseHat hat = (BaseHat)item;

                            if (Core.AOS)
                            {
                                int attributeCount;
                                int min, max;

                                GetRandomAOSStats(out attributeCount, out min, out max, m_Quest.NLevel);

                                BaseRunicTool.ApplyAttributesTo(hat, attributeCount, min, max);
                            }

                            mobile.AddToBackpack(item);
                        }
                        else if (item is BaseJewel)
                        {
                            int attributeCount;
                            int min, max;

                            GetRandomAOSStats(out attributeCount, out min, out max, m_Quest.NLevel);

                            BaseRunicTool.ApplyAttributesTo((BaseJewel)item, attributeCount, min, max);

                            mobile.AddToBackpack(item);
                        }
                    }
                    this.PrivateOverheadMessage(MessageType.Regular, 1153, false, sMessage, mobile.NetState);

                    dropped.Delete();

                    return(true);
                }
                else
                {
                    mobile.AddToBackpack(dropped);
                    this.PrivateOverheadMessage(MessageType.Regular, 1153, false, "I have no need for this...", mobile.NetState); return(true);
                }
            }

            return(false);
        }
Beispiel #10
0
        private void Fill(int level)
        {
            TrapType  = TrapType.ExplosionTrap;
            TrapPower = level * 25;
            TrapLevel = level;
            Locked    = true;

            switch (level)
            {
            case 1:
                RequiredSkill = 36;
                break;

            case 2:
                RequiredSkill = 76;
                break;

            case 3:
                RequiredSkill = 84;
                break;

            case 4:
                RequiredSkill = 92;
                break;

            case 5:
                RequiredSkill = 100;
                break;

            case 6:
                RequiredSkill = 100;
                break;
            }

            LockLevel    = RequiredSkill - 10;
            MaxLockLevel = RequiredSkill + 40;

            DropItem(new Gold(level * 200));

            for (int i = 0; i < level; ++i)
            {
                DropItem(Loot.RandomScroll(0, 63, SpellbookType.Regular));
            }

            for (int i = 0; i < level * 2; ++i)
            {
                Item item = Loot.RandomArmorOrShieldOrWeaponOrJewelry();

                if (item != null && RandomItemGenerator.Enabled)
                {
                    TreasureMapChest.GetRandomItemStat(out int min, out int max);

                    RunicReforging.GenerateRandomItem(item, 0, min, max);

                    DropItem(item);
                    continue;
                }

                if (item is BaseWeapon)
                {
                    BaseWeapon weapon = (BaseWeapon)item;

                    int attributeCount;
                    int min, max;

                    GetRandomAOSStats(out attributeCount, out min, out max);

                    BaseRunicTool.ApplyAttributesTo(weapon, attributeCount, min, max);

                    DropItem(item);
                }
                else if (item is BaseArmor)
                {
                    BaseArmor armor = (BaseArmor)item;

                    int attributeCount;
                    int min, max;

                    GetRandomAOSStats(out attributeCount, out min, out max);

                    BaseRunicTool.ApplyAttributesTo(armor, attributeCount, min, max);

                    DropItem(item);
                }
                else if (item is BaseHat)
                {
                    BaseHat hat = (BaseHat)item;

                    int attributeCount;
                    int min, max;

                    GetRandomAOSStats(out attributeCount, out min, out max);

                    BaseRunicTool.ApplyAttributesTo(hat, attributeCount, min, max);

                    DropItem(item);
                }
                else if (item is BaseJewel)
                {
                    int attributeCount;
                    int min, max;

                    GetRandomAOSStats(out attributeCount, out min, out max);

                    BaseRunicTool.ApplyAttributesTo((BaseJewel)item, attributeCount, min, max);

                    DropItem(item);
                }
            }

            for (int i = 0; i < level; i++)
            {
                Item item = Loot.RandomPossibleReagent();
                item.Amount = Utility.RandomMinMax(40, 60);
                DropItem(item);
            }

            for (int i = 0; i < level; i++)
            {
                Item item = Loot.RandomGem();
                DropItem(item);
            }

            DropItem(new TreasureMap(TreasureMapInfo.ConvertLevel(level + 1), (Siege.SiegeShard ? Map.Felucca : Utility.RandomBool() ? Map.Felucca : Map.Trammel)));
        }
Beispiel #11
0
        public static void ApplyAttribute(Mobile from, BookOfSpellCrafts book, int craftId, BaseHat hat, AosElementAttribute attribute, int minimum, int maximum)
        {
            CheckItem(from, hat, (hat.Resistances[attribute] == 0));
            UseMagicJewels(from, book, hat, SpellCraftConfig.MagicJewelRequirements[craftId]);
            int scalar = ComputeSkillScalar(from);

            ApplyAttribute(hat.Resistances, SpellCraftConfig.MinimumIntensity * scalar, SpellCraftConfig.MaximumIntensity * scalar, attribute, minimum, maximum);
            MarkHat(from, hat);
        }