Exemple #1
0
        public static void SetStats(BaseCreature steed)
        {
            steed.SetStr(201, 210);
            steed.SetDex(101, 110);
            steed.SetInt(101, 115);

            steed.SetHits(201, 220);

            steed.SetDamage(20, 24);

            steed.SetDamageType(ResistanceType.Physical, 25);
            steed.SetDamageType(ResistanceType.Fire, 75);

            steed.SetResistance(ResistanceType.Physical, 60, 70);
            steed.SetResistance(ResistanceType.Fire, 90);
            steed.SetResistance(ResistanceType.Poison, 100);

            steed.SetSkill(SkillName.MagicResist, 90.1, 110.0);
            steed.SetSkill(SkillName.Tactics, 50.0);
            steed.SetSkill(SkillName.Wrestling, 90.1, 110.0);

            steed.Fame = 0;
            steed.Karma = 0;
        }
Exemple #2
0
        public static void SetStats(BaseCreature steed)
        {
            steed.SetStr(201, 210);
            steed.SetDex(101, 110);
            steed.SetInt(101, 115);

            steed.SetHits(201, 220);

            steed.SetDamage(20, 24);

            steed.SetDamageType(ResistanceType.Physical, 25);
            steed.SetDamageType(ResistanceType.Fire, 75);

            steed.SetResistance(ResistanceType.Physical, 60, 70);
            steed.SetResistance(ResistanceType.Fire, 90);
            steed.SetResistance(ResistanceType.Poison, 100);

            steed.SetSkill(SkillName.MagicResist, 90.1, 110.0);
            steed.SetSkill(SkillName.Tactics, 50.0);
            steed.SetSkill(SkillName.Wrestling, 90.1, 110.0);

            steed.Fame  = 0;
            steed.Karma = 0;
        }
Exemple #3
0
        public static void Summon(BaseCreature creature, Mobile caster, int sound, TimeSpan duration, bool scaleDuration, bool scaleStats)
        {
            Map map = caster.Map;

            if (map == null)
            {
                return;
            }

            double scale = 1.0 + ((caster.Skills[SkillName.Magery].Value - 100.0) / 200.0);

            if (scaleDuration)
            {
                duration = TimeSpan.FromSeconds(duration.TotalSeconds * scale);
            }

            if (creature != null && creature.ControlMaster != null && creature.ControlMaster is Player)
            {
                Summoner sum = Perk.GetByType <Summoner>((Player)creature.ControlMaster);

                if (sum != null && sum.Remanence())
                {
                    duration += TimeSpan.FromSeconds(90.0);
                }
            }

            Point3D p = new Point3D(caster);

            if (SpellHelper.FindValidSpawnLocation(map, ref p, true))
            {
                BaseCreature.Summon(creature, caster, p, sound, duration);

                if (creature != null && creature.ControlMaster != null && creature.ControlMaster is Player)
                {
                    Summoner sum = Perk.GetByType <Summoner>((Player)creature.ControlMaster);

                    if (sum != null && sum.IntelligentDesign())
                    {
                        creature.SetSkill(SkillName.Wrestling, creature.Skills.Wrestling.Value + Utility.RandomMinMax(15, 20));
                        creature.SetSkill(SkillName.Tactics, creature.Skills.Tactics.Value + Utility.RandomMinMax(20, 25));
                        creature.SetSkill(SkillName.MagicResist, creature.Skills.MagicResist.Value + Utility.RandomMinMax(30, 40));
                        creature.SetSkill(SkillName.Meditation, creature.Skills.Meditation.Value + Utility.RandomMinMax(30, 40));
                        creature.SetSkill(SkillName.Magery, creature.Skills.Magery.Value + Utility.RandomMinMax(15, 20));
                        creature.SetSkill(SkillName.EvalInt, creature.Skills.EvalInt.Value + Utility.RandomMinMax(15, 20));
                    }

                    if (sum != null && sum.SecondNature())
                    {
                        creature.HitsMaxSeed += (int)(creature.HitsMaxSeed * 0.33) + Utility.RandomMinMax(20, 40);
                        creature.Hits         = creature.HitsMax;
                    }

                    if (sum != null && sum.Horde())
                    {
                        for (int x = 1; x <= 3; x++)
                        {
                            if (creature.ControlMaster.Followers + creature.ControlSlots <= creature.ControlMaster.FollowersMax)
                            {
                                BaseCreature newSummon;
                                newSummon = Activator.CreateInstance(creature.GetType()) as BaseCreature;

                                if (SpellHelper.FindValidSpawnLocation(map, ref p, true))
                                {
                                    BaseCreature.Summon(newSummon, caster, p, sound, duration);
                                }

                                if (sum != null && sum.IntelligentDesign())
                                {
                                    newSummon.SetSkill(SkillName.Wrestling, creature.Skills.Wrestling.Value + Utility.RandomMinMax(15, 20));
                                    newSummon.SetSkill(SkillName.Tactics, creature.Skills.Tactics.Value + Utility.RandomMinMax(20, 25));
                                    newSummon.SetSkill(SkillName.MagicResist, creature.Skills.MagicResist.Value + Utility.RandomMinMax(30, 40));
                                    newSummon.SetSkill(SkillName.Meditation, creature.Skills.Meditation.Value + Utility.RandomMinMax(30, 40));
                                    newSummon.SetSkill(SkillName.Magery, creature.Skills.Magery.Value + Utility.RandomMinMax(15, 20));
                                    newSummon.SetSkill(SkillName.EvalInt, creature.Skills.EvalInt.Value + Utility.RandomMinMax(15, 20));
                                }

                                if (sum != null && sum.SecondNature())
                                {
                                    newSummon.HitsMaxSeed += (int)(newSummon.HitsMaxSeed * 0.33) + Utility.RandomMinMax(20, 40);
                                    newSummon.Hits         = newSummon.HitsMax;
                                }
                            }
                        }
                    }
                }

                return;
            }

            creature.Delete();
            caster.SendLocalizedMessage(501942); // That location is blocked.
        }
