Exemple #1
0
        public override void AlterLightLevel(Mobile m, ref int global, ref int personal)
        {
            if (Dungeon)
            {
                if (m is TeiravonMobile)
                {
                    TeiravonMobile tm = (TeiravonMobile)m;

                    if (tm.IsDrow() || tm.IsDwarf() || tm.IsGnome() || tm.AccessLevel > AccessLevel.Player)
                    {
                        global = LightCycle.DayLevel;
                    }
                    else if (tm.IsElf() || tm.IsOrc() || tm.IsGoblin())
                    {
                        global = LightCycle.DungeonLevel / 2;
                    }
                    else
                    {
                        global = LightCycle.DungeonLevel;
                    }
                }
            }

            base.AlterLightLevel(m, ref global, ref personal);
        }
        public override bool CanEquip(Mobile m)
        {
            if (m is TeiravonMobile)
            {
                TeiravonMobile m_Player = (TeiravonMobile)m;

                if ((m_Player.IsOrc() || m_Player.IsGoblin()))
                {
                    if (m.Hair != null)
                    {
                        (m.Hair).Delete();
                    }

                    if (m.Beard != null)
                    {
                        (m.Beard).Delete();
                    }

                    return(true);
                }
            }

            if (!base.CanEquip(m))
            {
                return(false);
            }

            return(false);
        }
        public static int ComputeLevelFor(Mobile from)
        {
            if (m_LevelOverride > int.MinValue)
            {
                return(m_LevelOverride);
            }

            bool teiravon     = false;
            bool drow         = false;
            bool lowlight     = false;
            bool shapeshifted = false;

            if (from is TeiravonMobile)
            {
                teiravon = true;

                TeiravonMobile m_Player = (TeiravonMobile)from;

                if (m_Player.IsDrow())
                {
                    drow = true;
                }

                else if (m_Player.IsElf() || m_Player.IsDwarf() || m_Player.IsDuergar() || m_Player.IsOrc() || m_Player.IsHalfElf() || m_Player.IsGoblin() || m_Player.IsGnome())
                {
                    lowlight = true;
                }

                else if (m_Player.IsShifted() && m_Player.Shapeshifted)
                {
                    shapeshifted = true;
                }
            }

            int hours, minutes;

            Server.Items.Clock.GetTime(from.Map, from.X, from.Y, out hours, out minutes);

            /* OSI times:
             *
             * Midnight ->  3:59 AM : Night
             *  4:00 AM -> 11:59 PM : Day
             *
             * RunUO times:
             *
             * 10:00 PM -> 11:59 PM : Scale to night
             * Midnight ->  3:59 AM : Night
             *  4:00 AM ->  5:59 AM : Scale to day
             *  6:00 AM ->  9:59 PM : Day
             *
             * Drow times:
             *
             * 10:00 PM -> 11:59 PM : Scale to day
             * Midnight ->  3:59 AM : Day
             *  4:00 AM ->  5:59 AM : Scale to night
             *  6:00 AM ->  9:59 PM : Night
             */

            if (!teiravon)
            {
                if (hours < 4)
                {
                    return(NightLevel);
                }

                if (hours < 6)
                {
                    return(NightLevel + (((((hours - 4) * 60) + minutes) * (DayLevel - NightLevel)) / 120));
                }

                if (hours < 22)
                {
                    return(DayLevel);
                }

                if (hours < 24)
                {
                    return(DayLevel + (((((hours - 22) * 60) + minutes) * (NightLevel - DayLevel)) / 120));
                }
            }
            else
            {
                if (!drow && !lowlight && !shapeshifted)
                {
                    // No Low-Light vision or Infravision
                    if (hours < 4)
                    {
                        return(NightLevel);
                    }

                    if (hours < 6)
                    {
                        return(NightLevel + (((((hours - 4) * 60) + minutes) * (DayLevel - NightLevel)) / 120));
                    }

                    if (hours < 22)
                    {
                        return(DayLevel);
                    }

                    if (hours < 24)
                    {
                        return(DayLevel + (((((hours - 22) * 60) + minutes) * (NightLevel - DayLevel)) / 120));
                    }
                }
                else if (shapeshifted && !drow)
                {
                    if (hours < 4)                       //goes from 10 to 5
                    {
                        return(10 - ((((hours * 60) + minutes) * 5) / 240));
                    }

                    if (hours < 6)                      //goes from 5 -> 0
                    {
                        return(5 - (((((hours - 4) * 60) + minutes) * 5) / 120));
                    }

                    if (hours < 22)                       //is zero during daytime
                    {
                        return(DayLevel);
                    }

                    if (hours < 24)                       //goes from 0 -> 10
                    {
                        return(DayLevel + (((((hours - 22) * 60) + minutes) * 10) / 120));
                    }
                }
                else if (lowlight)
                {
                    // Low-Light vision
                    if (hours < 4)                       //goes from 12 to 6
                    {
                        return(12 - ((((hours * 60) + minutes) * 6) / 240));
                    }

                    if (hours < 6)                       //goes from 6 to 0
                    {
                        return(6 - (((((hours - 4) * 60) + minutes) * 6) / 120));
                    }

                    if (hours < 22)                       //zero
                    {
                        return(DayLevel);
                    }

                    if (hours < 24)                       //goes from 0 to 12
                    {
                        return(DayLevel + (((((hours - 22) * 60) + minutes) * 12) / 120));
                    }
                }
                else
                {
                    // Simulate Drow infravision
                    int light = 0;

                    if (hours < 4)
                    {
                        return(DayLevel);
                    }

                    if (hours < 6)
                    {
                        light = DayLevel + (((((hours - 4) * 60) + minutes) * (NightLevel - DayLevel)) / 120);
                        return(((light > DungeonLevel) || (light < 0)) ? DungeonLevel : light);
                    }

                    if (hours < 22)
                    {
                        return(NightLevel);
                    }

                    if (hours < 24)
                    {
                        light = NightLevel + (((((hours - 22) * 60) + minutes) * (DayLevel - NightLevel)) / 120);
                        return(((light > DungeonLevel) || (light < 0)) ? DungeonLevel : light);
                    }
                }
            }

            return(NightLevel);            // should never be
        }
        public override void OnResponse(NetState sender, RelayInfo info)
        {
            switch (info.ButtonID)
            {
            case 0:
            {
                break;
            }

            case (int)Buttons.Iron:
            {
                m_step[m_itemnum] = new IronIngot();
                m_itemnum        += 1;
                m_player.SendGump(new AlloyGump(m_player, m_amt, m_itemnum, m_step[1], m_step[2], m_step[3], m_step[4], m_step[5], m_step[6]));
                break;
            }

            case (int)Buttons.DullCopper:
            {
                m_step[m_itemnum] = new DullCopperIngot();
                m_itemnum        += 1;
                m_player.SendGump(new AlloyGump(m_player, m_amt, m_itemnum, m_step[1], m_step[2], m_step[3], m_step[4], m_step[5], m_step[6]));
                break;
            }

            case (int)Buttons.ShadowIron:
            {
                m_step[m_itemnum] = new ShadowIronIngot();
                m_itemnum        += 1;
                m_player.SendGump(new AlloyGump(m_player, m_amt, m_itemnum, m_step[1], m_step[2], m_step[3], m_step[4], m_step[5], m_step[6]));
                break;
            }

            case (int)Buttons.Copper:
            {
                m_step[m_itemnum] = new CopperIngot();
                m_itemnum        += 1;
                m_player.SendGump(new AlloyGump(m_player, m_amt, m_itemnum, m_step[1], m_step[2], m_step[3], m_step[4], m_step[5], m_step[6]));
                break;
            }

            case (int)Buttons.Bronze:
            {
                m_step[m_itemnum] = new BronzeIngot();
                m_itemnum        += 1;
                m_player.SendGump(new AlloyGump(m_player, m_amt, m_itemnum, m_step[1], m_step[2], m_step[3], m_step[4], m_step[5], m_step[6]));
                break;
            }

            case (int)Buttons.Gold:
            {
                m_step[m_itemnum] = new GoldIngot();
                m_itemnum        += 1;
                m_player.SendGump(new AlloyGump(m_player, m_amt, m_itemnum, m_step[1], m_step[2], m_step[3], m_step[4], m_step[5], m_step[6]));
                break;
            }

            case (int)Buttons.Agapite:
            {
                m_step[m_itemnum] = new AgapiteIngot();
                m_itemnum        += 1;
                m_player.SendGump(new AlloyGump(m_player, m_amt, m_itemnum, m_step[1], m_step[2], m_step[3], m_step[4], m_step[5], m_step[6]));
                break;
            }

            case (int)Buttons.Verite:
            {
                m_step[m_itemnum] = new VeriteIngot();
                m_itemnum        += 1;
                m_player.SendGump(new AlloyGump(m_player, m_amt, m_itemnum, m_step[1], m_step[2], m_step[3], m_step[4], m_step[5], m_step[6]));
                break;
            }

            case (int)Buttons.Valorite:
            {
                m_step[m_itemnum] = new ValoriteIngot();
                m_itemnum        += 1;
                m_player.SendGump(new AlloyGump(m_player, m_amt, m_itemnum, m_step[1], m_step[2], m_step[3], m_step[4], m_step[5], m_step[6]));
                break;
            }

            case (int)Buttons.Oak:
            {
                m_step[m_itemnum] = new Log();
                m_itemnum        += 1;
                m_player.SendGump(new AlloyGump(m_player, m_amt, m_itemnum, m_step[1], m_step[2], m_step[3], m_step[4], m_step[5], m_step[6]));
                break;
            }

            case (int)Buttons.Pine:
            {
                m_step[m_itemnum] = new PineLog();
                m_itemnum        += 1;
                m_player.SendGump(new AlloyGump(m_player, m_amt, m_itemnum, m_step[1], m_step[2], m_step[3], m_step[4], m_step[5], m_step[6]));
                break;
            }

            case (int)Buttons.Redwood:
            {
                m_step[m_itemnum] = new RedwoodLog();
                m_itemnum        += 1;
                m_player.SendGump(new AlloyGump(m_player, m_amt, m_itemnum, m_step[1], m_step[2], m_step[3], m_step[4], m_step[5], m_step[6]));
                break;
            }

            case (int)Buttons.WhitePine:
            {
                m_step[m_itemnum] = new WhitePineLog();
                m_itemnum        += 1;
                m_player.SendGump(new AlloyGump(m_player, m_amt, m_itemnum, m_step[1], m_step[2], m_step[3], m_step[4], m_step[5], m_step[6]));
                break;
            }

            case (int)Buttons.Ashwood:
            {
                m_step[m_itemnum] = new AshwoodLog();
                m_itemnum        += 1;
                m_player.SendGump(new AlloyGump(m_player, m_amt, m_itemnum, m_step[1], m_step[2], m_step[3], m_step[4], m_step[5], m_step[6]));
                break;
            }

            case (int)Buttons.SilverBirch:
            {
                m_step[m_itemnum] = new SilverBirchLog();
                m_itemnum        += 1;
                m_player.SendGump(new AlloyGump(m_player, m_amt, m_itemnum, m_step[1], m_step[2], m_step[3], m_step[4], m_step[5], m_step[6]));
                break;
            }

            case (int)Buttons.Silver:
            {
                m_step[m_itemnum] = new SilverIngot();
                m_itemnum        += 1;
                m_player.SendGump(new AlloyGump(m_player, m_amt, m_itemnum, m_step[1], m_step[2], m_step[3], m_step[4], m_step[5], m_step[6]));
                break;
            }

            case (int)Buttons.Yew:
            {
                m_step[m_itemnum] = new YewLog();
                m_itemnum        += 1;
                m_player.SendGump(new AlloyGump(m_player, m_amt, m_itemnum, m_step[1], m_step[2], m_step[3], m_step[4], m_step[5], m_step[6]));
                break;
            }

            case (int)Buttons.BlackOak:
            {
                m_step[m_itemnum] = new BlackOakLog();
                m_itemnum        += 1;
                m_player.SendGump(new AlloyGump(m_player, m_amt, m_itemnum, m_step[1], m_step[2], m_step[3], m_step[4], m_step[5], m_step[6]));
                break;
            }

            case (int)Buttons.SulfurousAsh:
            {
                m_step[m_itemnum] = new SulfurousAsh();
                m_itemnum        += 1;
                m_player.SendGump(new AlloyGump(m_player, m_amt, m_itemnum, m_step[1], m_step[2], m_step[3], m_step[4], m_step[5], m_step[6]));
                break;
            }

            case (int)Buttons.ZoogiFungus:
            {
                m_step[m_itemnum] = new ZoogiFungus();
                m_itemnum        += 1;
                m_player.SendGump(new AlloyGump(m_player, m_amt, m_itemnum, m_step[1], m_step[2], m_step[3], m_step[4], m_step[5], m_step[6]));
                break;
            }

            case (int)Buttons.FertileDirt:
            {
                m_step[m_itemnum] = new FertileDirt();
                m_itemnum        += 1;
                m_player.SendGump(new AlloyGump(m_player, m_amt, m_itemnum, m_step[1], m_step[2], m_step[3], m_step[4], m_step[5], m_step[6]));
                break;
            }

            case (int)Buttons.PigIron:
            {
                m_step[m_itemnum] = new PigIron();
                m_itemnum        += 1;
                m_player.SendGump(new AlloyGump(m_player, m_amt, m_itemnum, m_step[1], m_step[2], m_step[3], m_step[4], m_step[5], m_step[6]));
                break;
            }

            case (int)Buttons.NoxCrystal:
            {
                m_step[m_itemnum] = new NoxCrystal();
                m_itemnum        += 1;
                m_player.SendGump(new AlloyGump(m_player, m_amt, m_itemnum, m_step[1], m_step[2], m_step[3], m_step[4], m_step[5], m_step[6]));
                break;
            }

            case (int)Buttons.Diamond:
            {
                m_step[m_itemnum] = new Diamond();
                m_itemnum        += 1;
                m_player.SendGump(new AlloyGump(m_player, m_amt, m_itemnum, m_step[1], m_step[2], m_step[3], m_step[4], m_step[5], m_step[6]));
                break;
            }

            case (int)Buttons.Wool:
            {
                m_step[m_itemnum] = new Wool();
                m_itemnum        += 1;
                m_player.SendGump(new AlloyGump(m_player, m_amt, m_itemnum, m_step[1], m_step[2], m_step[3], m_step[4], m_step[5], m_step[6]));
                break;
            }

            case (int)Buttons.Bone:
            {
                m_step[m_itemnum] = new Bone();
                m_itemnum        += 1;
                m_player.SendGump(new AlloyGump(m_player, m_amt, m_itemnum, m_step[1], m_step[2], m_step[3], m_step[4], m_step[5], m_step[6]));
                break;
            }

            case (int)Buttons.Citrine:
            {
                m_step[m_itemnum] = new Citrine();
                m_itemnum        += 1;
                m_player.SendGump(new AlloyGump(m_player, m_amt, m_itemnum, m_step[1], m_step[2], m_step[3], m_step[4], m_step[5], m_step[6]));
                break;
            }

            case (int)Buttons.BlackPearl:
            {
                m_step[m_itemnum] = new BlackPearl();
                m_itemnum        += 1;
                m_player.SendGump(new AlloyGump(m_player, m_amt, m_itemnum, m_step[1], m_step[2], m_step[3], m_step[4], m_step[5], m_step[6]));
                break;
            }

            case (int)Buttons.Decrease:
            {
                if (m_amt > 1)
                {
                    m_amt -= 1;
                }
                m_player.SendGump(new AlloyGump(m_player, m_amt, m_itemnum, m_step[1], m_step[2], m_step[3], m_step[4], m_step[5], m_step[6]));
                break;
            }

            case (int)Buttons.Increase:
            {
                m_amt += 1;
                m_player.SendGump(new AlloyGump(m_player, m_amt, m_itemnum, m_step[1], m_step[2], m_step[3], m_step[4], m_step[5], m_step[6]));
                break;
            }

            case (int)Buttons.Cancel:
            {
                m_player.SendGump(new AlloyGump(m_player, 1, 1, null, null, null, null, null, null));
                break;
            }

            case (int)Buttons.OK:
            {
                //check for and consume ingredients here
                Container pack = m_player.Backpack;

                if (m_step[6] == null)
                {
                    m_player.SendMessage("You must pick 6 steps");
                    m_player.SendGump(new AlloyGump(m_player, 1, 1, null, null, null, null, null, null));
                    break;
                }

                bool allres = true;

                for (int i = 1; i < 7; i++)
                {
                    Item itm     = (Item)m_step[i];
                    int  packamt = m_player.Backpack.GetAmount(itm.GetType());
                    if (packamt < m_amt)
                    {
                        m_player.SendMessage("You do not have enough {0} to attempt this", itm.GetType().Name);
                        allres = false;
                    }
                }

                if (allres)
                {
                    for (int i = 1; i < 7; i++)
                    {
                        Item itm = (Item)m_step[i];
                        m_player.Backpack.ConsumeTotal(m_step[i].GetType(), m_amt);
                        m_player.SendMessage("Step {0} consumes {1} {2}", i.ToString(), m_amt.ToString(), itm.GetType().Name);
                    }
                }
                else
                {
                    m_player.SendMessage("Please try again when you have all of the needed resources");
                    return;
                }


                if (m_step[1] is AgapiteIngot && m_step[2] is BlackOakLog && m_step[3] is AgapiteIngot && m_step[4] is ShadowIronIngot && m_step[5] is Bone && m_step[6] is AgapiteIngot)
                {
                    if (m_player.Backpack != null)
                    {
                        m_player.AddToBackpack(new BloodrockIngot(m_amt));
                    }
                    break;
                }

                if (m_step[1] is ValoriteIngot && m_step[2] is WhitePineLog && m_step[3] is ValoriteIngot && m_step[4] is CopperIngot && m_step[5] is FertileDirt && m_step[6] is SilverBirchLog)
                {
                    if (m_player.Backpack != null)
                    {
                        m_player.AddToBackpack(new SteelIngot(m_amt));
                    }
                    break;
                }

                if (m_step[1] is ShadowIronIngot && m_step[2] is AshwoodLog && m_step[3] is VeriteIngot && m_step[4] is ShadowIronIngot && m_step[5] is NoxCrystal && m_step[6] is ShadowIronIngot)
                {
                    if (m_player.Backpack != null)
                    {
                        m_player.AddToBackpack(new AdamantiteIngot(m_amt));
                    }
                    break;
                }

                if (m_step[1] is IronIngot && m_step[2] is SilverBirchLog && m_step[3] is ValoriteIngot && m_step[4] is IronIngot && m_step[5] is Citrine && m_step[6] is SilverBirchLog)
                {
                    if (m_player.Backpack != null)
                    {
                        m_player.AddToBackpack(new IthilmarIngot(m_amt));
                    }
                    break;
                }

                if (m_step[1] is SilverIngot && m_step[2] is GoldIngot && m_step[3] is Diamond && m_step[4] is SilverIngot && m_step[5] is GoldIngot && m_step[6] is SilverIngot)
                {
                    if (m_player.Backpack != null)
                    {
                        m_player.AddToBackpack(new ElectrumIngot(m_amt));
                    }
                    break;
                }

                if (m_step[1] is PigIron && m_player.IsGoblin())
                {
                    if (m_player.Backpack != null)
                    {
                        m_player.AddToBackpack(new SkazzIngot(m_amt));
                    }
                    break;
                }

                m_player.SendMessage("You fail to create a new alloy and your materials are lost");
                m_player.SendGump(new AlloyGump(m_player, 1, 1, null, null, null, null, null, null));
                break;
            }
            }
        }
        public static Chart CompileRaceChart()
        {
            PieChart chart = new PieChart("Race Distribution", "graphs_race_distrib", true);

            ChartItem humanItem = new ChartItem("Humans", 0);
            ChartItem elfItem   = new ChartItem("Elves", 0);
            ChartItem dwarfItem = new ChartItem("Dwarves", 0);
            ChartItem drowItem  = new ChartItem("Drow", 0);
            ChartItem orcItem   = new ChartItem("Orcs", 0);
            ChartItem gnomeItem = new ChartItem("Gnomes", 0);
            ChartItem gobItem   = new ChartItem("Goblins", 0);
            ChartItem frostItem = new ChartItem("Frostling", 0);


            foreach (Mobile mob in World.Mobiles.Values)
            {
                if (mob != null && mob is TeiravonMobile)
                {
                    TeiravonMobile tav  = mob as TeiravonMobile;
                    Account        acct = (Account)tav.Account;
                    if ((acct.LastLogin + TimeSpan.FromDays(30.0)) < DateTime.Now)
                    {
                        continue;
                    }

                    if (tav.IsHuman())
                    {
                        humanItem.Value++;
                    }
                    else if (tav.IsElf())
                    {
                        elfItem.Value++;
                    }
                    else if (tav.IsDwarf())
                    {
                        dwarfItem.Value++;
                    }
                    else if (tav.IsDrow())
                    {
                        drowItem.Value++;
                    }
                    else if (tav.IsOrc())
                    {
                        orcItem.Value++;
                    }
                    else if (tav.IsGnome())
                    {
                        gnomeItem.Value++;
                    }
                    else if (tav.IsGoblin())
                    {
                        gobItem.Value++;
                    }
                    else if (tav.IsFrostling())
                    {
                        frostItem.Value++;
                    }
                }
            }

            chart.Items.Add(humanItem);
            chart.Items.Add(elfItem);
            chart.Items.Add(dwarfItem);
            chart.Items.Add(drowItem);
            chart.Items.Add(orcItem);
            chart.Items.Add(gnomeItem);
            chart.Items.Add(gobItem);
            chart.Items.Add(frostItem);

            return(chart);
        }
