public static TimeSpan OnUse(Mobile m) { if (!m.Hidden) { m.SendLocalizedMessage(502725); // You must hide first } else if (m.Skills[SkillName.Hiding].Base < HidingRequirement) { m.SendLocalizedMessage(502726); // You are not hidden well enough. Become better at hiding. m.RevealingAction(); } else if (!Hiding.CheckLighting(m)) { m.SendMessage("You cannot stay hidden near so much light."); m.RevealingAction(); } else { int armorRating = GetArmorRating(m); DesignContext context = DesignContext.Find(m); if (context != null) { } else if (armorRating >= (Core.AOS ? 42 : 26)) //I have a hunch '42' was chosen cause someone's a fan of DNA { m.SendLocalizedMessage(502727); // You could not hope to move quietly wearing this much armor. m.RevealingAction(); } else if (m.CheckSkill(SkillName.Stealth, -20.0 + (armorRating * 2), (Core.AOS ? 60.0 : 80.0) + (armorRating * 2))) { int steps = (int)(m.Skills[SkillName.Stealth].Value / (Core.SE ? 5.0 : 10.0)); if (steps < 1) { steps = 1; } m.AllowedStealthSteps = steps; //PlayerMobile pm = m as PlayerMobile; // IsStealthing should be moved to Server.Mobiles //pm.IsStealthing = true; m.SendLocalizedMessage(502730); // You begin to move quietly. return(TimeSpan.FromSeconds(10.0)); } else { m.SendLocalizedMessage(502731); // You fail in your attempt to move unnoticed. m.RevealingAction(); } } EventSink.InvokeSkillUsed(new SkillUsedEventArgs(m, m.Skills[SkillName.Stealth])); return(TimeSpan.FromSeconds(10.0)); }
static void EventSink_RidingMovement(MovementEventArgs e) { if (RIDING_ACTIVE) { if (e.Mobile is PlayerMobile && e.Mobile.Mounted && DesignContext.Find(e.Mobile) == null) { if (e.Mobile.Mount is Item) { RideEthereal(e.Mobile, (Item)e.Mobile.Mount); } if (e.Mobile.Mount is BaseCreature) { RideMount(e.Mobile, (BaseCreature)e.Mobile.Mount); } } } }