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; }
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(); }
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); }
public override void OnCast() { if (CheckSequence()) { try { //Choix du type de créature à ramener (Va définir des statistiques de base) BaseCreature bc = Activator.CreateInstance(ReanimationGump.m_Entries[m_Summon].Creature) as BaseCreature; if (bc != null) { Map map = Caster.Map; if (map != null) { bc.ControlSlots = ReanimationGump.m_Entries[m_Summon].ControlSlot; if ((Caster.Followers + bc.ControlSlots) > Caster.FollowersMax) { Caster.SendLocalizedMessage(1049645); // You have too many followers to summon that creature. } /*else if (m_Corpse != null && m_Corpse.InBones) * { * Caster.SendMessage("Vous ne pouvez animer la mort à partir de ce corps."); * }*/ else if (m_Corpse != null && m_Corpse.Owner != null) { int x = m_Location.X, y = m_Location.Y, z = m_Location.Z; if (map.CanSpawnMobile(x, y, z)) { int mindam = 0; int maxdam = 0; //Si on réanime le cadavre d'un joueur ou d'un npc, met les dégâts au minimum if (m_Corpse.Owner is PlayerMobile) { mindam = 10; maxdam = 15; } //Si on réanime une créature, met les dégâts à ceux de la créature else if (m_Corpse.Owner is BaseCreature) { mindam = ((int)(((BaseCreature)m_Corpse.Owner).DamageMin / 3)); maxdam = ((int)(((BaseCreature)m_Corpse.Owner).DamageMax / 3)); } //On assigne les statistiques du mort au monstre réanimé bc.SetStr((int)(m_Corpse.Owner.Str / 3)); bc.SetDex((int)(m_Corpse.Owner.Dex / 3)); bc.SetInt((int)(m_Corpse.Owner.Int / 3)); bc.SetHits((int)(m_Corpse.Owner.HitsMax * 0.60)); bc.SetStam((int)(m_Corpse.Owner.StamMax * 0.60)); bc.SetMana((int)(m_Corpse.Owner.ManaMax * 0.60)); bc.SetDamage((int)(Utility.RandomMinMax(mindam, maxdam))); BaseCreature.Summon(bc, true, Caster, m_Location, 0x217, TimeSpan.FromDays(90)); if (m_Corpse != null) { m_Corpse.TurnToBones(); } } } else { Caster.SendMessage("Le corps que vous ciblez ne peut être réanimé !"); } } } } catch { DoFizzle(); } } FinishSequence(); }
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."); } } }
public override void OnCast() { double skill = (Caster.Skills[SkillName.ArtMagique].Base + Caster.Skills[SkillName.Animisme].Base) / 2; if (CheckSequence()) { if (skill > Utility.RandomMinMax((int)AnimateDeadGump.m_Entries[m_Summon].MinSkill, (int)AnimateDeadGump.m_Entries[m_Summon].MaxSkill)) { try { BaseCreature bc = Activator.CreateInstance(AnimateDeadGump.m_Entries[m_Summon].Creature) as BaseCreature; if (bc != null) { Map map = Caster.Map; if (map != null) { bc.ControlSlots = AnimateDeadGump.m_Entries[m_Summon].ControlSlot; if ((Caster.Followers + bc.ControlSlots) > Caster.FollowersMax) { Caster.SendLocalizedMessage(1049645); // You have too many followers to summon that creature. } /*else if (m_Corpse != null && m_Corpse.InBones) * { * Caster.SendMessage("Vous ne pouvez animer la mort à partir de ce corps."); * }*/ else { int x = m_Location.X, y = m_Location.Y, z = m_Location.Z; if (map.CanSpawnMobile(x, y, z)) { bc.SetStr((int)(bc.Str / 2)); bc.SetDex((int)(bc.Dex / 2)); bc.SetInt((int)(bc.Int / 2)); bc.SetHits((int)(bc.Hits / 2)); bc.SetStam((int)(bc.Stam / 2)); bc.SetMana((int)(bc.Mana / 2)); bc.SetDamage((int)(Utility.RandomMinMax(bc.DamageMin, bc.DamageMax) / 2)); BaseCreature.Summon(bc, true, Caster, m_Location, 0x217, TimeSpan.FromDays(90)); if (m_Corpse != null) { m_Corpse.TurnToBones(); } } } } } } catch { DoFizzle(); } } else { DoFizzle(); } } FinishSequence(); }