Exemple #6
0
        public override void CustomSystem(Mobile thePlayer)
        {
            int index = -1;

            TeiravonMobile m_Player = (TeiravonMobile)thePlayer;


            if (thePlayer != null && thePlayer.Backpack.FindItemByType(typeof(AlchemyTome)) != null && !m_Player.IsAssassin())
            {
                AlchemyTome m_Tome = (AlchemyTome)thePlayer.Backpack.FindItemByType(typeof(AlchemyTome));

                if ((m_Tome.Formulas & 0x1) != 0)
                {
                    // Refresh
                    index = AddCraft(typeof(RefreshPotion), 1044530, 1044538, -25, 25.0, typeof(BlackPearl), 1044353, 1, 1044361);
                    AddRes(index, typeof(Bottle), 1044529, 1, 500315);
                }

                if ((m_Tome.Formulas & 0x2) != 0)
                {
                    // Greater Refresh
                    index = AddCraft(typeof(TotalRefreshPotion), 1044530, 1044539, 25.0, 75.0, typeof(BlackPearl), 1044353, 5, 1044361);
                    AddRes(index, typeof(Bottle), 1044529, 1, 500315);
                }

                if ((m_Tome.Formulas & 0x4) != 0)
                {
                    // Agility
                    index = AddCraft(typeof(AgilityPotion), 1044531, 1044540, 15.0, 65.0, typeof(Bloodmoss), 1044354, 1, 1044362);
                    AddRes(index, typeof(Bottle), 1044529, 1, 500315);
                }

                if ((m_Tome.Formulas & 0x8) != 0)
                {
                    // Greater Agility
                    index = AddCraft(typeof(GreaterAgilityPotion), 1044531, 1044541, 35.0, 85.0, typeof(Bloodmoss), 1044354, 3, 1044362);
                    AddRes(index, typeof(Bottle), 1044529, 1, 500315);
                }

                if ((m_Tome.Formulas & 0x10) != 0)
                {
                    // Nightsight
                    index = AddCraft(typeof(NightSightPotion), 1044532, 1044542, -25.0, 25.0, typeof(SpidersSilk), 1044360, 1, 1044368);
                    AddRes(index, typeof(Bottle), 1044529, 1, 500315);
                }

                if ((m_Tome.Formulas & 0x20) != 0)
                {
                    // Lesser Heal
                    index = AddCraft(typeof(LesserHealPotion), 1044533, 1044543, -25.0, 25.0, typeof(Ginseng), 1044356, 1, 1044364);
                    AddRes(index, typeof(Bottle), 1044529, 1, 500315);
                }

                if ((m_Tome.Formulas & 0x40) != 0)
                {
                    // Heal
                    index = AddCraft(typeof(HealPotion), 1044533, 1044544, 15.0, 65.0, typeof(Ginseng), 1044356, 3, 1044364);
                    AddRes(index, typeof(Bottle), 1044529, 1, 500315);
                }

                if ((m_Tome.Formulas & 0x80) != 0)
                {
                    // Greater Heal
                    index = AddCraft(typeof(GreaterHealPotion), 1044533, 1044545, 55.0, 105.0, typeof(Ginseng), 1044356, 7, 1044364);
                    AddRes(index, typeof(Bottle), 1044529, 1, 500315);
                }

                if ((m_Tome.Formulas & 0x100) != 0)
                {
                    // Strength
                    index = AddCraft(typeof(StrengthPotion), 1044534, 1044546, 25.0, 75.0, typeof(MandrakeRoot), 1044357, 2, 1044365);
                    AddRes(index, typeof(Bottle), 1044529, 1, 500315);
                }

                if ((m_Tome.Formulas & 0x200) != 0)
                {
                    // Greater Strength
                    index = AddCraft(typeof(GreaterStrengthPotion), 1044534, 1044547, 45.0, 95.0, typeof(MandrakeRoot), 1044357, 5, 1044365);
                    AddRes(index, typeof(Bottle), 1044529, 1, 500315);
                }

                if ((m_Tome.Formulas & 0x400) != 0)
                {
                    // Lesser Poison
                    index = AddCraft(typeof(LesserPoisonPotion), 1044535, 1044548, -5.0, 45.0, typeof(Nightshade), 1044358, 1, 1044366);
                    AddRes(index, typeof(Bottle), 1044529, 1, 500315);
                }

                if ((m_Tome.Formulas & 0x800) != 0)
                {
                    // Poison
                    index = AddCraft(typeof(PoisonPotion), 1044535, 1044549, 15.0, 65.0, typeof(Nightshade), 1044358, 2, 1044366);
                    AddRes(index, typeof(Bottle), 1044529, 1, 500315);
                }

                if ((m_Tome.Formulas & 0x1000) != 0)
                {
                    // Greater Poison
                    index = AddCraft(typeof(GreaterPoisonPotion), 1044535, 1044550, 55.0, 105.0, typeof(Nightshade), 1044358, 4, 1044366);
                    AddRes(index, typeof(Bottle), 1044529, 1, 500315);
                }

                if ((m_Tome.Formulas & 0x2000) != 0)
                {
                    // Deadly Poison
                    index = AddCraft(typeof(DeadlyPoisonPotion), 1044535, 1044551, 90.0, 140.0, typeof(Nightshade), 1044358, 8, 1044366);
                    AddRes(index, typeof(Bottle), 1044529, 1, 500315);
                }

                if ((m_Tome.Formulas & 0x4000) != 0)
                {
                    // Lesser Cure
                    index = AddCraft(typeof(LesserCurePotion), 1044536, 1044552, -10.0, 40.0, typeof(Garlic), 1044355, 1, 1044363);
                    AddRes(index, typeof(Bottle), 1044529, 1, 500315);
                }

                if ((m_Tome.Formulas & 0x8000) != 0)
                {
                    // Cure
                    index = AddCraft(typeof(CurePotion), 1044536, 1044553, 25.0, 75.0, typeof(Garlic), 1044355, 3, 1044363);
                    AddRes(index, typeof(Bottle), 1044529, 1, 500315);
                }

                if ((m_Tome.Formulas & 0x10000) != 0)
                {
                    // Greater Cure
                    index = AddCraft(typeof(GreaterCurePotion), 1044536, 1044554, 65.0, 115.0, typeof(Garlic), 1044355, 6, 1044363);
                    AddRes(index, typeof(Bottle), 1044529, 1, 500315);
                }

                if ((m_Tome.Formulas & 0x20000) != 0)
                {
                    // Lesser Explosion
                    index = AddCraft(typeof(LesserExplosionPotion), 1044537, 1044555, 5.0, 55.0, typeof(SulfurousAsh), 1044359, 3, 1044367);
                    AddRes(index, typeof(Bottle), 1044529, 1, 500315);
                }

                if ((m_Tome.Formulas & 0x40000) != 0)
                {
                    // Explosion
                    index = AddCraft(typeof(ExplosionPotion), 1044537, 1044556, 35.0, 85.0, typeof(SulfurousAsh), 1044359, 5, 1044367);
                    AddRes(index, typeof(Bottle), 1044529, 1, 500315);
                }

                if ((m_Tome.Formulas & 0x80000) != 0)
                {
                    // Greater Explosion

                    index = AddCraft(typeof(GreaterExplosionPotion), 1044537, 1044557, 65.0, 115.0, typeof(SulfurousAsh), 1044359, 10, 1044367);
                    AddRes(index, typeof(Bottle), 1044529, 1, 500315);
                }

                // ************** Teiravon Potions**************

                if (m_Player.IsAlchemist() || m_Player.HasFeat(TeiravonMobile.Feats.AlchemyScience))
                {
                    if ((m_Tome.Formulas & 0x100000) != 0)
                    {
                        index = AddCraft(typeof(ChameleonPotion), "Lost Lore", "Chameleon Potion", 90.0, 100.0, typeof(Bottle), "Bottle", 1);
                        AddRes(index, typeof(BatWing), "Bat Wing", 3);
                        AddRes(index, typeof(WyrmHeart), "Wyrm Heart", 3);
                    }

                    /*
                     *                  if ( ( m_Tome.Formulas & 0x200000 ) != 0 )
                     *                  {
                     *                          index = AddCraft( typeof( LesserFloatPotion ), "Lost Lore", "Lesser Float Potion", 75.0, 100.0, typeof( Bottle ), "Bottle", 1 );
                     *                          AddRes( index, typeof( Pumice ), "Pumice", 1 );
                     *                          AddRes( index, typeof( EyeOfNewt ), "Eye of Newt", 1 );
                     *                  }
                     *
                     *                  if ( ( m_Tome.Formulas & 0x400000 ) != 0 )
                     *                  {
                     *                          index = AddCraft( typeof( FloatPotion ), "Lost Lore", "Float Potion", 85.0, 100.0, typeof( Bottle ), "Bottle", 1 );
                     *                          AddRes( index, typeof( Pumice ), "Pumice", 3 );
                     *                          AddRes( index, typeof( EyeOfNewt ), "Eye of Newt", 3 );
                     *                  }
                     *
                     *                  if ( ( m_Tome.Formulas & 0x800000 ) != 0 )
                     *                  {
                     *                          index = AddCraft( typeof( GreaterFloatPotion ), "Lost Lore", "Greater Float Potion", 95.0, 115.0, typeof( Bottle ), "Bottle", 1 );
                     *                          AddRes( index, typeof( Pumice ), "Pumice", 5 );
                     *                          AddRes( index, typeof( EyeOfNewt ), "Eye of Newt", 5 );
                     *                  }*/

                    if ((m_Tome.Formulas & 0x1000000) != 0)
                    {
                        index = AddCraft(typeof(SustenancePotion), "Lost Lore", "Sustenance Potion", 75.0, 100.0, typeof(Bottle), "Bottle", 1);
                        AddRes(index, typeof(Garlic), "Garlic", 1);
                        AddRes(index, typeof(BatWing), "Bat Wing", 1);
                    }

                    if ((m_Tome.Formulas & 0x2000000) != 0)
                    {
                        index = AddCraft(typeof(GreaterSustenancePotion), "Lost Lore", "Greater Sustenance Potion", 85.0, 100.0, typeof(Bottle), "Bottle", 1);
                        AddRes(index, typeof(Garlic), "Garlic", 3);
                        AddRes(index, typeof(BatWing), "Bat Wing", 3);
                    }

                    if ((m_Tome.Formulas & 0x4000000) != 0)
                    {
                        index = AddCraft(typeof(GenderSwapPotion), "Lost Lore", "Gender Swap Potion", 75.0, 100.0, typeof(Bottle), "Bottle", 1);
                        AddRes(index, typeof(DragonBlood), "Dragon's Blood", 1);
                        AddRes(index, typeof(WhiteScales), "White Scales", 2);
                        AddRes(index, typeof(BatWing), "Bat Wing", 2);
                    }

                    if ((m_Tome.Formulas & 0x8000000) != 0)
                    {
                        index = AddCraft(typeof(InvisibilityPotion), "Lost Lore", "Invisibility Potion", 80.0, 100.0, typeof(Bottle), "Bottle", 1);
                        AddRes(index, typeof(WyrmHeart), "Wyrm Heart", 4);
                    }

                    if ((m_Tome.Formulas & 0x10000000) != 0)
                    {
                        index = AddCraft(typeof(ManaRefreshPotion), "Lost Lore", "Mana Refresh Potion", 90.0, 100.0, typeof(Bottle), "Bottle", 1);
                        AddRes(index, typeof(EyeOfNewt), "Eye of Newt", 4);
                    }

                    if ((m_Tome.Formulas & 0x20000000) != 0)
                    {
                        index = AddCraft(typeof(TotalManaRefreshPotion), "Lost Lore", "Total Mana Refresh Potion", 95.0, 120.0, typeof(Bottle), "Bottle", 1);
                        AddRes(index, typeof(EyeOfNewt), "Eye of Newt", 6);
                    }

                    if ((m_Tome.Formulas & 0x40000000) != 0)
                    {
                        index = AddCraft(typeof(MagicResistPotion), "Lost Lore", "Magic Resist Potion", 95.0, 110.0, typeof(Bottle), "Bottle", 1);
                        AddRes(index, typeof(MandrakeRoot), "Mandrake Root", 4);
                        AddRes(index, typeof(SpidersSilk), "Spiders Silk", 4);
                        AddRes(index, typeof(RedScales), "Red Scales", 4);
                        //AddRes( index, typeof( Garlic ), "Garlic", 3 );
                    }

                    if ((m_Tome.Formulas & 0x80000000) != 0)
                    {
                        index = AddCraft(typeof(InvulnerabilityPotion), "Lost Lore", "Invulnerability Potion", 99.0, 120.0, typeof(Bottle), "Bottle", 1);
                        AddRes(index, typeof(Ginseng), "Ginseng", 5);
                        AddRes(index, typeof(TAVOre.AmiriteOre), "Amirite Ore", 3);
                        AddRes(index, typeof(BlackScales), "Black Scales", 5);
                        //AddRes( index, typeof( Garlic ), "Garlic", 3 );
                    }
                }
            }

            if (m_Player.IsAssassin() && m_Player.HasFeat(TeiravonMobile.Feats.ExoticPoisons))
            {
                if (m_Player.PlayerLevel >= 5)
                {
                    index = AddCraft(typeof(LesserPoisonPotion), 1044535, 1044548, 0, 0, typeof(Nightshade), 1044358, 1, 1044366);
                    AddRes(index, typeof(Bottle), 1044529, 1, 500315);
                }

                if (m_Player.PlayerLevel >= 9)
                {
                    index = AddCraft(typeof(PoisonPotion), 1044535, 1044549, 0.0, 0.0, typeof(Nightshade), 1044358, 2, 1044366);
                    AddRes(index, typeof(Bottle), 1044529, 1, 500315);
                }

                if (m_Player.PlayerLevel >= 13)
                {
                    index = AddCraft(typeof(GreaterPoisonPotion), 1044535, 1044550, 0.0, 0.0, typeof(Nightshade), 1044358, 4, 1044366);
                    AddRes(index, typeof(Bottle), 1044529, 1, 500315);
                }

                if (m_Player.PlayerLevel >= 17)
                {
                    index = AddCraft(typeof(DeadlyPoisonPotion), 1044535, 1044551, 0.0, 0.0, typeof(Nightshade), 1044358, 8, 1044366);
                    AddRes(index, typeof(Bottle), 1044529, 1, 500315);
                }

                if (m_Player.PlayerLevel >= 7)
                {
                    index = AddCraft(typeof(LesserCurePotion), 1044536, 1044552, 0.0, 0.0, typeof(Garlic), 1044355, 1, 1044363);
                    AddRes(index, typeof(Bottle), 1044529, 1, 500315);
                }

                if (m_Player.PlayerLevel >= 11)
                {
                    index = AddCraft(typeof(CurePotion), 1044536, 1044553, 0.0, 0.0, typeof(Garlic), 1044355, 3, 1044363);
                    AddRes(index, typeof(Bottle), 1044529, 1, 500315);
                }

                if (m_Player.PlayerLevel >= 15)
                {
                    index = AddCraft(typeof(GreaterCurePotion), 1044536, 1044554, 0.0, 0.0, typeof(Garlic), 1044355, 6, 1044363);
                    AddRes(index, typeof(Bottle), 1044529, 1, 500315);
                }
            }

            if (((m_Player.HasFeat(TeiravonMobile.Feats.RacialCrafting) || m_Player.HasFeat(TeiravonMobile.Feats.MasterCraftsman)) && m_Player.IsAlchemist()) || m_Player.HasFeat(TeiravonMobile.Feats.AlchemyScience))
            {
                if (m_Player.IsHuman())
                {
                    index = AddCraft(typeof(HumanEnhancePotion), "Racials", "Potion Enhancer", 95.0, 130.0, typeof(Bottle), "Bottle", 1);
                    AddRes(index, typeof(BlackPearl), "Black Pearl", 2);
                    AddRes(index, typeof(TAVOre.PyriteOre), "Pyrite Ore", 3);
                    AddRes(index, typeof(RedScales), "Red Scales", 1);
//					AddRes( index, typeof( Garlic ), "Garlic", 3 );
                    index = AddCraft(typeof(HumanPetHealPotion), "Racials", "Potion of Pet Heal", 90.0, 130.0, typeof(Bottle), "Bottle", 1);
                    AddRes(index, typeof(Ginseng), "Ginseng", 3);
                    AddRes(index, typeof(Mandrake), "Mandrake", 3);
                    AddRes(index, typeof(Garlic), "Garlic", 3);
                }
                else if (m_Player.IsOrc())
                {
                    index = AddCraft(typeof(OrcGrowthPotion), "Racials", "Potion of Growth", 95.0, 130.0, typeof(Bottle), "Bottle", 1);
                    AddRes(index, typeof(BlackPearl), "Black Pearl", 2);
                    AddRes(index, typeof(TAVOre.MalachiteOre), "Malachite Ore", 1);
                    AddRes(index, typeof(BlackScales), "Black Scales", 1);
//					AddRes( index, typeof( SulfurousAsh ), "Sulfurous Ash", 2 );
                }
                else if (m_Player.IsDrow())
                {
                    index = AddCraft(typeof(DrowWebPotion), "Racials", "Essence of Spider Web", 95.0, 130.0, typeof(Bottle), "Bottle", 1);
                    AddRes(index, typeof(SpidersSilk), "Spider Silk", 10);
                    AddRes(index, typeof(Bone), "Bone", 3);
                    index = AddCraft(typeof(DrowPoisonImmunityPotion), "Racials", "Potion of Poison Immunity", 95.0, 130.0, typeof(Bottle), "Bottle", 1);
                    AddRes(index, typeof(PoisonPotion), "Poison Potion", 1);
                    AddRes(index, typeof(Ginseng), "Ginseng", 6);
                }
                else if (m_Player.IsDwarf())
                {
                    index = AddCraft(typeof(DwarvenRagePotion), "Racials", "Potion of Dwarven Rage", 95.0, 130.0, typeof(Bottle), "Bottle", 1);
                    AddRes(index, typeof(StrengthPotion), "Strength Potion", 1);
                    AddRes(index, typeof(DwarvenAle), "Troll Liver Ale", 1);
                    index = AddCraft(typeof(DwarvenOrePotion), "Racials", "Ore Refinement Potion", 95.0, 130.0, typeof(Bottle), "Bottle", 1);
                    AddRes(index, typeof(LesserPoisonPotion), "Lesser Poison Potion", 1);
                    AddRes(index, typeof(SulfurousAsh), "Sulfurous Ash", 8);
                }
                else if (m_Player.IsElf())
                {
                    index = AddCraft(typeof(ElvenHealPotion), "Racials", "Elixer of Life", 95.0, 130.0, typeof(Bottle), "Bottle", 1);
                    AddRes(index, typeof(GreaterHealPotion), "Greater Heal Potion", 1);
                    AddRes(index, typeof(Lilypad), "Lilly Pads", 3);
                    AddRes(index, typeof(EyeOfNewt), "Eye of Newt", 1);
                    index = AddCraft(typeof(ElvenPlantPotion), "Racials", "Potion of Plant Growth", 95.0, 130.0, typeof(Bottle), "Bottle", 1);
                    AddRes(index, typeof(StrengthPotion), "Strength Potion", 1);
                    AddRes(index, typeof(KnotGrass), "Knot Grass", 3);
                }
                else if (m_Player.IsGoblin())
                {
                    index = AddCraft(typeof(GoblinSatchel), "Racials", "Explosive Satchel", 85.0, 120.0, typeof(Backpack), "Backpack", 1);
                    AddRes(index, typeof(SulfurousAsh), "Sulfurous Ash", 15);
                    AddRes(index, typeof(BlackPearl), "Black Pearl", 10);
                    AddRes(index, typeof(DragonBlood), "Dragon's Blood", 5);
                }
            }
        }
