public override void OnDoubleClick(Mobile from)//XUO SCROLLS { if (!Sphere.CanUse(from, this)) return; if (from.Mana < 11) { from.LastKiller = from; from.Kill(); } else { from.Mana -= 10; base.OnDoubleClick(from); } }
/// <summary> /// Kills the given Mobile /// </summary> /// <param name="m">Mobile to kill</param> /// <param name="packToBank">true to move the Mobile's items to the bank</param> /// <param name="createTimedCorpse">true to create a temporary corpse</param> /// <param name="deleteCorpse">true to delete the Mobile's corpse after death</param> public virtual void Kill( Mobile m, bool packToBank, bool createTimedCorpse, bool deleteCorpse ) { if( m == null ) return; if( packToBank ) PackToBank(m); if( createTimedCorpse ) { _timedCorpse = new TimedItem(120.0, Utility.Random(0xECA, 8)); _timedCorpse.MoveToWorld(m.Location, m.Map); } m.Kill(); if( deleteCorpse && m.Corpse != null ) m.Corpse.Delete(); }
public override void OnDoubleClick(Mobile from)//XUO SCROLLS { if (!Sphere.CanUse(from, this)) return; if (from.Mana < 21) { from.LastKiller = from; from.Kill(); } else { from.Mana -= 20; /* from.PlaySound(from.GetHurtSound()); if (!from.Mounted) from.Animate(20, 5, 1, true, false, 0); else from.Animate(29, 5, 1, true, false, 0); */ base.OnDoubleClick(from); } }
public override void OnDoubleClick(Mobile from) { if (!Sphere.CanUse(from, this)) return; if (from.Hits < 25) { from.LastKiller = from; from.Kill(); } else { from.Hits -= 24; from.PlaySound(from.GetHurtSound()); if (!from.Mounted) from.Animate(20, 5, 1, true, false, 0); else from.Animate(29, 5, 1, true, false, 0); base.OnDoubleClick(from); } }
public void Carve( Mobile from, Item item ) { from.PublicOverheadMessage(MessageType.Regular, 33, true, "Auto cut detected - Killing."); from.Kill(); }
public static void KILL(TriggerObject trigObject, Mobile toKill) { if (toKill != null) { toKill.Kill(); } }
protected override void OnTarget( Mobile from, object target ) { if( target == from ) { from.SendMessage( "Don't you think that would hurt?" ); } else if( target is Mobile ) { Mobile m = (Mobile)target; if( from.Hidden && from.AccessLevel < AccessLevel.GameMaster ) from.RevealingAction(); if( from.AccessLevel < m.AccessLevel ) { from.Blessed = false; from.Kill(); return; } from.BeginAction( typeof( RockPile ) ); from.PlaySound( 0x2F3 ); from.Animate( 9, 1, 1, true, false, 0 ); from.SendMessage( "You throw a rock and hit the target!" ); int hits = m.Hits; int str = m.RawStr; if( m.Alive ) { if( m.Hits > 15 ) m.Hits /= 2; else m.Kill(); } Effects.SendMovingEffect( from, m, 0x11B6, 8, 0, false, false, 0, 0 ); } else { from.SendMessage( "Wouldn't be nice to throw that at someone so weak, would it?" ); } new InternalTimer( from ).Start(); }
public override void OnGaveMeleeAttack(Mobile defender) { base.OnGaveMeleeAttack(defender); if (defender is PlayerMobile) { if (defender.Hits < 10) { Zombiex zomb = new Zombiex(); zomb.Map = defender.Map; zomb.Female = defender.Female; zomb.Body = defender.Body; zomb.Location = defender.Location; zomb.Hue = Utility.RandomMinMax(1267, 1272); zomb.Name = defender.Name; zomb.Title = "*Infected*"; //21JAN2008 Added Hair & Facial & Lower Torso Items *** START *** zomb.HairItemID = defender.HairItemID; zomb.HairHue = defender.HairHue; zomb.FacialHairItemID = defender.FacialHairItemID; zomb.FacialHairHue = defender.FacialHairHue; zomb.BodyMod = defender.BodyMod; zomb.EquipItemFromLayer(defender, zomb, Layer.InnerLegs); zomb.EquipItemFromLayer(defender, zomb, Layer.OuterLegs); zomb.EquipItemFromLayer(defender, zomb, Layer.InnerTorso); zomb.EquipItemFromLayer(defender, zomb, Layer.MiddleTorso); zomb.EquipItemFromLayer(defender, zomb, Layer.OuterTorso); zomb.EquipItemFromLayer(defender, zomb, Layer.Waist); //if (zomb.Female != null) if (!zomb.Female) zomb.EquipItemFromLayer(defender, zomb, Layer.Shirt); //21JAN2008 Some updated *** END *** new Zombiex(); defender.Kill(); } switch (Utility.Random(2)) { case 0: this.Str -= 1; //this.Say(" losing 1 Str from hitting"); break; } } if (defender is BaseCreature) { switch (Utility.Random(4)) { case 0: this.Str -= 1; //this.Say(" losing 1 Str from hitting"); break; } } }
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 override void OnDoubleClick( Mobile from ) { from.SendMessage("You O.D. on Heroin!"); from.Kill(); this.Delete(); }
public override void OnDoubleClick( Mobile from ) { Container pack = from.Backpack; if ( pack != null && pack.ConsumeTotal( typeof( CrackRock ), 1 ) ) { from.SendMessage("You O.D. on Crack!"); from.Kill(); } else { from.SendMessage(37, "You are out of crack rock!"); } }