Пример #1
0
        public override void OnResponse(NetState state, RelayInfo info)
        {
            if (info.ButtonID == 1 && info.Switches.Length > 0)
            {
                int cnum = info.Switches[0];
                int cat  = cnum % 256;
                int ent  = cnum >> 8;

                if (cat >= 0 && cat < Categories.Length)
                {
                    if (ent >= 0 && ent < Categories[cat].Entries.Length)
                    {
                        if (m_Caster.Skills[SkillName.Magery].Base < Categories[cat].Entries[ent].SkillRequired)
                        {
                            m_Caster.SendAsciiMessage("You are not skilled enough to summon this");
                        }
                        else
                        {
                            Spell spell = new SummonCreatureSpell(m_Caster, m_Scroll, Categories[cat].Entries[ent]);
                            spell.Cast();
                        }
                    }
                }
            }
        }
Пример #2
0
        public Spell CheckMagerySummon()
        {
            int slots = this.m_Mobile.FollowersMax - this.m_Mobile.Followers;

            if (slots < 2)
            {
                return(null);
            }

            Spell spell = null;

            if (this.m_Mobile.Skills[SkillName.Magery].Value > 95.0 && this.m_Mobile.Mana > 50)
            {
                int whichone = Utility.Random(10);

                if (slots > 4 && whichone == 0)
                {
                    spell = new SummonDaemonSpell(this.m_Mobile, null);
                }
                else if (slots > 3 && whichone < 2)
                {
                    spell = new FireElementalSpell(this.m_Mobile, null);
                }
                else if (slots > 2 && whichone < 3)
                {
                    spell = new WaterElementalSpell(this.m_Mobile, null);
                }
                else if (whichone < 4)
                {
                    spell = new AirElementalSpell(this.m_Mobile, null);
                }
                else if (whichone < 5)
                {
                    spell = new EarthElementalSpell(this.m_Mobile, null);
                }
                else
                {
                    spell = new EnergyVortexSpell(this.m_Mobile, null);
                }
            }
            else if (this.m_Mobile.Skills[SkillName.Magery].Value > 55.0 && this.m_Mobile.Mana > 14) // 5th level
            {
                if (this.m_Mobile.InitialInnocent)                                                   // peace loving hippy using nature friendly animals
                {
                    spell = new SummonCreatureSpell(this.m_Mobile, null);
                }
                else
                {
                    spell = new BladeSpiritsSpell(this.m_Mobile, null);
                }
            }

            return(spell);
        }