Exemple #4
0
        public void Summonicate(TeiravonMobile necromancer, Type necrosummon, string name, int stat, int level, int damage, int res)
        {
            necromancer.BeginAction(typeof(NecroSummonGump));
            BaseCreature summon = (BaseCreature)Activator.CreateInstance(necrosummon);

            summon.Name         = name;
            summon.Level        = 0;
            summon.NoKillAwards = true;
            m_Player.BeginAction(typeof(NecroSummonGump));
            double variation   = (level / 2);
            int    bonus       = (int)(1.0 + (double)(level / 3.0)) * (necromancer.PlayerLevel);
            int    necrobonus  = (int)(necromancer.Skills[SkillName.Necromancy].Value / 4);
            double damageboost = 1.0 + ((bonus) / 100) + (necrobonus / 200);

            if (damageboost < 1.0)
            {
                damageboost = 1.0;
            }


            summon.SetStr(Utility.RandomMinMax(stat - (int)(20 * variation), stat + (int)(20 * variation)) + bonus);
            summon.SetDex(Utility.RandomMinMax(stat - (int)(20 * variation), stat + (int)(20 * variation)) + bonus);
            summon.SetInt(Utility.RandomMinMax(stat - (int)(20 * variation), stat + (int)(20 * variation)) + bonus);
            summon.SetHits(Utility.RandomMinMax(stat - (int)(20 * variation), stat + (int)(20 * variation)) + (int)(bonus / 2) + necrobonus);
            summon.SetStam(Utility.RandomMinMax(stat - (int)(20 * variation), stat + (int)(20 * variation)) + (int)(bonus / 2) + necrobonus);
            summon.SetMana(0);

            summon.SetDamage((int)(damageboost * (Utility.RandomMinMax(damage - (int)(damage / 2), damage))), (int)(damageboost * (Utility.RandomMinMax(damage, damage + (int)(damage / 4)))));
            summon.SetDamageType(ResistanceType.Physical, 100 - ((level - 1) * 10));
            summon.SetDamageType(ResistanceType.Fire, (level - 1) * 2);
            summon.SetDamageType(ResistanceType.Poison, ((level - 1) * 2) + ((level - 1) * 2));
            summon.SetDamageType(ResistanceType.Cold, (level - 1) * 2);
            summon.SetDamageType(ResistanceType.Energy, (level - 1) * 2);

            summon.Karma = necromancer.Karma;

            summon.Skills.MagicResist = necromancer.Skills.MagicResist;
            summon.SetSkill(SkillName.Wrestling, 55 + (level * 5), 75 + (level * 5));
            summon.SetSkill(SkillName.Tactics, 65 + (level * 5), 75 + (level * 5));

            summon.SetResistance(ResistanceType.Physical, (int)(res * 0.75), res);
            summon.SetResistance(ResistanceType.Fire, (int)(res * 0.75), res);
            summon.SetResistance(ResistanceType.Cold, (int)(res * 0.75), res);
            summon.SetResistance(ResistanceType.Poison, (int)(res * 0.75), res);
            summon.SetResistance(ResistanceType.Energy, (int)(res * 0.75), res);

            if (summon.Backpack != null)
            {
                summon.Backpack.Delete();
            }

            summon.ControlSlots  = 4;
            summon.Controled     = true;
            summon.ControlMaster = m_Player;

            Item pentagram = new BloodPentagram();

            Point3D p = new Point3D(m_Player.X - 2, m_Player.Y - 3, m_Player.Z);

            pentagram.MoveToWorld(p, m_Player.Map);

            m_Player.SendMessage("You begin summoning a {0} from the netherworld!", name);
            m_Player.Emote("*You see {0} begin summoning*", m_Player.Name);
            m_Player.RevealingAction();

            m_Player.FixedParticles(0x3779, 10, 100, 9502, 67, 7, EffectLayer.Head);
            m_Player.Freeze(TimeSpan.FromSeconds(4.0 * level));
            m_Player.PlaySound(0x24A);

            if (!(m_Player.Mounted) && (m_Player.Body.IsHuman))
            {
                m_Player.Animate(266, 7, 1, true, false, 0);
            }

            Timer m_EffectTimer = new EffectTimer(m_Player, 1, level - 1, DateTime.Now + TimeSpan.FromSeconds(3.0));

            m_EffectTimer.Start();

            DateTime SummonTime = DateTime.Now + TimeSpan.FromSeconds(4.0 * level);
            Timer    m_Timer    = new NecromancerSummonTimer(m_Player, summon, pentagram, SummonTime, m_EffectTimer);

            m_Timer.Start();
        }
