public void Target( RecallRune rune ) { if ( !Caster.CanSee( rune ) ) { Caster.SendLocalizedMessage( 500237 ); // Target can not be seen. } else if ( !SpellHelper.CheckTravel( Caster, TravelCheckType.Mark ) ) { } else if ( SpellHelper.CheckMulti( Caster.Location, Caster.Map, true ) ) { Caster.SendLocalizedMessage( 501942 ); // That location is blocked. } else if ( !rune.IsChildOf( Caster.Backpack ) ) { Caster.LocalOverheadMessage( MessageType.Regular, 0x3B2, 1062422 ); // You must have this rune in your backpack in order to mark it. } else if ( CheckSequence() ) { rune.Mark( Caster ); Caster.PlaySound( 0x1FA ); Effects.SendLocationEffect( Caster, Caster.Map, 14201, 16 ); } FinishSequence(); }
public void Target( RecallRune rune ) { if ( !Caster.CanSee( rune ) ) { Caster.SendLocalizedMessage( 500237 ); // Target can not be seen. } else if ( !SpellHelper.CheckTravel( Caster, TravelCheckType.Mark ) ) { //Caster.SendAsciiMessage("ros"); } else if ( SpellHelper.CheckMulti( Caster.Location, Caster.Map, !Core.AOS ) ) { Caster.SendLocalizedMessage( 501942 ); // That location is blocked. } else if ( !rune.IsChildOf( Caster.Backpack ) ) { Caster.LocalOverheadMessage( MessageType.Regular, 0x3B2, 1062422 ); // You must have this rune in your backpack in order to mark it. } else if ( CheckSequence() ) { if (Caster.Region is Regions.HouseRegion || (Caster.Region is Regions.CustomRegion && ((Regions.CustomRegion)Caster.Region).Controller.IsRestrictedSpell(this))) Caster.SendAsciiMessage("You can't mark here."); else if (Caster.Region is Regions.GreenAcres && Caster.AccessLevel == AccessLevel.Player) Caster.SendAsciiMessage("You cannot mark runes in Green Acres"); else { rune.Mark(Caster); Caster.PlaySound(Sound); } } FinishSequence(); }
public void Target( RecallRune rune ) { if ( !Caster.CanSee( rune ) ) { Caster.SendLocalizedMessage( 500237 ); // Target can not be seen. } else if ( !SpellHelper.CheckTravel( Caster, Caster.Location, Caster.Map, TravelType.Mark ) && Caster.AccessLevel == AccessLevel.Player ) { Caster.PlaySound( 0x5C ); } else if ( SpellHelper.CheckMulti( Caster.Location, Caster.Map, !Core.AOS ) ) { Caster.SendLocalizedMessage( 501942 ); // That location is blocked. } else if ( CheckSequence() ) { rune.Mark( Caster ); Caster.PlaySound( 0x1FA ); Effects.SendLocationEffect( Caster, Caster.Map, 14201, 16 ); } FinishSequence(); }
public void OnTarget(IPoint3D p) { if (this.Parent == null || !(this.Parent is Mobile)) { return; } Mobile m = (Mobile)this.Parent; if (m.Mana >= 10) { Map map = m.Map; if (p is RecallRune) { RecallRune rune = p as RecallRune; if (rune.Marked) { m.MoveToWorld(rune.Target, rune.TargetMap); m.SendMessage("You have been moved to the rune's location."); } else { rune.Mark(m); m.SendMessage("You use the ring's power to etch your location into the rune."); } } else if (map == null || !map.CanSpawnMobile(p.X, p.Y, p.Z)) { m.SendMessage("The ring rejects your command to travel."); } else if (m.Hidden) { int armorRating = Server.SkillHandlers.Stealth.GetArmorRating(m); if (m.CheckSkill(SkillName.Stealth, -20.0 + (armorRating * 2), (Core.AOS ? 60.0 : 80.0) + (armorRating * 2))) { _lastUsed = DateTime.Now; m.Mana -= 10; m.MoveToWorld(new Point3D(p), map); m.SendMessage("You manage to silently use the ring's power."); } else { _lastUsed = DateTime.Now; m.Mana -= 10; m.RevealingAction(); m.MoveToWorld(new Point3D(p), map); m.SendMessage("You fail in your attempt to travel silently."); Effects.PlaySound(p, map, 0x20E); Effects.SendLocationParticles(m, 0x1FCB, 10, 10, 2023); Effects.SendLocationParticles(EffectItem.Create(new Point3D(p), map, EffectItem.DefaultDuration), 0x1FCB, 10, 10, 5023); } } else { _lastUsed = DateTime.Now; m.Mana -= 10; m.MoveToWorld(new Point3D(p), map); Effects.PlaySound(p, map, 0x20E); Effects.SendLocationParticles(m, 0x1FCB, 10, 10, 2023); Effects.SendLocationParticles(EffectItem.Create(new Point3D(p), map, EffectItem.DefaultDuration), 0x1FCB, 10, 10, 5023); } } else { m.PublicOverheadMessage(Server.Network.MessageType.Regular, m.EmoteHue, true, "*the ring becomes warm, emitting a soft glow, but it is unable to function.*"); m.SendMessage("You do not have enough mana to channel the power of the ring."); m.RevealingAction(); m.PlaySound(0x5BF); } }
public void Target( RecallRune rune ) { if( !Caster.CanSee( rune ) ) { Caster.SendLocalizedMessage( 500237 ); // Target can not be seen. } else if( !SpellHelper.CheckTravel( Caster, TravelCheckType.Mark ) ) { } else if (SpellHelper.CheckMulti(Caster.Location, Caster.Map, !Core.AOS)) { Caster.SendMessage("That location is blocked."); } else if (!CheckAltar(Caster.Location, Caster.Map) && Caster.AccessLevel == AccessLevel.Player) { Caster.SendMessage("You must be on an altar to preform this spell."); } else if (!rune.IsChildOf(Caster.Backpack) && Caster.AccessLevel == AccessLevel.Player) { Caster.LocalOverheadMessage(MessageType.Regular, 0x3B2, 1062422); // You must have this rune in your backpack in order to mark it. } else if (CheckSequence()) { rune.Mark(Caster); Caster.PlaySound(0x1FA); Effects.SendLocationEffect(Caster, Caster.Map, 14201, 16); } FinishSequence(); }