Exemple #7
0
        public void Target(Mobile m)
        {
            if (!Caster.CanSee(m))
            {
                Caster.SendLocalizedMessage(500237);                   // Target can not be seen.
            }
            else if (CheckBSequence(m))
            {
                if (Caster is TeiravonMobile && (((TeiravonMobile)Caster).IsCleric() || ((TeiravonMobile)Caster).IsDarkCleric() || ((TeiravonMobile)Caster).IsStrider() || ((TeiravonMobile)Caster).IsPaladin()) && ((TeiravonMobile)Caster).Faith != TeiravonMobile.Deity.None)
                {
                    TeiravonMobile Cleric = Caster as TeiravonMobile;

                    SpellHelper.Turn(Caster, m);

                    switch (Cleric.Faith)
                    {
                    case TeiravonMobile.Deity.Adalia:
                    {
                        if (!adalia.Contains(m))
                        {
                            adalia.Add(m, DateTime.Now);
                        }
                        if (m_Timer != null)
                        {
                            m_Timer.Stop();
                        }
                        m_Timer = new BlessHelper(m, adalia);
                        m_Timer.Start();

                        m.FixedParticles(0x375A, 10, 15, 5018, EffectLayer.Waist);
                        m.PlaySound(0x30C);
                        m.PlaySound(0x5CB);
                    }
                    break;

                    case TeiravonMobile.Deity.Cultist:
                    {
                        SpellHelper.AddStatBonus(Caster, m, StatType.Str); SpellHelper.DisableSkillCheck = true;
                        SpellHelper.AddStatBonus(Caster, m, StatType.Dex);
                        SpellHelper.AddStatBonus(Caster, m, StatType.Int); SpellHelper.DisableSkillCheck = false;

                        int      mod      = SpellHelper.GetOffset(Caster, m, StatType.Str, false);
                        TimeSpan duration = SpellHelper.GetDuration(Caster, m);

                        if (m is TeiravonMobile)
                        {
                            TeiravonMobile tav = m as TeiravonMobile;
                            tav.HitsMod = mod;
                            BlessTimer timer = new BlessTimer(Caster, (TeiravonMobile)m, duration, mod);
                            timer.Start();
                        }

                        m.FixedParticles(0x373A, 10, 15, 5018, EffectLayer.Waist);
                        m.PlaySound(0x1EA);

                        Caster.Damage(Utility.Random(6));
                    }
                    break;

                    case TeiravonMobile.Deity.Gruumsh:
                    {
                        if (!gruumsh.Contains(m))
                        {
                            gruumsh.Add(m, DateTime.Now);
                        }
                        if (m_Timer != null)
                        {
                            m_Timer.Stop();
                        }
                        m_Timer = new BlessHelper(m, gruumsh);
                        m_Timer.Start();

                        m.FixedParticles(0x375A, 10, 15, 5018, 157, 4, EffectLayer.Waist);
                        BleedAttack.BeginBleed(m, m);
                        m.PlaySound(0x50F);
                        m.PlaySound(0x02B);
                    }
                    break;

                    case TeiravonMobile.Deity.Kamalini:
                    {
                        if (!kamalini.Contains(m))
                        {
                            kamalini.Add(m, DateTime.Now);
                        }
                        if (m_Timer != null)
                        {
                            m_Timer.Stop();
                        }
                        m_Timer = new BlessHelper(m, kamalini);
                        m_Timer.Start();

                        m.FixedParticles(0x375A, 10, 15, 5018, 157, 4, EffectLayer.Waist);
                        m.PlaySound(0x4B7);
                    }
                    break;

                    case TeiravonMobile.Deity.Kinarugi:
                    {
                        if (!kinarugi.Contains(m))
                        {
                            kinarugi.Add(m, DateTime.Now);
                        }
                        if (m_Timer != null)
                        {
                            m_Timer.Stop();
                        }
                        m_Timer = new BlessHelper(m, kinarugi);
                        m_Timer.Start();

                        m.FixedParticles(0x36FE, 10, 15, 5018, 2020, 4, EffectLayer.Waist);
                        m.PlaySound(0x09F);
                        m.PlaySound(0x5C4);
                    }
                    break;

                    case TeiravonMobile.Deity.Lloth:
                    {
                        if (m is TeiravonMobile)
                        {
                            if (!lloth.Contains(m))
                            {
                                lloth.Add(m, DateTime.Now);
                            }
                            if (m_Timer != null)
                            {
                                m_Timer.Stop();
                            }
                            m_Timer = new BlessHelper(m, lloth);
                            m_Timer.Start();

                            Effects.SendLocationParticles(EffectItem.Create(m.Location, m.Map, EffectItem.DefaultDuration), 0x3728, 1, 13, 2869, 1, 5023, 0);
                            m.PlaySound(0x381);
                            m.PlaySound(0x4B0);
                        }
                        else
                        {
                            Caster.SendMessage("You are unable to bless this target.");
                        }
                    }
                    break;

                    case TeiravonMobile.Deity.Narindun:
                    {
                        if (!narindun.Contains(m))
                        {
                            narindun.Add(m, DateTime.Now);
                        }
                        if (m_Timer != null)
                        {
                            m_Timer.Stop();
                        }
                        m_Timer = new BlessHelper(m, narindun);
                        m_Timer.Start();

                        m.FixedParticles(0x3789, 1, 40, 0x3F, 906, 3, EffectLayer.Waist);
                        m.PlaySound(0x029);
                        m.PlaySound(0x5C6);
                    }
                    break;

                    case TeiravonMobile.Deity.Occido:
                    {
                        if (!occido.Contains(m))
                        {
                            occido.Add(m, DateTime.Now);
                        }
                        if (m_Timer != null)
                        {
                            m_Timer.Stop();
                        }
                        m_Timer = new BlessHelper(m, occido);
                        m_Timer.Start();

                        m.FixedParticles(0x3728, 1, 40, 0x3F, 0, 3, EffectLayer.Waist);
                        m.PlaySound(0x5C8);
                    }
                    break;

                    case TeiravonMobile.Deity.Saerin:
                    {
                        if (!saerin.Contains(m))
                        {
                            saerin.Add(m, DateTime.Now);
                        }
                        if (m_Timer != null)
                        {
                            m_Timer.Stop();
                        }
                        m_Timer = new BlessHelper(m, saerin);
                        m_Timer.Start();

                        m.FixedParticles(0x36FE, 10, 15, 5018, 2020, 4, EffectLayer.Waist);
                        m.PlaySound(0x100);
                        m.PlaySound(0x5BE);
                    }
                    break;

                    case TeiravonMobile.Deity.Talathas:
                    {
                        if (!talathas.Contains(m))
                        {
                            talathas.Add(m, DateTime.Now);
                        }
                        if (m_Timer != null)
                        {
                            m_Timer.Stop();
                        }
                        m_Timer = new BlessHelper(m, talathas);
                        m_Timer.Start();

                        m.FixedParticles(0x36FE, 10, 15, 5018, 2020, 4, EffectLayer.Waist);
                        m.PlaySound(0x100);
                        m.PlaySound(0x5C4);
                    }
                    break;

                    case TeiravonMobile.Deity.Valar:
                    {
                        if (!valar.Contains(m))
                        {
                            valar.Add(m, DateTime.Now);
                        }
                        if (m_Timer != null)
                        {
                            m_Timer.Stop();
                        }
                        m_Timer = new BlessHelper(m, valar);
                        m_Timer.Start();

                        m.FixedParticles(0x36FE, 10, 15, 5018, 2020, 4, EffectLayer.Waist);
                        m.PlaySound(0x100);
                        m.PlaySound(0x5C4);
                    }
                    break;

                    case TeiravonMobile.Deity.Jareth:
                    {
                        if (m is TeiravonMobile)
                        {
                            TeiravonMobile tav = m as TeiravonMobile;
                            if (!tav.IsGoblin())
                            {
                                Caster.SendMessage("The Goblin King would never bless that!");
                                return;
                            }
                            if (!jareth.Contains(m))
                            {
                                jareth.Add(m, DateTime.Now);
                            }
                            if (m_Timer != null)
                            {
                                m_Timer.Stop();
                            }
                            m_Timer = new BlessHelper(m, jareth);
                            m_Timer.Start();

                            m.FixedParticles(0x2D92, 10, 15, 5018, 2829, 4, EffectLayer.Waist);
                            m.PlaySound(0x547);
                        }
                        else
                        {
                            Caster.SendMessage("The Goblin King would never bless that!");
                        }
                    }
                    break;
                    }
                }
                else
                {
                    SpellHelper.AddStatBonus(Caster, m, StatType.Str); SpellHelper.DisableSkillCheck = true;
                    SpellHelper.AddStatBonus(Caster, m, StatType.Dex);
                    SpellHelper.AddStatBonus(Caster, m, StatType.Int); SpellHelper.DisableSkillCheck = false;

                    int      mod      = SpellHelper.GetOffset(Caster, m, StatType.Str, false);
                    TimeSpan duration = SpellHelper.GetDuration(Caster, m);

                    if (m is TeiravonMobile)
                    {
                        TeiravonMobile tav = m as TeiravonMobile;
                        tav.HitsMod = mod;
                        BlessTimer timer = new BlessTimer(Caster, (TeiravonMobile)m, duration, mod);
                        timer.Start();
                    }

                    m.FixedParticles(0x373A, 10, 15, 5018, EffectLayer.Waist);
                    m.PlaySound(0x1EA);
                }
            }

            FinishSequence();
        }