Exemple #5
0
        public Mobile SpawnGuardian(string name, int level, double PlayersHidingSkill)
        {
            Type         type = ScriptCompiler.FindTypeByName(name);
            BaseCreature c    = null;

            if (type != null)
            {
                try
                {
                    object o = Activator.CreateInstance(type);

                    if (o is BaseCreature)
                    {
                        c = o as BaseCreature;

                        // decay time of a chest once it's opened
                        c.Lifespan = TimeSpan.FromMinutes(15);

                        // reset the alignment
                        c.IOBAlignment = IOBAlignment.None;

                        // Can chase you and can reveal you if you be hiding!
                        c.CanRun    = true;
                        c.CanReveal = true;

                        // stats based on chest level
                        double factor = 1.0;
                        if (level == 3)
                        {
                            factor = .3;
                        }
                        if (level == 4)
                        {
                            factor = .5;
                        }
                        if (level == 5)
                        {
                            factor = 1.0;
                        }

                        c.SetMana((int)(c.ManaMax * factor));
                        c.SetStr((int)(c.RawStr * factor));
                        c.SetDex((int)(c.RawDex * factor));
                        c.SetInt((int)(c.RawInt * factor));
                        c.SetHits((int)(((c.HitsMax / 100.0) * 60.0) * factor));

                        // these guys can reveal - set the Detect Hidden to match the players hiding so that they have a fighting chance
                        c.SetSkill(SkillName.DetectHidden, PlayersHidingSkill * factor);

                        // nerf their magery so that they
                        // Sixth	20	52.1	100
                        c.SetSkill(SkillName.Magery, 52.1 * factor);

                        // only attack aggressors
                        c.FightMode = FightMode.Aggressor;

                        // maybe 6 tiles? Keep him near by
                        c.RangeHome = 6;

                        // the chest is the home of the guardian
                        c.Home = this.Location;

                        // we are not bardable
                        c.BardImmune = true;

                        // make them a guardian
                        c.AddItem(new Property(Use.IsGuardian, null));

                        // give them s***e speak if they are calmed
                        c.AddItem(new Quip("Arr, but that be a pretty tune .. can you play me another?"));
                        c.AddItem(new Quip("Thar be no time for singing and dancin' now matey."));
                        c.AddItem(new Quip("That be a downright lovely tune ye be playing thar."));
                        c.AddItem(new Quip("Har! Me thinks a cutlass would be a better choice!"));

                        // show them
                        Point3D loc = (GetSpawnPosition(c.RangeHome));
                        c.MoveToWorld(loc, this.Map);

                        // teleport
                        Effects.SendLocationParticles(EffectItem.Create(c.Location, c.Map, EffectItem.DefaultDuration), 0x3728, 10, 10, 5023);
                        Effects.PlaySound(c.Location, c.Map, 0x1FE);

                        Timer.DelayCall(TimeSpan.FromSeconds(1.5), new TimerStateCallback(ShiteTalk_Callback), c);
                    }
                }
                catch (Exception exc)
                {
                    LogHelper.LogException(exc);
                    System.Console.WriteLine("Exception caught in Spawner.Refresh: " + exc.Message);
                    System.Console.WriteLine(exc.StackTrace);
                }
            }

            return(c as Mobile);
        }
            protected override void OnTarget(Mobile from, object targeted)
            {
                if (targeted is Mobile)
                {
                    Mobile iArmor = targeted as Mobile;

                    if (iArmor is BaseCreature)
                    {
                        BaseCreature xArmor = (BaseCreature)iArmor;

                        if ((xArmor is Horse || xArmor is ZebraRiding) && xArmor.ControlMaster == from && xArmor is BaseMount)
                        {
                            BaseMount mArmor = (BaseMount)xArmor;

                            if (MyServerSettings.ClientVersion())
                            {
                                mArmor.Body   = 587;
                                mArmor.ItemID = 587;
                            }
                            else
                            {
                                mArmor.Body   = 0xE2;
                                mArmor.ItemID = 0x3EA0;
                            }

                            int mod = 5;

                            if (xArmor.Hue == MaterialInfo.GetMaterialColor("dull copper", "classic", 0))
                            {
                                mod = mod - 1;
                            }
                            else if (xArmor.Hue == MaterialInfo.GetMaterialColor("shadow iron", "classic", 0))
                            {
                                mod = mod - 2;
                            }
                            else if (xArmor.Hue == MaterialInfo.GetMaterialColor("copper", "classic", 0))
                            {
                                mod = mod - 3;
                            }
                            else if (xArmor.Hue == MaterialInfo.GetMaterialColor("bronze", "classic", 0))
                            {
                                mod = mod - 4;
                            }
                            else if (xArmor.Hue == MaterialInfo.GetMaterialColor("gold", "classic", 0))
                            {
                                mod = mod - 5;
                            }
                            else if (xArmor.Hue == MaterialInfo.GetMaterialColor("agapite", "classic", 0))
                            {
                                mod = mod - 6;
                            }
                            else if (xArmor.Hue == MaterialInfo.GetMaterialColor("verite", "classic", 0))
                            {
                                mod = mod - 7;
                            }
                            else if (xArmor.Hue == MaterialInfo.GetMaterialColor("valorite", "classic", 0))
                            {
                                mod = mod - 8;
                            }
                            else if (xArmor.Hue == MaterialInfo.GetMaterialColor("nepturite", "classic", 0))
                            {
                                mod = mod - 9;
                            }
                            else if (xArmor.Hue == MaterialInfo.GetMaterialColor("obsidian", "classic", 0))
                            {
                                mod = mod - 10;
                            }
                            else if (xArmor.Hue == MaterialInfo.GetMaterialColor("steel", "classic", 0))
                            {
                                mod = mod - 11;
                            }
                            else if (xArmor.Hue == MaterialInfo.GetMaterialColor("brass", "classic", 0))
                            {
                                mod = mod - 12;
                            }
                            else if (xArmor.Hue == MaterialInfo.GetMaterialColor("mithril", "classic", 0))
                            {
                                mod = mod - 13;
                            }
                            else if (xArmor.Hue == MaterialInfo.GetMaterialColor("xormite", "classic", 0))
                            {
                                mod = mod - 14;
                            }
                            else if (xArmor.Hue == MaterialInfo.GetMaterialColor("dwarven", "classic", 0))
                            {
                                mod = mod - 15;
                            }
                            else if (xArmor.Hue == MaterialInfo.GetMaterialColor("silver", "classic", 0))
                            {
                                mod = mod - 0;
                            }

                            if (m_ArmorMaterial == "Dull Copper")
                            {
                                mod = mod + 1;              xArmor.Hue = MaterialInfo.GetMaterialColor("dull copper", "classic", 0);
                            }
                            else if (m_ArmorMaterial == "Shadow Iron")
                            {
                                mod = mod + 2;              xArmor.Hue = MaterialInfo.GetMaterialColor("shadow iron", "classic", 0);
                            }
                            else if (m_ArmorMaterial == "Copper")
                            {
                                mod = mod + 3;              xArmor.Hue = MaterialInfo.GetMaterialColor("copper", "classic", 0);
                            }
                            else if (m_ArmorMaterial == "Bronze")
                            {
                                mod = mod + 4;              xArmor.Hue = MaterialInfo.GetMaterialColor("bronze", "classic", 0);
                            }
                            else if (m_ArmorMaterial == "Gold")
                            {
                                mod = mod + 5;              xArmor.Hue = MaterialInfo.GetMaterialColor("gold", "classic", 0);
                            }
                            else if (m_ArmorMaterial == "Agapite")
                            {
                                mod = mod + 6;              xArmor.Hue = MaterialInfo.GetMaterialColor("agapite", "classic", 0);
                            }
                            else if (m_ArmorMaterial == "Verite")
                            {
                                mod = mod + 7;              xArmor.Hue = MaterialInfo.GetMaterialColor("verite", "classic", 0);
                            }
                            else if (m_ArmorMaterial == "Valorite")
                            {
                                mod = mod + 8;              xArmor.Hue = MaterialInfo.GetMaterialColor("valorite", "classic", 0);
                            }
                            else if (m_ArmorMaterial == "Nepturite")
                            {
                                mod = mod + 9;              xArmor.Hue = MaterialInfo.GetMaterialColor("nepturite", "classic", 0);
                            }
                            else if (m_ArmorMaterial == "Obsidian")
                            {
                                mod = mod + 10;     xArmor.Hue = MaterialInfo.GetMaterialColor("obsidian", "classic", 0);
                            }
                            else if (m_ArmorMaterial == "Steel")
                            {
                                mod = mod + 11;     xArmor.Hue = MaterialInfo.GetMaterialColor("steel", "classic", 0);
                            }
                            else if (m_ArmorMaterial == "Brass")
                            {
                                mod = mod + 12;     xArmor.Hue = MaterialInfo.GetMaterialColor("brass", "classic", 0);
                            }
                            else if (m_ArmorMaterial == "Mithril")
                            {
                                mod = mod + 13;     xArmor.Hue = MaterialInfo.GetMaterialColor("mithril", "classic", 0);
                            }
                            else if (m_ArmorMaterial == "Xormite")
                            {
                                mod = mod + 14;     xArmor.Hue = MaterialInfo.GetMaterialColor("xormite", "classic", 0);
                            }
                            else if (m_ArmorMaterial == "Dwarven")
                            {
                                mod = mod + 15;     xArmor.Hue = MaterialInfo.GetMaterialColor("dwarven", "classic", 0);
                            }
                            else
                            {
                                mod = mod + 0;              xArmor.Hue = MaterialInfo.GetMaterialColor("silver", "classic", 0);
                            }

                            xArmor.SetStr(xArmor.RawStr + mod);
                            xArmor.SetDex(xArmor.RawDex + mod);
                            xArmor.SetInt(xArmor.RawInt + mod);

                            xArmor.SetHits(xArmor.HitsMax + mod);

                            xArmor.SetDamage(xArmor.DamageMin + mod, xArmor.DamageMax + mod);

                            xArmor.SetResistance(ResistanceType.Physical, xArmor.PhysicalResistance + mod);

                            xArmor.SetSkill(SkillName.MagicResist, xArmor.Skills[SkillName.MagicResist].Base + mod);
                            xArmor.SetSkill(SkillName.Tactics, xArmor.Skills[SkillName.Tactics].Base + mod);
                            xArmor.SetSkill(SkillName.Wrestling, xArmor.Skills[SkillName.Wrestling].Base + mod);

                            from.RevealingAction();
                            from.PlaySound(0x0AA);

                            m_Horse.Consume();
                        }
                        else
                        {
                            from.SendMessage("This armor is only for horses you own.");
                        }
                    }
                    else
                    {
                        from.SendMessage("This armor is only for horses you own.");
                    }
                }
            }