public override bool OnMoveOver(Mobile m) { Point3D coord = new Point3D(3485, 2452, 0); Map map = Map.Lodor; if (this.Map == Map.Lodor) { coord = new Point3D(4333, 2316, 0); map = Map.Sosaria; } if (CharacterDatabase.GetKeys(m, "SerpentPillars")) { BaseCreature.TeleportPets(m, coord, map, false); m.MoveToWorld(coord, map); m.PlaySound(0x658); return(false); } else { Point3D blast = new Point3D((m.X), (m.Y), m.Z + 10); Effects.SendLocationEffect(blast, m.Map, 0x2A4E, 30, 10, 0, 0); m.PlaySound(0x029); m.Hits = 1; m.SendMessage("Not knowing the secret of the Serpent Pillars, you suffer Poseidon's wrath."); } return(true); }
public override bool OnMoveOver(Mobile m) { Point3D coord = new Point3D(6730, 3315, 0); Map map = Map.Felucca; if (this.Map == Map.Felucca) { coord = new Point3D(2672, 3235, 0); map = Map.Trammel; } if (CharacterDatabase.GetKeys(m, "SkullGate")) { BaseCreature.TeleportPets(m, coord, map, false); m.MoveToWorld(coord, map); m.PlaySound(0x658); return(false); } else { Effects.SendLocationParticles(EffectItem.Create(m.Location, m.Map, EffectItem.DefaultDuration), 0x36B0, 1, 14, 63, 7, 9915, 0); Effects.PlaySound(m.Location, m.Map, 0x229); m.ApplyPoison(m, Poison.Lethal); m.SendMessage("Not knowing the secret of the skull gate, you suffer the effects."); } return(true); }
public override bool OnMoveOver(Mobile m) { if (Active) { if (!Creatures && !m.Player) { return(true); } if (m is PlayerMobile) { if (!(CharacterDatabase.GetKeys(m, m_TeleportName)) && Required == "yes") { if (m.BeginAction(this)) { if (m_MessageString != null) { m.Send(new UnicodeMessage(Serial, ItemID, MessageType.Regular, 0x3B2, 3, "ENU", null, m_MessageString)); } Timer.DelayCall(TimeSpan.FromSeconds(5.0), new TimerStateCallback(EndMessageLock), m); } return(false); } } StartTeleport(m); return(false); } return(true); }
public override void OnDoubleClick(Mobile from) { if (from.InRange(this.GetWorldLocation(), 2)) { if (!Server.Misc.MyServerSettings.ClientVersion()) { CharacterDatabase.SetKeys(from, "DragonRiding", true); from.PrivateOverheadMessage(MessageType.Regular, 1150, false, "You learned of the Zuluu's ability to ride dragyns.", from.NetState); this.Delete(); } else if (CharacterDatabase.GetKeys(from, "DragonRiding")) { from.PrivateOverheadMessage(MessageType.Regular, 1150, false, "You already learned these secrets so you toss it out.", from.NetState); this.Delete(); } else { CharacterDatabase.SetKeys(from, "DragonRiding", true); from.SendSound(0x3D); from.PrivateOverheadMessage(MessageType.Regular, 1150, false, "You learned the secrets of dragon riding.", from.NetState); this.Delete(); } } else { from.SendLocalizedMessage(502138); // That is too far away for you to use } }
public override void OnDoubleClick(Mobile from) { if (from.InRange(this.GetWorldLocation(), 2)) { if (CharacterDatabase.GetKeys(from, "BlackKnightKey")) { from.PrivateOverheadMessage(MessageType.Regular, 1150, false, "You find nothing of interest.", from.NetState); } else { CharacterDatabase.SetKeys(from, "BlackKnightKey"); from.SendSound(0x3D); from.PrivateOverheadMessage(MessageType.Regular, 1150, false, "You found a blackened key with a symbol of a sword on it.", from.NetState); } } else { from.SendLocalizedMessage(502138); // That is too far away for you to use } }
public override void OnDoubleClick(Mobile from) { if (from.InRange(this.GetWorldLocation(), 2)) { if (CharacterDatabase.GetKeys(from, "SkullGate")) { from.PrivateOverheadMessage(MessageType.Regular, 1150, false, "You already learned this book's secrets.", from.NetState); } else { CharacterDatabase.SetKeys(from, "SkullGate"); from.SendSound(0x3D); from.PrivateOverheadMessage(MessageType.Regular, 1150, false, "You learned the secrets of the Skull Gate.", from.NetState); } } else { from.SendLocalizedMessage(502138); // That is too far away for you to use } }
public override void OnDoubleClick(Mobile from) { if (from.InRange(this.GetWorldLocation(), 2)) { if (CharacterDatabase.GetKeys(from, "UndermountainKey")) { from.PrivateOverheadMessage(MessageType.Regular, 1150, false, "You find nothing of interest.", from.NetState); } else { CharacterDatabase.SetKeys(from, "UndermountainKey", true); from.SendSound(0x3D); from.PrivateOverheadMessage(MessageType.Regular, 1150, false, "You found a dwarven key.", from.NetState); } } else { from.SendLocalizedMessage(502138); // That is too far away for you to use } }
public override void OnDoubleClick(Mobile from) { if (from.InRange(this.GetWorldLocation(), 2)) { if (CharacterDatabase.GetKeys(from, "SerpentPillars")) { from.PrivateOverheadMessage(MessageType.Regular, 1150, false, "You already learned this book's secrets.", from.NetState); } else { CharacterDatabase.SetKeys(from, "SerpentPillars", true); from.SendSound(0x3D); from.PrivateOverheadMessage(MessageType.Regular, 1150, false, "You learned the secrets of the Serpent Pillars.", from.NetState); } from.SendMessage("Check your quest log for details on the locations."); } else { from.SendLocalizedMessage(502138); // That is too far away for you to use } }
public void DoQuestTeleporter(Mobile m) { if (m.InRange(this.GetWorldLocation(), 2)) { if (CharacterDatabase.GetBardsTaleQuest(m, "BardsTaleWin") && this.Name == "a mysterious crystal ball" && this.X == 2830 && this.Y == 1875) { m.PrivateOverheadMessage(MessageType.Regular, 1150, false, TeleporterLockMsg, m.NetState); } else if (TeleporterOpen == 1 || TeleporterQuest == "blank") { if (TeleporterQuest != "blank") { CharacterDatabase.SetBardsTaleQuest(m, TeleporterQuest, true); } BaseCreature.TeleportPets(m, TeleporterPointDest, TeleporterMapDest, false); m.MoveToWorld(TeleporterPointDest, TeleporterMapDest); m.PlaySound(TeleporterSound); m.PrivateOverheadMessage(MessageType.Regular, 1150, false, TeleporterMessage, m.NetState); } else if (CharacterDatabase.GetKeys(m, TeleporterQuest) || CharacterDatabase.GetBardsTaleQuest(m, TeleporterQuest)) { TeleporterOpen = 1; BaseCreature.TeleportPets(m, TeleporterPointDest, TeleporterMapDest, false); m.MoveToWorld(TeleporterPointDest, TeleporterMapDest); m.PlaySound(TeleporterSound); Timer.DelayCall(TimeSpan.FromMinutes(2.0), new TimerCallback(CloseQuestTeleporter)); m.PrivateOverheadMessage(MessageType.Regular, 1150, false, TeleporterMessage, m.NetState); } else { m.PrivateOverheadMessage(MessageType.Regular, 1150, false, TeleporterFail, m.NetState); } } else { m.SendLocalizedMessage(502138); // That is too far away for you to use } }
/////////////////////////////////////////////////////////////////////////// public override bool OnDragDrop(Mobile from, Item dropped) { if (dropped is Gold) { string sMessage = ""; if (dropped.Amount == 500 && Server.Items.MuseumBook.IsEnabled()) { if (Server.Items.CharacterDatabase.GetDiscovered(from, "the Land of Sosaria") && Server.Items.CharacterDatabase.GetDiscovered(from, "the Land of Lodoria") && Server.Items.CharacterDatabase.GetDiscovered(from, "the Island of Umber Veil") && Server.Items.CharacterDatabase.GetDiscovered(from, "the Land of Ambrosia") && Server.Items.CharacterDatabase.GetDiscovered(from, "the Serpent Island") && Server.Items.CharacterDatabase.GetDiscovered(from, "the Isles of Dread") && Server.Items.CharacterDatabase.GetDiscovered(from, "the Savaged Empire") && Server.Items.CharacterDatabase.GetDiscovered(from, "the Bottle World of Kuldar") && Server.Items.CharacterDatabase.GetDiscovered(from, "the Underworld") ) { if (AlreadyHasBook(from)) { this.PublicOverheadMessage(MessageType.Regular, 0, false, string.Format("Here. I see you already have a book.")); } else if (CharacterDatabase.GetKeys(from, "Antiques")) { this.PublicOverheadMessage(MessageType.Regular, 0, false, string.Format("Thank you, but you already done that for me.")); } else { MuseumBook book = new MuseumBook(); from.PlaySound(0x2E6); book.ArtOwner = from; from.AddToBackpack(book); this.PublicOverheadMessage(MessageType.Regular, 0, false, string.Format("Good luck with the search.")); CharacterDatabase.SetKeys(from, "Antiques", true); dropped.Delete(); } } else { sMessage = "You need to discover the nine lands before I share this with you."; from.AddToBackpack(dropped); } } else { sMessage = "You look like you need this more than I do."; from.AddToBackpack(dropped); } this.PrivateOverheadMessage(MessageType.Regular, 1153, false, sMessage, from.NetState); } else if (dropped is MuseumBook) { MuseumBook book = (MuseumBook)dropped; string sMessage = ""; if (book.ArtOwner != from) { sMessage = "This book doesn't belong to you so I will just get rid of it."; bool remove = true; foreach (Account a in Accounts.GetAccounts()) { if (a == null) { break; } int index = 0; for (int i = 0; i < a.Length; ++i) { Mobile m = a[i]; if (m == null) { continue; } if (m == book.ArtOwner) { m.AddToBackpack(dropped); remove = false; } ++index; } } if (remove) { dropped.Delete(); } } else if (MuseumBook.GetNext(book) > 60) { CharacterDatabase.SetKeys(from, "Museums", true); from.SendSound(0x3D); from.AddToBackpack(new BankCheck(MuseumBook.QuestValue())); sMessage = "You have done the museum a great service. Here is " + MuseumBook.QuestValue() + " gold we promised."; from.Fame = 15000; from.SendMessage("You have gained a really large amount of fame."); dropped.Delete(); } else { sMessage = "You have not finished your search yet."; } this.PrivateOverheadMessage(MessageType.Regular, 1153, false, sMessage, from.NetState); } return(base.OnDragDrop(from, dropped)); }
public override void OnComponentUsed(AddonComponent ac, Mobile from) { if (!from.InRange(GetWorldLocation(), 2)) { from.SendMessage("You will have to get closer to open that."); } else if (from is PlayerMobile) { PlayerMobile pm = (PlayerMobile)from; bool HasBox = false; int goal = 0; int nextVirtue = 0; RuneBox box = null; if (from.Backpack.FindItemByType(typeof(RuneBox)) != null) { Item boxx = from.Backpack.FindItemByType(typeof(RuneBox)); RuneBox boxxx = (RuneBox)boxx; if (boxxx.RuneBoxOwner == from) { HasBox = true; box = boxxx; goal = box.HasCompassion + box.HasHonesty + box.HasHonor + box.HasHumility + box.HasJustice + box.HasSacrifice + box.HasSpirituality + box.HasValor; if (box.HasCompassion == 0) { nextVirtue = 1; } else if (box.HasHonesty == 0) { nextVirtue = 2; } else if (box.HasHonor == 0) { nextVirtue = 3; } else if (box.HasHumility == 0) { nextVirtue = 4; } else if (box.HasJustice == 0) { nextVirtue = 5; } else if (box.HasSacrifice == 0) { nextVirtue = 6; } else if (box.HasSpirituality == 0) { nextVirtue = 7; } else if (box.HasValor == 0) { nextVirtue = 8; } } } if (CharacterDatabase.GetKeys(from, "Virtue") || CharacterDatabase.GetKeys(from, "Corrupt")) // THEY ARE ALREADY DID THIS QUEST { HasBox = true; from.SendMessage("You don't need this chest as you already dealt with the runes."); } else if (goal < 8 && HasBox == true) { RuneGuardian sentinel = new RuneGuardian(); sentinel.gVirtue = nextVirtue; sentinel.gSummoner = from; sentinel.MoveToWorld(Location, Map); sentinel.Combatant = from; Effects.SendLocationParticles(EffectItem.Create(sentinel.Location, sentinel.Map, EffectItem.DefaultDuration), 0x3728, 10, 10, 2023); sentinel.PlaySound(0x1FE); RunesBaseEmpty Pedul = new RunesBaseEmpty(); Pedul.MoveToWorld(new Point3D(this.X, this.Y, this.Z), this.Map); from.SendMessage("You have awakened a sentinel."); this.Delete(); } else if (HasBox == true) { from.SendMessage("Your virtue chest is already in your pack."); } else { ArrayList targets = new ArrayList(); foreach (Item item in World.Items.Values) { if (item is RuneBox) { if (((RuneBox)item).RuneBoxOwner == from) { targets.Add(item); HasBox = true; } } } for (int i = 0; i < targets.Count; ++i) { Item item = ( Item )targets[i]; if (item is RuneBox) { from.AddToBackpack(item); from.SendMessage("Your virtue chest is already in your pack."); } } } if (!HasBox) { SetupVitrtue(from); from.SendMessage("You take possession of the Chest of Virtue!"); from.SendSound(0x3D); LoggingFunctions.LogGeneric(from, "has found the Chest of Virtue."); CharacterDatabase.SetKeys(from, "Runes", true); RunesBaseEmpty Pedul = new RunesBaseEmpty(); Pedul.MoveToWorld(new Point3D(this.X, this.Y, this.Z), this.Map); this.Delete(); } } }