public override void OnTrigger(Mobile from) { if (!from.Alive || !from.Player || from.AccessLevel > AccessLevel.Player) { return; } if (Server.Misc.SeeIfGemInBag.GemInPocket(from) == true || Server.Misc.SeeIfJewelInBag.JewelInPocket(from) == true) { return; } if (HiddenTrap.CheckTrapAvoidance(from, this) == 0) { return; } if (!from.Player) { return; } Effects.PlaySound(Location, Map, 0x359); Breathing = true; Timer.DelayCall(TimeSpan.FromSeconds(2.0), new TimerCallback(FinishBreath)); Timer.DelayCall(TimeSpan.FromSeconds(1.0), new TimerCallback(TriggerDamage)); LoggingFunctions.LogTraps(from, "a trapped stone face"); }
public override void OnTrigger(Mobile from) { if (!from.Player || !from.Alive || from.AccessLevel > AccessLevel.Player) { return; } if (Server.Misc.SeeIfGemInBag.GemInPocket(from) == true || Server.Misc.SeeIfJewelInBag.JewelInPocket(from) == true) { return; } if (HiddenTrap.CheckTrapAvoidance(from, this) == 0) { return; } if (!from.Player) { return; } Effects.SendLocationEffect(Location, Map, 0x1D99, 48, 2, GetEffectHue(), 0); if (from.Alive && CheckRange(from.Location, 0) && from.Player) { int itHurts = (int)((Utility.RandomMinMax(50, 200) * (100 - from.PhysicalResistance)) / 100); Spells.SpellHelper.Damage(TimeSpan.FromTicks(1), from, from, itHurts); } LoggingFunctions.LogTraps(from, "a giant spike trap"); }
public override void OnTrigger(Mobile from) { if (!from.Alive || !from.Player || from.AccessLevel > AccessLevel.Player) { return; } if (Server.Misc.SeeIfGemInBag.GemInPocket(from) == true) { return; } if (HiddenTrap.CheckTrapAvoidance(from, this) == 0) { return; } if (!from.Player) { return; } Effects.SendLocationEffect(Location, Map, GetBaseID(this.Type) + 1, 6, 3, GetEffectHue(), 0); Effects.PlaySound(Location, Map, 0x21C); int itHurts = (int)((Utility.RandomMinMax(50, 200) * (100 - from.PhysicalResistance)) / 100); Spells.SpellHelper.Damage(TimeSpan.FromTicks(1), from, from, itHurts); // WIZARD from.LocalOverheadMessage(MessageType.Regular, 0x22, 500853); // You stepped onto a blade trap! LoggingFunctions.LogTraps(from, "a sawing blade trap"); }
public override bool OnMoveOver(Mobile m) { if (!m.Alive || !m.Player || m.AccessLevel > AccessLevel.Player) { return(true); } if (m is PlayerMobile && Spells.Research.ResearchAirWalk.UnderEffect(m)) { Point3D air = new Point3D((m.X + 1), (m.Y + 1), (m.Z + 5)); Effects.SendLocationParticles(EffectItem.Create(air, m.Map, EffectItem.DefaultDuration), 0x2007, 9, 32, Server.Items.CharacterDatabase.GetMySpellHue(m, 0), 0, 5022, 0); m.PlaySound(0x014); return(true); } if (m.Player && m.Alive && (HiddenTrap.CheckTrapAvoidance(m, this) > 0)) { CheckTimer(); int itHurts = (int)((Utility.RandomMinMax(50, 200) * (100 - m.FireResistance)) / 100); m.Damage(itHurts, m); Spells.SpellHelper.Damage(TimeSpan.FromTicks(1), m, m, itHurts); m.PlaySound(m.Female ? 0x327 : 0x437); LoggingFunctions.LogTraps(m, "a spouting flame trap"); } return(false); }
public override void OnTrigger(Mobile from) { if (!from.Alive || !from.Player || from.AccessLevel > AccessLevel.Player) { return; } if (Server.Misc.SeeIfGemInBag.GemInPocket(from) == true || Server.Misc.SeeIfJewelInBag.JewelInPocket(from) == true) { return; } if (HiddenTrap.CheckTrapAvoidance(from, this) == 0) { return; } if (!from.Player) { return; } if (from is PlayerMobile && Spells.Research.ResearchAirWalk.UnderEffect(from)) { Point3D air = new Point3D((from.X + 1), (from.Y + 1), (from.Z + 5)); Effects.SendLocationParticles(EffectItem.Create(air, from.Map, EffectItem.DefaultDuration), 0x2007, 9, 32, Server.Items.CharacterDatabase.GetMySpellHue(from, 0), 0, 5022, 0); from.PlaySound(0x014); return; } Effects.SendLocationEffect(Location, Map, GetBaseID(this.Type) + 1, 18, 3, GetEffectHue(), 0); Effects.PlaySound(Location, Map, 0x22C); int itHurts = 0; foreach (Mobile mob in GetMobilesInRange(0)) { if (mob.Alive && !mob.IsDeadBondedPet && mob.Player) { itHurts = (int)((Utility.RandomMinMax(50, 200) * (100 - mob.PhysicalResistance)) / 100); Spells.SpellHelper.Damage(TimeSpan.FromTicks(1), mob, mob, itHurts); } } Timer.DelayCall(TimeSpan.FromSeconds(1.0), new TimerCallback(OnSpikeExtended)); from.LocalOverheadMessage(MessageType.Regular, 0x22, 500852); // You stepped onto a spike trap! LoggingFunctions.LogTraps(from, "a spike trap"); }
public override void OnTrigger(Mobile from) { if (!from.Alive || !from.Player || from.AccessLevel > AccessLevel.Player) { return; } if (Server.Misc.SeeIfGemInBag.GemInPocket(from) == true || Server.Misc.SeeIfJewelInBag.JewelInPocket(from) == true) { return; } if (HiddenTrap.CheckTrapAvoidance(from, this) == 0) { return; } if (!from.Player) { return; } if (from is PlayerMobile && Spells.Research.ResearchAirWalk.UnderEffect(from)) { Point3D air = new Point3D((from.X + 1), (from.Y + 1), (from.Z + 5)); Effects.SendLocationParticles(EffectItem.Create(air, from.Map, EffectItem.DefaultDuration), 0x2007, 9, 32, Server.Items.CharacterDatabase.GetMySpellHue(from, 0), 0, 5022, 0); from.PlaySound(0x014); return; } if (WarningFlame) { DoEffect(); } if (from.Alive && from.Player && CheckRange(from.Location, 0)) { int itHurts = (int)((Utility.RandomMinMax(50, 200) * (100 - from.FireResistance)) / 100); Spells.SpellHelper.Damage(TimeSpan.FromSeconds(0.5), from, from, itHurts, 0, 100, 0, 0, 0); if (!WarningFlame) { DoEffect(); } LoggingFunctions.LogTraps(from, "a fire column trap"); } }
public override void OnTrigger(Mobile from) { if (!from.Alive || !from.Player || from.AccessLevel > AccessLevel.Player) { return; } if (Server.Misc.SeeIfGemInBag.GemInPocket(from) == true) { return; } if (HiddenTrap.CheckTrapAvoidance(from, this) == 0) { return; } if (!from.Player) { return; } Effects.SendLocationEffect(Location, Map, GetBaseID(this.Type) + 1, 18, 3, GetEffectHue(), 0); Effects.PlaySound(Location, Map, 0x22C); int itHurts = 0; foreach (Mobile mob in GetMobilesInRange(0)) { if (mob.Alive && !mob.IsDeadBondedPet && mob.Player) { itHurts = (int)((Utility.RandomMinMax(50, 200) * (100 - mob.PhysicalResistance)) / 100); Spells.SpellHelper.Damage(TimeSpan.FromTicks(1), mob, mob, itHurts); } } Timer.DelayCall(TimeSpan.FromSeconds(1.0), new TimerCallback(OnSpikeExtended)); from.LocalOverheadMessage(MessageType.Regular, 0x22, 500852); // You stepped onto a spike trap! LoggingFunctions.LogTraps(from, "a spike trap"); }
public override bool OnMoveOver(Mobile m) { if (!m.Alive || !m.Player || m.AccessLevel > AccessLevel.Player) { return(true); } if (m.Player && m.Alive && (HiddenTrap.CheckTrapAvoidance(m, this) > 0)) { CheckTimer(); int itHurts = (int)((Utility.RandomMinMax(50, 200) * (100 - m.FireResistance)) / 100); m.Damage(itHurts, m); Spells.SpellHelper.Damage(TimeSpan.FromTicks(1), m, m, itHurts); m.PlaySound(m.Female ? 0x327 : 0x437); LoggingFunctions.LogTraps(m, "a spouting flame trap"); } return(false); }
public override void OnTrigger(Mobile from) { if (!from.Alive || !from.Player || from.AccessLevel > AccessLevel.Player) { return; } if (Server.Misc.SeeIfGemInBag.GemInPocket(from) == true) { return; } if (HiddenTrap.CheckTrapAvoidance(from, this) == 0) { return; } if (!from.Player) { return; } if (WarningFlame) { DoEffect(); } if (from.Alive && from.Player && CheckRange(from.Location, 0)) { int itHurts = (int)((Utility.RandomMinMax(50, 200) * (100 - from.FireResistance)) / 100); Spells.SpellHelper.Damage(TimeSpan.FromSeconds(0.5), from, from, itHurts, 0, 100, 0, 0, 0); if (!WarningFlame) { DoEffect(); } LoggingFunctions.LogTraps(from, "a fire column trap"); } }
public override void OnTrigger(Mobile from) { if (!from.Alive || !from.Player || ItemID != 0x1A81 || from.AccessLevel > AccessLevel.Player) { return; } if (Server.Misc.SeeIfGemInBag.GemInPocket(from) == true || Server.Misc.SeeIfJewelInBag.JewelInPocket(from) == true) { return; } if (HiddenTrap.CheckTrapAvoidance(from, this) == 0) { return; } if (!from.Player) { return; } ItemID = 0x1126; Effects.PlaySound(Location, Map, 0x306); int itHurts = 0; switch (ShroomType) { case 1: itHurts = (int)((Utility.RandomMinMax(40, 200) * (100 - from.PhysicalResistance)) / 100); Spells.SpellHelper.Damage(TimeSpan.FromSeconds(0.5), from, from, itHurts); from.FixedParticles(0x36BD, 20, 10, 5044, EffectLayer.Head); from.PlaySound(0x307); from.LocalOverheadMessage(MessageType.Emote, 0xB1F, true, "A mushroom exploded near you!"); break; case 2: int itSicks = 5; if (from.PoisonResistance >= 70) { itSicks = 1; } else if (from.PoisonResistance >= 50) { itSicks = 2; } else if (from.PoisonResistance >= 30) { itSicks = 3; } else if (from.PoisonResistance >= 10) { itSicks = 4; } switch (Utility.RandomMinMax(1, itSicks)) { case 1: from.ApplyPoison(from, Poison.Lesser); break; case 2: from.ApplyPoison(from, Poison.Regular); break; case 3: from.ApplyPoison(from, Poison.Greater); break; case 4: from.ApplyPoison(from, Poison.Deadly); break; case 5: from.ApplyPoison(from, Poison.Lethal); break; } Effects.SendLocationEffect(this.Location, this.Map, 0x11A8 - 2, 16, 3, 0, 0); Effects.PlaySound(this.Location, this.Map, 0x231); from.LocalOverheadMessage(MessageType.Emote, 0xB1F, true, "A mushroom released odd spores!"); break; case 3: from.BoltEffect(0); itHurts = (int)((Utility.RandomMinMax(40, 200) * (100 - from.EnergyResistance)) / 100); from.Damage(itHurts, from); from.LocalOverheadMessage(MessageType.Emote, 0xB1F, true, "A mushroom released strange energy!"); break; } Timer.DelayCall(TimeSpan.FromSeconds(2.0), new TimerCallback(OnMushroomReset)); LoggingFunctions.LogTraps(from, "a strange mushroom"); }
public override void OnTrigger(Mobile from) { if (m_Poison == null || !from.Player || !from.Alive || from.AccessLevel > AccessLevel.Player) { return; } if (Server.Misc.SeeIfGemInBag.GemInPocket(from) == true || Server.Misc.SeeIfJewelInBag.JewelInPocket(from) == true) { return; } if (HiddenTrap.CheckTrapAvoidance(from, this) == 0) { return; } if (!from.Player) { return; } Effects.SendLocationEffect(Location, Map, GetBaseID(this.Type) - 2, 16, 3, GetEffectHue(), 0); Effects.PlaySound(Location, Map, 0x231); int itHurts = from.PoisonResistance; int itSicks = 0; if (itHurts >= 70) { itSicks = 1; } else if (itHurts >= 50) { itSicks = 2; } else if (itHurts >= 30) { itSicks = 3; } else if (itHurts >= 10) { itSicks = 4; } else { itSicks = 5; } switch (Utility.RandomMinMax(1, itSicks)) { case 1: m_Poison = Poison.Lesser; break; case 2: m_Poison = Poison.Regular; break; case 3: m_Poison = Poison.Greater; break; case 4: m_Poison = Poison.Deadly; break; case 5: m_Poison = Poison.Lethal; break; } from.ApplyPoison(from, m_Poison); from.LocalOverheadMessage(MessageType.Regular, 0x22, 500855); // You are enveloped by a noxious gas cloud! LoggingFunctions.LogTraps(from, "a poison gas trap"); }