public override void OnGotMeleeAttack(Mobile attacker) { base.OnGotMeleeAttack(attacker); if ( attacker is BaseCreature ) { BaseCreature c = (BaseCreature)attacker; if (c.Controlled && c.ControlMaster != null) { c.ControlMaster.SendMessage("The Recluse is immune to your pets attack."); this.Combatant = c.ControlMaster; c.Kill(); this.Emote("Your pet has been killed!", c.Name); } else if (attacker.BodyValue != 400 || attacker.BodyValue != 401 || attacker.BodyValue != 605 || attacker.BodyValue != 606) { attacker.Kill(); this.Emote("Your Summons has been killed!"); } else if (attacker is EvolutionDragon) { attacker.Kill(); this.Emote("Your Evo pet has been killed!"); } else if (attacker is VoltSpider) { attacker.Kill(); this.Emote("Your Hatched pet has been killed!"); } } }
public static void TakeMoney( Mobile m, DialogNPC npc ) { if ( !Server.Mobiles.Banker.Withdraw( m, 500 ) ) { npc.SayTo( m, "Trying to cheat me of 500 gold huh? DIE!" ); m.Kill(); } }
public override void OnHit(Mobile attacker, Mobile defender, int damage) { if (!Validate(attacker) || !CheckMana(attacker, true )) return; //{ // SolidHueOverride == 340; // defender; //} ClearCurrentAbility(attacker); attacker.Kill(); IMount mount = defender.Mount; if (defender.Mounted) mount.Rider = null; if (defender.BodyMod == 155 ) { defender.SendMessage("The Recluse senses you have been bitten already!"); attacker.Kill(); } else { defender.SendGump(new RecluseInfectedGump()); defender.PlaySound(0x474); defender.FixedParticles(0x37B9, 244, 25, 9944, 31, 0, EffectLayer.Waist); defender.BodyMod = 155; defender.Hue = 340; defender.AddToBackpack(new RecluseStingMarker()); // Do not reset timer if one is already in place. if (!IsWounded(defender)) BeginWound(defender, defender.Player ? PlayerDuration : NPCDuration); } }
public override void OnDoubleClick( Mobile from ) { if ( !from.InRange( this.GetWorldLocation(), 2 ) ) return; int firstOne = Utility.Random( 1, 6 ); int secondOne = Utility.Random( 1, 6 ); if ((firstOne + secondOne) <= 5) { this.PublicOverheadMessage( MessageType.Regular, 0, false, string.Format( "{0} is dead!", from.Name, firstOne, secondOne) ); from.BoltEffect( 0 ); from.Kill(); } else { this.PublicOverheadMessage( MessageType.Regular, 0, false, string.Format( "{0} survives!", from.Name, firstOne, secondOne) ); } }
public override bool OnMoveOver(Mobile m) { if (!m_AllowCreatures && !m.Player) return true; Item c = m.FindItemOnLayer(Layer.Bracelet) as BraceletOfTalon; if (c != null) { m.SendMessage("You feel as if you're being protected from some evil force"); return true; } else { m.Kill(); return true; } }
public override bool OnMoveOver(Mobile m) { if (!m_AllowCreatures && !m.Player) return true; Item a = m.Backpack.FindItemByType(typeof(SphereOfProtection)); if (!m_AllowCreatures && !m.Player) return true; if (a != null) { m.SendMessage("You feel as if you're being protected from some evil force"); return true; } else { m.Kill(); return true; } }
public override void OnExit(Mobile m) { PlayerMobile pm = m as PlayerMobile; if (m_Controller.ShowExitMessage) m.SendMessage("You have left {0}", this.Name); if (pm != null) { if (m_Controller.KillExit && pm.GameParticipant) { m.SendMessage(32, "You cannot leave the area while a game is taking place!"); m.Kill(); } if (m_Controller.NoStatLoss) { if (pm.InStat) { BaseShieldGuard.ApplySkillLoss(pm); } } if (m_Controller.IsT2AZone) { m.IsT2A = false; if (m is PlayerMobile) { PvPTemplates.PvPTemplates.FetchProfile(m as PlayerMobile).ClearDelta(); } } } base.OnExit(m); }
public override void OnGotMeleeAttack(Mobile attacker) { int bonusdmg = (Math.Max((int)attacker.Skills[SkillName.Chivalry].Value,(int)attacker.Skills[SkillName.Blacksmith].Value)/20); AOS.Damage(this, attacker, bonusdmg, true, 0, 0, 0, 0, 0, 0, 100, false, false, false); if(attacker is BaseCreature) { Say("Meurt, toi qui n'est pas digne de me reconnaitre"); attacker.Kill(); } if (attacker.FindItemOnLayer(Layer.OneHanded) is BaseWeapon) { BaseWeapon wpn = (BaseWeapon)attacker.FindItemOnLayer(Layer.OneHanded); if (wpn.Resource < CraftResource.MGlowing && Utility.RandomDouble()<.10) { Emote("Votre arme perce sa lumière, vous offrant un second souffle"); attacker.Heal(Utility.Random(1,15)); } } base.OnGotMeleeAttack(attacker); }
public void Target(Mobile ma) { BaseCreature m = ma as BaseCreature; if (ma is CharmedMobile) { ma.Kill(); Caster.SendMessage("You free them from their charm!"); } else if (m != null) { if (!Caster.CanSee(m)) { Caster.SendLocalizedMessage(500237); // Target can not be seen. } else if (m.Controlled || m.Summoned) { Caster.SendMessage("That target is already under somone's control!"); } else if (!m.Alive) { Caster.SendMessage("The dead are beyond your charms."); } else if (!m.Tamable || m.Blessed) { Caster.SendMessage("You have no chance of charming that!"); } else if (Caster.Followers >= 1) { Caster.SendMessage("You couldn't control that if you did charm it!"); } else if (CheckHSequence(m)) { SpellHelper.Turn(Caster, m); if (!m.Controlled && m != null && !m.Deleted) { double taming; if (m.MinTameSkill <= 1.0) taming = 1.0; else taming = m.MinTameSkill; double charmchance = (Caster.Skills[SkillName.Magery].Value / taming); if (charmchance <= 0.5) { Caster.SendMessage("You have no chance of charming them."); } else if (charmchance >= 0.9) { Caster.SendMessage("You charm them!"); Point3D mloc = new Point3D(m.X, m.Y, m.Z); CharmedMobile dg = new CharmedMobile(m); dg.Owner = m; dg.Body = m.Body; dg.AI = m.AI; dg.Hue = m.Hue; dg.Name = m.Name; dg.SpeechHue = m.SpeechHue; dg.Fame = m.Fame; dg.Karma = m.Karma; dg.EmoteHue = m.EmoteHue; dg.Title = m.Title; dg.Criminal = (m.Criminal); dg.Str = m.Str; dg.Int = m.Int; dg.Hits = m.Hits; dg.Dex = m.Dex; dg.Mana = m.Mana; dg.Stam = m.Stam; dg.VirtualArmor = (m.VirtualArmor); dg.SetSkill(SkillName.Wrestling, m.Skills[SkillName.Wrestling].Value); dg.SetSkill(SkillName.Tactics, m.Skills[SkillName.Tactics].Value); dg.SetSkill(SkillName.Anatomy, m.Skills[SkillName.Anatomy].Value); dg.SetSkill(SkillName.Magery, m.Skills[SkillName.Magery].Value); dg.SetSkill(SkillName.MagicResist, m.Skills[SkillName.MagicResist].Value); dg.SetSkill(SkillName.Meditation, m.Skills[SkillName.Meditation].Value); dg.SetSkill(SkillName.EvalInt, m.Skills[SkillName.EvalInt].Value); dg.SetSkill(SkillName.Archery, m.Skills[SkillName.Archery].Value); dg.SetSkill(SkillName.Macing, m.Skills[SkillName.Macing].Value); dg.SetSkill(SkillName.Swords, m.Skills[SkillName.Swords].Value); dg.SetSkill(SkillName.Fencing, m.Skills[SkillName.Fencing].Value); dg.SetSkill(SkillName.Lumberjacking, m.Skills[SkillName.Lumberjacking].Value); dg.SetSkill(SkillName.Alchemy, m.Skills[SkillName.Alchemy].Value); dg.SetSkill(SkillName.Parry, m.Skills[SkillName.Parry].Value); dg.SetSkill(SkillName.Focus, m.Skills[SkillName.Focus].Value); dg.SetSkill(SkillName.Necromancy, m.Skills[SkillName.Necromancy].Value); dg.SetSkill(SkillName.Chivalry, m.Skills[SkillName.Chivalry].Value); dg.SetSkill(SkillName.ArmsLore, m.Skills[SkillName.ArmsLore].Value); dg.SetSkill(SkillName.Poisoning, m.Skills[SkillName.Poisoning].Value); dg.SetSkill(SkillName.SpiritSpeak, m.Skills[SkillName.SpiritSpeak].Value); dg.SetSkill(SkillName.Stealing, m.Skills[SkillName.Stealing].Value); dg.SetSkill(SkillName.Inscribe, m.Skills[SkillName.Inscribe].Value); dg.Kills = (m.Kills); // Clear Items RemoveFromAllLayers(dg); // Then copy CopyFromLayer(m, dg, Layer.FirstValid); CopyFromLayer(m, dg, Layer.TwoHanded); CopyFromLayer(m, dg, Layer.Shoes); CopyFromLayer(m, dg, Layer.Pants); CopyFromLayer(m, dg, Layer.Shirt); CopyFromLayer(m, dg, Layer.Helm); CopyFromLayer(m, dg, Layer.Gloves); CopyFromLayer(m, dg, Layer.Ring); CopyFromLayer(m, dg, Layer.Talisman); CopyFromLayer(m, dg, Layer.Neck); CopyFromLayer(m, dg, Layer.Hair); CopyFromLayer(m, dg, Layer.Waist); CopyFromLayer(m, dg, Layer.InnerTorso); CopyFromLayer(m, dg, Layer.Bracelet); CopyFromLayer(m, dg, Layer.Unused_xF); CopyFromLayer(m, dg, Layer.FacialHair); CopyFromLayer(m, dg, Layer.MiddleTorso); CopyFromLayer(m, dg, Layer.Earrings); CopyFromLayer(m, dg, Layer.Arms); CopyFromLayer(m, dg, Layer.Cloak); CopyFromLayer(m, dg, Layer.OuterTorso); CopyFromLayer(m, dg, Layer.OuterLegs); CopyFromLayer(m, dg, Layer.LastUserValid); CopyFromLayer(m, dg, Layer.Mount); dg.ControlSlots = 5; dg.Controlled = true; dg.ControlMaster = Caster; TimeSpan duration = TimeSpan.FromSeconds(Caster.Skills[SkillName.Magery].Value * 1.2); // 120% of magery m_Timer = new InternalTimer(dg, duration); m_Timer.Start(); dg.Map = m.Map; dg.Location = m.Location; m.Blessed = true; m.Hidden = true; m.Location = new Point3D(m.X, m.Y, m.Z - 95); } else if (charmchance >= Utility.RandomDouble()) { Caster.SendMessage("You charm them!"); CharmedMobile dg = new CharmedMobile(m); dg.Owner = m; dg.Body = m.Body; dg.Hue = m.Hue; dg.Name = m.Name; dg.SpeechHue = m.SpeechHue; dg.Fame = m.Fame; dg.Karma = m.Karma; dg.EmoteHue = m.EmoteHue; dg.Title = m.Title; dg.Criminal = (m.Criminal); dg.Str = m.Str; dg.Int = m.Int; dg.Hits = m.Hits; dg.Dex = m.Dex; dg.Mana = m.Mana; dg.Stam = m.Stam; dg.AI = m.AI; dg.VirtualArmor = (m.VirtualArmor); dg.SetSkill(SkillName.Wrestling, m.Skills[SkillName.Wrestling].Value); dg.SetSkill(SkillName.Tactics, m.Skills[SkillName.Tactics].Value); dg.SetSkill(SkillName.Anatomy, m.Skills[SkillName.Anatomy].Value); dg.SetSkill(SkillName.Magery, m.Skills[SkillName.Magery].Value); dg.SetSkill(SkillName.MagicResist, m.Skills[SkillName.MagicResist].Value); dg.SetSkill(SkillName.Meditation, m.Skills[SkillName.Meditation].Value); dg.SetSkill(SkillName.EvalInt, m.Skills[SkillName.EvalInt].Value); dg.SetSkill(SkillName.Archery, m.Skills[SkillName.Archery].Value); dg.SetSkill(SkillName.Macing, m.Skills[SkillName.Macing].Value); dg.SetSkill(SkillName.Swords, m.Skills[SkillName.Swords].Value); dg.SetSkill(SkillName.Fencing, m.Skills[SkillName.Fencing].Value); dg.SetSkill(SkillName.Lumberjacking, m.Skills[SkillName.Lumberjacking].Value); dg.SetSkill(SkillName.Alchemy, m.Skills[SkillName.Alchemy].Value); dg.SetSkill(SkillName.Parry, m.Skills[SkillName.Parry].Value); dg.SetSkill(SkillName.Focus, m.Skills[SkillName.Focus].Value); dg.SetSkill(SkillName.Necromancy, m.Skills[SkillName.Necromancy].Value); dg.SetSkill(SkillName.Chivalry, m.Skills[SkillName.Chivalry].Value); dg.SetSkill(SkillName.ArmsLore, m.Skills[SkillName.ArmsLore].Value); dg.SetSkill(SkillName.Poisoning, m.Skills[SkillName.Poisoning].Value); dg.SetSkill(SkillName.SpiritSpeak, m.Skills[SkillName.SpiritSpeak].Value); dg.SetSkill(SkillName.Stealing, m.Skills[SkillName.Stealing].Value); dg.SetSkill(SkillName.Inscribe, m.Skills[SkillName.Inscribe].Value); dg.Kills = (m.Kills); // Clear Items RemoveFromAllLayers(dg); // Then copy CopyFromLayer(m, dg, Layer.FirstValid); CopyFromLayer(m, dg, Layer.TwoHanded); CopyFromLayer(m, dg, Layer.Shoes); CopyFromLayer(m, dg, Layer.Pants); CopyFromLayer(m, dg, Layer.Shirt); CopyFromLayer(m, dg, Layer.Helm); CopyFromLayer(m, dg, Layer.Gloves); CopyFromLayer(m, dg, Layer.Ring); CopyFromLayer(m, dg, Layer.Talisman); CopyFromLayer(m, dg, Layer.Neck); CopyFromLayer(m, dg, Layer.Hair); CopyFromLayer(m, dg, Layer.Waist); CopyFromLayer(m, dg, Layer.InnerTorso); CopyFromLayer(m, dg, Layer.Bracelet); CopyFromLayer(m, dg, Layer.Unused_xF); CopyFromLayer(m, dg, Layer.FacialHair); CopyFromLayer(m, dg, Layer.MiddleTorso); CopyFromLayer(m, dg, Layer.Earrings); CopyFromLayer(m, dg, Layer.Arms); CopyFromLayer(m, dg, Layer.Cloak); CopyFromLayer(m, dg, Layer.OuterTorso); CopyFromLayer(m, dg, Layer.OuterLegs); CopyFromLayer(m, dg, Layer.LastUserValid); CopyFromLayer(m, dg, Layer.Mount); dg.ControlSlots = 5; dg.Controlled = true; dg.ControlMaster = Caster; TimeSpan duration = TimeSpan.FromSeconds(Caster.Skills[SkillName.Magery].Value * 1.2); // 120% of magery m_Timer = new InternalTimer(dg, duration); dg.Map = m.Map; dg.Location = m.Location; m.Blessed = true; m.Hidden = true; m.Location = new Point3D(m.X, m.Y, m.Z - 95); } else { Caster.SendMessage("You fail to charm them."); } } } else { Caster.SendMessage("You have no chance of charming them."); } } FinishSequence(); }
public static void Decapitate(Mobile from, Mobile target, Func<Mobile, Item> createHead = null) { if (from == null || target == null) { return; } Map map = target.Map; target.Freeze(TimeSpan.FromSeconds(1.0)); int range = Utility.RandomMinMax(5, 7); int zOffset = target.Mounted ? 20 : 10; Point3D src = target.Location.Clone3D(0, 0, zOffset); var points = src.GetAllPointsInRange(map, range, range); Effects.PlaySound(target.Location, map, 0x19C); target.Send(VNScreenLightFlash.Instance); Timer.DelayCall( TimeSpan.FromMilliseconds(100), () => { foreach (Point3D trg in points) { int bloodID = Utility.RandomMinMax(4650, 4655); new MovingEffectInfo(src, trg.Clone3D(0, 0, 2), from.Map, bloodID).MovingImpact( info => { new Blood(bloodID).MoveToWorld(info.Target.Location, info.Map); Effects.PlaySound(info.Target, info.Map, 0x028); }); } }); target.Kill(); Timer.DelayCall( TimeSpan.FromMilliseconds(100), () => { var corpse = target.Corpse as Corpse; if (corpse != null && !corpse.Deleted) { corpse.TurnToBones(); } }); var head = createHead != null ? createHead(target) : null; int headID; int headHue; if (head != null) { headID = head.ItemID; headHue = head.Hue; } else { headID = 7393; headHue = target.SolidHueOverride >= 0 ? target.SolidHueOverride : target.Hue; } new MovingEffectInfo(src, src.Clone3D(0, 0, 40), map, headID, headHue).MovingImpact( info => new MovingEffectInfo( info.Target, info.Source.Clone3D(Utility.RandomMinMax(-1, 1), Utility.RandomMinMax(-1, 1), 2), info.Map, headID, headHue).MovingImpact( hInfo => { if (head != null && !head.Deleted) { head.MoveToWorld(hInfo.Target.Location, info.Map); } })); }
public override void OnGotMeleeAttack( Mobile attacker ) { attacker.Kill(); }
public override void Damage( Mobile m ) { base.Damage( m ); if ( m.Alive ) { if ( m.Location.X > 6484 && m.Location.Y > 500 ) m.Kill(); else { m.FixedParticles( 0x36B0, 1, 14, 0x26BB, 0x3F, 0x7, EffectLayer.Waist ); m.PlaySound( 0x229 ); int damage = 0; damage += (int) Math.Pow( m.Location.X - 6200, 0.5 ); damage += (int) Math.Pow( m.Location.Y - 330, 0.5 ); if ( damage > 20 ) m.SendLocalizedMessage( 1074567 ); // The acid river is much stronger here. You realize that allowing the acid to touch your flesh will surely kill you. else if ( damage > 10 ) m.SendLocalizedMessage( 1074566 ); // The acid river has gotten deeper. The concentration of acid is significantly stronger. else m.SendLocalizedMessage( 1074565 ); // The acid river burns your skin. AOS.Damage( m, damage, 0, 0, 0, 100, 0 ); } } }
public void LeaveGame( Mobile m ) { CTFTeam t = GetTeam( m ); if ( t != null ) t.RemoveMember( m ); if ( m.AccessLevel == AccessLevel.Player && !m.Blessed ) { if ( m.Alive ) { m.Kill(); if ( m.Corpse != null && !m.Corpse.Deleted ) m.Corpse.Delete(); } m.Resurrect(); } Item robe = m.FindItemOnLayer( Layer.OuterTorso ); if ( robe is CTFRobe ) robe.Delete(); if ( m.Backpack != null ) { Item[] robes = m.Backpack.FindItemsByType( typeof( CTFRobe ) ); for(int i=0;i<robes.Length;i++) robes[i].Delete(); } m.Delta( MobileDelta.Noto ); }
public void AddWebCase( Mobile m ) { new WebCase().MoveToWorld( m.Location, m.Map ); PublicOverheadMessage( MessageType.Emote, 0x47E, true, "*Your pets are nothing but food for me!*" ); m.PlaySound( 922 ); m.Kill(); }
public static void FinalEffect(Mobile caster, Mobile target, int effect) { IPooledEnumerable eable = caster.Map.GetMobilesInRange(caster.Location, caster.ManaMax / 10); foreach (Mobile m in eable) { if ( ((PlayerMobile)caster).AllyList.Contains( m ) ) { int heal = m.HitsMax * effect; m.PlaySound(0x1F2); m.FixedEffect(0x376A, 9, 32); m.Hits += heal; m.LocalOverheadMessage(MessageType.Regular, 170, false, "+" + heal); } } eable.Free(); caster.SendMessage("You have sacrificed yourself!"); caster.DoSpeech("*collapses with a thud!*", new int[] { -1 }, MessageType.Emote, caster.EmoteHue); caster.Kill(); }
public override void AlterMeleeDamageTo( Mobile to, ref int damage ) { if ( m_Grappling == false && Utility.Random( 10 ) == 1 ) { to.CantWalk = true; m_GrappledFoe = to; m_Grappling = true; m_GrappleCount++; to.SendMessage( "The mindflayer's tentacles latch onto you!" ); } else if ( m_Grappling == true ) { if ( to == m_GrappledFoe ) { m_GrappleCount++; switch ( Utility.Random( 4 ) ) { case 0: to.SendMessage( "Another one of the mindflayer's tentacles latch onto you!" ); break; case 1: to.SendMessage( "The mindflayer wraps a tentacle around your neck" ); break; case 2: to.SendMessage( "You feel the mindflayer's foul breath as it inches it's way closer to your head." ); break; case 3: to.SendMessage( "One of the mindflayer's tentacle lashes out and grabs you" ); break; } } else { if ( m_GrappledFoe != null ) m_GrappledFoe.CantWalk = false; m_GrappledFoe = null; m_Grappling = false; m_GrappleCount = 0; } } if ( m_GrappleCount >= 5 && to == m_GrappledFoe ) { to.SendMessage( "The mindflayer has extracted your brain!" ); to.CantWalk = false; to.Kill(); Hits += 1000; Mana += 1000; m_GrappledFoe = null; m_Grappling = false; m_GrappleCount = 0; } }
public override void OnDamagedBySpell(Mobile caster) { base.OnDamagedBySpell(caster); caster.Kill(); }
private static void DoLaunchLimbs( Mobile killed, PlayerMobile from, Point3D OurLoc, Point3D StartLoc, Map map ) { if( killed.Player && (killed.BodyValue == 0x190 || killed.BodyValue == 0x191) ) { if (killed.Mounted == true) { IMount mount = killed.Mount; if ( mount != null ) mount.Rider = null; } Backpack bag = new Backpack(); Container pack = killed.Backpack; BankBox box = killed.BankBox; ArrayList equipitems = new ArrayList(killed.Items); ArrayList bagitems = new ArrayList( pack.Items ); foreach (Item item in equipitems) { if ((item.Layer != Layer.Bank) && (item.Layer != Layer.Backpack) && (item.Layer != Layer.Hair) && (item.Layer != Layer.FacialHair)) { pack.DropItem( item ); } } Container pouch = killed.Backpack; ArrayList finalitems = new ArrayList( pouch.Items ); foreach (Item items in finalitems) { bag.DropItem(items); } box.DropItem(bag); killed.Kill(); int effecthue = killed.Hue; if ( effecthue >= 30000 ) effecthue = 0; //BEGIN HEAD// Point3D endHeadLoc = new Point3D( StartLoc.X + Utility.RandomMinMax( -6, 6 ), StartLoc.Y + Utility.RandomMinMax( -6, 6 ), StartLoc.Z ); Effects.SendMovingEffect( new Entity( Serial.Zero, StartLoc, map ), new Entity( Serial.Zero, endHeadLoc, map ), 0x1CE1, 5, effecthue, false, false ); Timer.DelayCall( TimeSpan.FromSeconds( 0.5 ), new TimerStateCallback( FinishHeadLaunch ), new object[]{ from, endHeadLoc, map, killed } ); //END HEAD// //BEGIN TORSO// Point3D endTorsoLoc = new Point3D( StartLoc.X + Utility.RandomMinMax( -6, 6 ), StartLoc.Y + Utility.RandomMinMax( -6, 6 ), StartLoc.Z ); Effects.SendMovingEffect( new Entity( Serial.Zero, StartLoc, map ), new Entity( Serial.Zero, endTorsoLoc, map ), 0x1DAD, 5, effecthue, false, false ); Timer.DelayCall( TimeSpan.FromSeconds( 0.5 ), new TimerStateCallback( FinishTorsoLaunch ), new object[]{ from, endTorsoLoc, map, killed } ); //END TORSO// //LEFT LEG// Point3D endLLLoc = new Point3D( StartLoc.X + Utility.RandomMinMax( -6, 6 ), StartLoc.Y + Utility.RandomMinMax( -6, 6 ), StartLoc.Z ); Effects.SendMovingEffect( new Entity( Serial.Zero, StartLoc, map ), new Entity( Serial.Zero, endLLLoc, map ), 0x1DB2, 5, effecthue, false, false ); Timer.DelayCall( TimeSpan.FromSeconds( 0.5 ), new TimerStateCallback( FinishLLLaunch ), new object[]{ from, endLLLoc, map, killed } ); //END LEFT LEG// //RIGHT LEG// Point3D endRLLoc = new Point3D( StartLoc.X + Utility.RandomMinMax( -6, 6 ), StartLoc.Y + Utility.RandomMinMax( -6, 6 ), StartLoc.Z ); Effects.SendMovingEffect( new Entity( Serial.Zero, StartLoc, map ), new Entity( Serial.Zero, endRLLoc, map ), 0x1DA4, 5, effecthue, false, false ); Timer.DelayCall( TimeSpan.FromSeconds( 0.5 ), new TimerStateCallback( FinishRLLaunch ), new object[]{ from, endRLLoc, map, killed } ); //END RIGHT LEG// //LEFT ARM// Point3D endLALoc = new Point3D( StartLoc.X + Utility.RandomMinMax( -6, 6 ), StartLoc.Y + Utility.RandomMinMax( -6, 6 ), StartLoc.Z ); Effects.SendMovingEffect( new Entity( Serial.Zero, StartLoc, map ), new Entity( Serial.Zero, endLALoc, map ), 0x1DA1, 5, effecthue, false, false ); Timer.DelayCall( TimeSpan.FromSeconds( 0.5 ), new TimerStateCallback( FinishLALaunch ), new object[]{ from, endLALoc, map, killed } ); //END LEFT ARM// //RIGHT ARM// Point3D endRALoc = new Point3D( StartLoc.X + Utility.RandomMinMax( -6, 6 ), StartLoc.Y + Utility.RandomMinMax( -6, 6 ), StartLoc.Z ); Effects.SendMovingEffect( new Entity( Serial.Zero, StartLoc, map ), new Entity( Serial.Zero, endRALoc, map ), 0x1DAF, 5, effecthue, false, false ); Timer.DelayCall( TimeSpan.FromSeconds( 0.5 ), new TimerStateCallback( FinishRALaunch ), new object[]{ from, endRALoc, map, killed } ); //END RIGHT ARM// //BLOOD// Point3D endBlood1Loc = new Point3D( StartLoc.X + Utility.RandomMinMax( -6, 6 ), StartLoc.Y + Utility.RandomMinMax( -6, 6 ), StartLoc.Z ); Effects.SendMovingEffect( new Entity( Serial.Zero, StartLoc, map ), new Entity( Serial.Zero, endBlood1Loc, map ), 0x122B, 5, 0, false, false ); Timer.DelayCall( TimeSpan.FromSeconds( 0.5 ), new TimerStateCallback( FinishBlood1Launch ), new object[]{ from, endBlood1Loc, map, killed } ); Point3D endBlood2Loc = new Point3D( StartLoc.X + Utility.RandomMinMax( -6, 6 ), StartLoc.Y + Utility.RandomMinMax( -6, 6 ), StartLoc.Z ); Effects.SendMovingEffect( new Entity( Serial.Zero, StartLoc, map ), new Entity( Serial.Zero, endBlood2Loc, map ), 0x122B, 5, 0, false, false ); Timer.DelayCall( TimeSpan.FromSeconds( 0.5 ), new TimerStateCallback( FinishBlood2Launch ), new object[]{ from, endBlood2Loc, map, killed } ); Point3D endBlood3Loc = new Point3D( StartLoc.X + Utility.RandomMinMax( -6, 6 ), StartLoc.Y + Utility.RandomMinMax( -6, 6 ), StartLoc.Z ); Effects.SendMovingEffect( new Entity( Serial.Zero, StartLoc, map ), new Entity( Serial.Zero, endBlood3Loc, map ), 0x122B, 5, 0, false, false ); Timer.DelayCall( TimeSpan.FromSeconds( 0.5 ), new TimerStateCallback( FinishBlood3Launch ), new object[]{ from, endBlood3Loc, map, killed } ); //END BLOOD// } else { killed.Kill(); } if ( killed.Corpse != null ) killed.Corpse.Delete(); }
public void AddWebCase( Mobile m ) { new WebCase().MoveToWorld( m.Location, m.Map ); PublicOverheadMessage( MessageType.Emote, 0x47E, true, "*Fangs Sink Deep, And Webbing Surrounds The Beast*" ); m.PlaySound( 922 ); m.Kill(); }
public static void DDCharmMonster( Mobile from, Mobile target ) { if ( target == null ) return; else if ( BlueSpell.SavingThrow( target, DDSave.Will, 20 ) ) { target.SendMessage( "You makes a successful save against a spell" ); return; } target.SendMessage( "You failed your save verses Charm!" ); LichLord clone = new LichLord(); Ability.MimicThem( clone, target, true, true ); clone.Hidden = true; clone.MoveToWorld( target.Location, target.Map ); if ( target is PlayerMobile ) { target.Kill(); if ( !AutoLifeSpell.HasAutoLife( (PlayerMobile)target ) && from.Map == Map.Ilshenar ) { target.MoveToWorld( new Point3D( 1704, 591, 9 ), Map.Ilshenar ); target.SendMessage( 33, "You have been charmed, a clone of you has taken your place and you have been moved to outside the cave." ); if ( target.Corpse != null && target.Backpack != null ) { List<Item> items = new List<Item>( target.Corpse.Items ); for( int i = 0; i < items.Count; ++i ) { Item item = items[i]; if ( item.Layer != Layer.Hair && item.Layer != Layer.FacialHair && item.Movable ) target.Backpack.DropItem( item ); } } } } else if ( target is BaseCreature && ((BaseCreature)target).Controlled ) { target.Kill(); if ( target == null ) return; target.Freeze( TimeSpan.FromSeconds( 180 ) ); ((BaseCreature)target).ControlOrder = OrderType.Stop; target.Hidden = true; } }
public static void DDFingerOfDeath( Mobile from, Mobile target ) { if ( target == null ) return; else if ( BlueSpell.SavingThrow( target, DDSave.Fort, 30 ) ) { target.SendMessage( "You makes a successful save against a spell" ); return; } target.SendMessage( "You failed your save verses Finger Of Death!" ); target.Kill(); }
public static void EndWound(Mobile m) { Timer t = (Timer)m_Table[m]; if (t != null) t.Stop(); m_Table.Remove(m); PlayerMobile mobile = (PlayerMobile)m; { Item am = m.Backpack.FindItemByType(typeof(RecluseStingMarker)); // if (m == null) // { // return; // } if (m is PlayerMobile && am != null) { m.BodyMod = 0; m.Hue = 0; m.Kill(); double decreaseAmount; decreaseAmount = 10.0; for (int i = 0; i < m.Skills.Length; ++i) //Decrease all skills on you. m.Skills[i].Base -= decreaseAmount; m.YellowHealthbar = false; m.SendGump(new RecluseDeathGump()); am.Delete(); } } }