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.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(); }
protected override void OnTarget(Mobile from, object o) { if (o is RecallRune) { RecallRune rune = (RecallRune)o; if (rune.Marked) { _spell.Effect(rune.Target, rune.TargetMap, true); } else { rune.Mark(from); from.SendMessage("You use the dagger to inscribe your location on the rune."); } } else if (o is Runebook) { RunebookEntry e = ((Runebook)o).Default; if (e != null) { _spell.Effect(e.Location, e.Map, true); } else { from.SendLocalizedMessage(502354); // Target is not marked. } } else { from.Send(new MessageLocalized(from.Serial, from.Body, MessageType.Regular, 0x3B2, 3, 501030, from.Name, "")); // I can not gate travel from that object. } }
public void Target(RecallRune rune) { BaseBoat boat = BaseBoat.FindBoatAt(Caster.Location, Caster.Map); if (!Caster.CanSee(rune)) { Caster.SendLocalizedMessage(500237); // Target can not be seen. } else if (!SpellHelper.CheckTravel(Caster, TravelCheckType.Mark)) { } else if (boat == null && SpellHelper.CheckMulti(Caster.Location, Caster.Map, false)) { Caster.SendLocalizedMessage(501942); // That location is blocked. } else if (boat != null && !(boat is BaseGalleon)) { Caster.LocalOverheadMessage(MessageType.Regular, 0x3B2, 501800); // You cannot mark an object at that location. } 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(); }
private static void Mark_OnCommand(CommandEventArgs e) { if (e.Arguments.Length <= 0) { e.Mobile.SendMessage("Usage: mark [RuneName]"); return; } var runeName = e.Arguments[0]; var rune = new RecallRune(); rune.Mark(e.Mobile); rune.Name = rune.Description = runeName; e.Mobile.AddToBackpack(rune); e.Mobile.SendMessage(string.Format("Rune {0} added to your backpack.", runeName)); }
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) { Region reg = Region.Find(Caster.Location, Caster.Map); if (!Caster.CanSee(rune)) { Caster.SendLocalizedMessage(500237); // Target can not be seen. } else if (reg.IsPartOf(typeof(PirateRegion))) { Caster.SendMessage("These waters are too rough to cast this spell."); } else if (Worlds.RegionAllowedTeleport(Caster.Map, Caster.Location, Caster.X, Caster.Y) == false) { Caster.SendMessage("That spell does not seem to work in this place."); } else if (!SpellHelper.CheckTravel(Caster, TravelCheckType.Mark)) { } 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()) { rune.Mark(Caster); Caster.PlaySound(0x1FA); Effects.SendLocationEffect(Caster, Caster.Map, 14201, 16, Server.Items.CharacterDatabase.GetMySpellHue(Caster, 0), 0); } 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 Target(RecallRune rune) { // IPY : Protection for DungeonMiningSystem. if (Caster.Map == Map.Ilshenar) { Caster.SendLocalizedMessage(501802); // Thy spell doth not appear to work... return; } WarpBlockerTotem recallBlocker = WarpBlockerTotem.RecallBlockerTriggered(Caster, WarpBlockerTotem.MovementMode.Mark, Caster.Location, Caster.Map); if (recallBlocker != null) { if (recallBlocker.PreventMarkResponse != "") { Caster.SendMessage(recallBlocker.PreventMarkResponse); } else { Caster.SendMessage(WarpBlockerTotem.DefaultMarkResponse); } } else if (!Caster.CanSee(rune)) { Caster.SendLocalizedMessage(500237); // Target can not be seen. } else if (!SpellHelper.CheckTravel(Caster, TravelCheckType.Mark)) { Caster.SendLocalizedMessage(501802); // Thy spell doth not appear to work... } else if (Caster.Map != Map.Felucca) { Caster.SendLocalizedMessage(501802); // Thy spell doth not appear to work... } else if (SpellHelper.CheckMulti(Caster.Location, Caster.Map)) { Caster.SendLocalizedMessage(501942); // That location is blocked. } else if (SpellHelper.IsSolenHiveLoc(Caster.Location)) { Caster.SendLocalizedMessage(501802); // Thy spell doth not appear to work... } else if (SpellHelper.IsStarRoom(Caster.Location)) { Caster.SendLocalizedMessage(501802); // Thy spell doth not appear to work... } else if (SpellHelper.IsWindLoc(Caster.Location)) { Caster.SendLocalizedMessage(501802); // Thy spell doth not appear to work... } else if (BaseBoat.FindBoatAt(Caster.Location, Caster.Map) != null) { Caster.SendMessage("You cannot mark a location at sea."); } else if (CheckSequence()) { rune.Mark(Caster); int spellHue = 0; // PlayerEnhancementPersistance.GetSpellHueFor(Caster, HueableSpell.Mark); Caster.PlaySound(0x1FA); Effects.SendLocationEffect(Caster, Caster.Map, 14201, 16, spellHue, 0); } FinishSequence(); }