protected override void OnTick()
            {
                if (m_Item.Deleted)
                {
                    return;
                }

                Mobile spawn;

                switch (Utility.Random(10))
                {
                default:
                case 0: spawn = new AirElemental(); break;

                case 1: spawn = new EarthElemental(); break;

                case 2: spawn = new WaterElemental(); break;

                case 3: spawn = new FireElemental(); break;

                case 4: spawn = new IceElemental(); break;

                case 5: spawn = new SnowElemental(); break;

                case 6: spawn = new Efreet(); break;

                case 7: spawn = new BloodElemental(); break;

                case 8: spawn = new PoisonElemental(); break;
                }

                spawn.MoveToWorld(m_Item.Location, m_Item.Map);

                m_Item.Delete();
            }
Esempio n. 2
0
        public override void OnCast()
        {
            if (CheckSequence())
            {
                double time = DamagingSkill(Caster) * 6;
                if (time > 1500)
                {
                    time = 1500.0;
                }
                if (time < 480)
                {
                    time = 480.0;
                }

                TimeSpan duration = TimeSpan.FromSeconds(time);

                BaseCreature m_Creature = new BloodElemental();
                m_Creature.ControlSlots = 5;
                SpellHelper.Summon(m_Creature, Caster, 0x216, duration, false, false);
                m_Creature.FixedParticles(0x3728, 8, 20, 5042, Server.Items.CharacterDatabase.GetMySpellHue(Caster, 0), 0, EffectLayer.Head);
                Server.Misc.Research.ConsumeScroll(Caster, true, spellIndex, false);
            }

            FinishSequence();
        }