/// <summary> /// Player has picked a subselection. /// </summary> /// <param name="player"></param> /// <param name="subSelection"></param> protected override void OnSubSelectionPicked(GamePlayer player, Teleport subSelection) { switch (subSelection.TeleportID.ToLower()) { case "shrouded isles": { String reply = String.Format("The isles of Avalon are an excellent choice. {0} {1}", "Would you prefer the harbor of [Gothwaite] or perhaps one of the outlying towns", "like [Wearyall] Village, Fort [Gwyntell], or Caer [Diogel]?"); SayTo(player, reply); return; } case "housing": { String reply = String.Format("I can send you to your [personal] house. If you do {0} {1} {2} {3}", "not have a personal house or wish to be sent to the housing [entrance] then you will", "arrive just inside the housing area. I can also send you to your [guild] house. If your", "guild does not own a house then you will not be transported. You may go to your [Hearth] bind", "as well if you are bound inside a house."); SayTo(player, reply); return; } } base.OnSubSelectionPicked(player, subSelection); }
/// <summary> /// Player has picked a destination. /// </summary> /// <param name="player"></param> /// <param name="destination"></param> protected override void OnDestinationPicked(GamePlayer player, Teleport destination) { switch (destination.TeleportID.ToLower()) { case "battlegrounds": if (!ServerProperties.Properties.BG_ZONES_OPENED && player.Client.Account.PrivLevel == (uint)ePrivLevel.Player) { SayTo(player, ServerProperties.Properties.BG_ZONES_CLOSED_MESSAGE); return; } SayTo(player, "I will teleport you to the appropriate battleground for your level and Realm Rank. If you exceed the Realm Rank for a battleground, you will not teleport. Please gain more experience to go to the next battleground."); break; case "cruachan gorge": SayTo(player, "Now to the Frontiers for the glory of the realm!"); break; case "domnann": SayTo(player, "The Shrouded Isles await you."); break; case "druim cain": SayTo(player, "Druim Cain is what you seek, and Druim Cain is what you shall find."); break; case "druim ligen": SayTo(player, "Druim Ligen is what you seek, and Druim Ligen is what you shall find."); break; case "housing": break; case "tir na nog": SayTo(player, "The great city awaits!"); break; default: SayTo(player, "This destination is not yet supported."); return; } base.OnDestinationPicked(player, destination); }
/// <summary> /// Player has picked a subselection. /// </summary> /// <param name="player"></param> /// <param name="subSelection"></param> protected override void OnSubSelectionPicked(GamePlayer player, Teleport subSelection) { switch (subSelection.TeleportID.ToLower()) { case "shrouded isles": { String reply = String.Format("The isles of Hy Brasil are an excellent choice. {0} {1}", "Would you prefer the grove of [Domnann] or perhaps one of the outlying towns", "like [Droighaid], [Aalid Feie], or [Necht]?"); SayTo(player, reply); return; } case "housing": { String reply = String.Format("I can send you to your [personal] house. If you do {0} {1} {2} {3}", "not have a personal house or wish to be sent to the housing [entrance] then you will", "arrive just inside the housing area. I can also send you to your [guild] house. If your", "guild does not own a house then you will not be transported. You may go to your [Hearth] bind", "as well if you are bound inside a house."); SayTo(player, reply); return; } } base.OnSubSelectionPicked(player, subSelection); }
/// <summary> /// Player has picked a destination. /// </summary> /// <param name="player"></param> /// <param name="destination"></param> protected override void OnDestinationPicked(GamePlayer player, Teleport destination) { // Not porting to where we already are. List<String> playerAreaList = new List<String>(); foreach (AbstractArea area in player.CurrentAreas) playerAreaList.Add(area.Description); if (playerAreaList.Contains(destination.TeleportID)) return; switch (destination.TeleportID.ToLower()) { case "aegirhamn": break; case "bjarken": break; case "hagall": break; case "knarr": break; default: return; } SayTo(player, "Have a safe journey!"); base.OnDestinationPicked(player, destination); }
/// <summary> /// Player has picked a destination. /// </summary> /// <param name="player"></param> /// <param name="destination"></param> protected override void OnDestinationPicked(GamePlayer player, Teleport destination) { // Not porting to where we already are. List<String> playerAreaList = new List<String>(); foreach (AbstractArea area in player.CurrentAreas) playerAreaList.Add(area.Description); if (playerAreaList.Contains(destination.TeleportID)) return; switch (destination.TeleportID.ToLower()) { case "grove of domnann": break; case "droighaid": break; case "aalid feie": break; case "necht": break; default: return; } SayTo(player, "Have a safe journey!"); base.OnDestinationPicked(player, destination); }
/// <summary> /// Teleport the player to the designated coordinates. /// </summary> /// <param name="player"></param> /// <param name="destination"></param> protected void OnTeleport(GamePlayer player, Teleport destination) { if (player.InCombat == false && GameRelic.IsPlayerCarryingRelic(player) == false) { player.LeaveHouse(); GameLocation currentLocation = new GameLocation("TeleportStart", player.CurrentRegionID, player.X, player.Y, player.Z); player.MoveTo((ushort)destination.RegionID, destination.X, destination.Y, destination.Z, (ushort)destination.Heading); GameServer.ServerRules.OnPlayerTeleport(player, currentLocation, destination); } }
/// <summary> /// Player has picked a destination. /// </summary> /// <param name="player"></param> /// <param name="destination"></param> protected override void OnDestinationPicked(GamePlayer player, Teleport destination) { switch (destination.TeleportID.ToLower()) { case "battlegrounds": if (!ServerProperties.Properties.BG_ZONES_OPENED && player.Client.Account.PrivLevel == (uint)ePrivLevel.Player) { SayTo(player, ServerProperties.Properties.BG_ZONES_CLOSED_MESSAGE); return; } SayTo(player, "I will teleport you to the appropriate battleground for your level and Realm Rank. If you exceed the Realm Rank for a battleground, you will not teleport. Please gain more experience to go to the next battleground."); break; default: SayTo(player, "This destination is not yet supported."); return; } base.OnDestinationPicked(player, destination); }
/// <summary> /// Player has picked a destination. /// </summary> /// <param name="player"></param> /// <param name="destination"></param> protected override void OnDestinationPicked(GamePlayer player, Teleport destination) { switch (destination.TeleportID.ToLower()) { case "battlegrounds": if (!ServerProperties.Properties.BG_ZONES_OPENED && player.Client.Account.PrivLevel == (uint)ePrivLevel.Player) { SayTo(player, ServerProperties.Properties.BG_ZONES_CLOSED_MESSAGE); return; } SayTo(player, "I will teleport you to the appropriate battleground for your level and Realm Rank. If you exceed the Realm Rank for a battleground, you will not teleport. Please gain more experience to go to the next battleground."); break; case "city of aegirhamn": SayTo(player, "The Shrouded Isles await you."); break; case "housing": break; case "gotar": SayTo(player, "You shall soon arrive in the Gotar."); break; case "jordheim": SayTo(player, "The great city awaits!"); break; case "svasud faste": SayTo(player, "Svasud Faste is what you seek, and Svasud Faste is what you shall find."); break; case "uppland": SayTo(player, "Now to the Frontiers for the glory of the realm!"); break; case "vindsaul faste": SayTo(player, "Vindsaul Faste is what you seek, and Vindsaul Faste is what you shall find."); break; default: SayTo(player, "This destination is not yet supported."); return; } base.OnDestinationPicked(player, destination); }
/// <summary> /// Should be called whenever a player teleports to a new location /// </summary> /// <param name="player"></param> /// <param name="source"></param> /// <param name="destination"></param> public virtual void OnPlayerTeleport(GamePlayer player, GameLocation source, Teleport destination) { // override this in order to do something, like set immunity, when a player teleports }
protected virtual bool GetTeleportLocation(GamePlayer player, string text) { // Battlegrounds are specials, as the teleport location depends on // the level of the player, so let's deal with that first. if (text.ToLower() == "battlegrounds") { if (!ServerProperties.Properties.BG_ZONES_OPENED && player.Client.Account.PrivLevel == (uint)ePrivLevel.Player) { SayTo(player, ServerProperties.Properties.BG_ZONES_CLOSED_MESSAGE); } else { AbstractGameKeep portalKeep = GameServer.KeepManager.GetBGPK(player); if (portalKeep != null) { Teleport teleport = new Teleport(); teleport.TeleportID = "battlegrounds"; teleport.Realm = (byte)portalKeep.Realm; teleport.RegionID = portalKeep.Region; teleport.X = portalKeep.X; teleport.Y = portalKeep.Y; teleport.Z = portalKeep.Z; teleport.Heading = 0; OnDestinationPicked(player, teleport); return true; } else { if (player.Client.Account.PrivLevel > (uint)ePrivLevel.Player) { player.Out.SendMessage("No portal keep found.", eChatType.CT_Skill, eChatLoc.CL_SystemWindow); } return true; } } } // Another special case is personal house, as there is no location // that will work for every player. if (text.ToLower() == "personal") { House house = HouseMgr.GetHouseByPlayer(player); if(house == null) { text = "entrance"; // Fall through, port to housing entrance. } else { IGameLocation location = house.OutdoorJumpPoint; Teleport teleport = new Teleport(); teleport.TeleportID = "personal"; teleport.Realm = (int)DestinationRealm; teleport.RegionID = location.RegionID; teleport.X = location.X; teleport.Y = location.Y; teleport.Z = location.Z; teleport.Heading = location.Heading; OnDestinationPicked(player, teleport); return true; } } // Yet another special case the port to the 'hearth' what means // that the player will be ported to the defined house bindstone if (text.ToLower() == "hearth") { // Check if player has set a house bind if (!(player.DBCharacter.BindHouseRegion > 0)) { SayTo(player, "Sorry, you haven't set any house bind point yet."); return false; } // Check if the house at the player's house bind location still exists ArrayList houses = (ArrayList)HouseMgr.GetHousesCloseToSpot((ushort)player. DBCharacter.BindHouseRegion, player.DBCharacter.BindHouseXpos, player. DBCharacter.BindHouseYpos, 700); if (houses.Count == 0) { SayTo(player, "I'm afraid I can't teleport you to your hearth since the house at your " + "house bind location has been torn down."); return false; } // Check if the house at the player's house bind location contains a bind stone House targetHouse = (House)houses[0]; IDictionary<uint, DBHouseHookpointItem> hookpointItems = targetHouse.HousepointItems; Boolean hasBindstone = false; foreach (KeyValuePair<uint, DBHouseHookpointItem> targetHouseItem in hookpointItems) { if (((GameObject)targetHouseItem.Value.GameObject).GetName(0, false).ToLower().EndsWith("bindstone")) { hasBindstone = true; break; } } if (!hasBindstone) { SayTo(player, "I'm sorry to tell that the bindstone of your current house bind location " + "has been removed, so I'm not able to teleport you there."); return false; } // Check if the player has the permission to bind at the house bind stone if (!targetHouse.CanBindInHouse(player)) { SayTo(player, "You're no longer allowed to bind at the house bindstone you've previously " + "chosen, hence I'm not allowed to teleport you there."); return false; } Teleport teleport = new Teleport(); teleport.TeleportID = "hearth"; teleport.Realm = (int)DestinationRealm; teleport.RegionID = player.DBCharacter.BindHouseRegion; teleport.X = player.DBCharacter.BindHouseXpos; teleport.Y = player.DBCharacter.BindHouseYpos; teleport.Z = player.DBCharacter.BindHouseZpos; teleport.Heading = player.DBCharacter.BindHouseHeading; OnDestinationPicked(player, teleport); return true; } if (text.ToLower() == "guild") { House house = HouseMgr.GetGuildHouseByPlayer(player); if (house == null) { return false; // no teleport when guild house not found } else { IGameLocation location = house.OutdoorJumpPoint; Teleport teleport = new Teleport(); teleport.TeleportID = "guild house"; teleport.Realm = (int)DestinationRealm; teleport.RegionID = location.RegionID; teleport.X = location.X; teleport.Y = location.Y; teleport.Z = location.Z; teleport.Heading = location.Heading; OnDestinationPicked(player, teleport); return true; } } // Find the teleport location in the database. Teleport port = WorldMgr.GetTeleportLocation(DestinationRealm, String.Format("{0}:{1}", Type, text)); if (port != null) { if (port.RegionID == 0 && port.X == 0 && port.Y == 0 && port.Z == 0) { OnSubSelectionPicked(player, port); } else { OnDestinationPicked(player, port); } return false; } return true; // Needs further processing. }
/// <summary> /// Teleport the player to the designated coordinates using the /// portal spell. /// </summary> /// <param name="player"></param> /// <param name="destination"></param> protected virtual void OnTeleportSpell(GamePlayer player, Teleport destination) { SpellLine spellLine = SkillBase.GetSpellLine(GlobalSpellsLines.Mob_Spells); List<Spell> spellList = SkillBase.GetSpellList(GlobalSpellsLines.Mob_Spells); Spell spell = SkillBase.GetSpellByID(5999); // UniPortal spell. if (spell != null) { TargetObject = player; UniPortal portalHandler = new UniPortal(this, spell, spellLine, destination); m_runningSpellHandler = portalHandler; portalHandler.CastSpell(); return; } // Spell not found in the database, fall back on default procedure. if (player.Client.Account.PrivLevel > 1) player.Out.SendMessage("Uni-Portal spell not found.", eChatType.CT_Skill, eChatLoc.CL_SystemWindow); this.OnTeleport(player, destination); }
/// <summary> /// Player has picked a subselection. /// Override to pass teleport options on to the player. /// </summary> /// <param name="player"></param> /// <param name="subSelection"></param> protected virtual void OnSubSelectionPicked(GamePlayer player, Teleport subSelection) { }
/// <summary> /// Player has picked a destination. /// Override if you need the teleporter to say something to the player /// before porting him. /// </summary> /// <param name="player"></param> /// <param name="destination"></param> protected virtual void OnDestinationPicked(GamePlayer player, Teleport destination) { Region region = WorldMgr.GetRegion((ushort)destination.RegionID); if (region == null || region.IsDisabled) { player.Out.SendMessage("This destination is not available.", eChatType.CT_System, eChatLoc.CL_SystemWindow); return; } OnTeleport(player, destination); }
/// <summary> /// Teleport the player to the designated coordinates. /// </summary> /// <param name="player"></param> /// <param name="destination"></param> protected virtual void OnTeleport(GamePlayer player, Teleport destination) { if (player.InCombat == false && GameRelic.IsPlayerCarryingRelic(player) == false) { player.LeaveHouse(); player.MoveTo((ushort)destination.RegionID, destination.X, destination.Y, destination.Z, (ushort)destination.Heading); } }
/// <summary> /// Teleport the player to the designated coordinates. /// </summary> /// <param name="player"></param> /// <param name="destination"></param> protected override void OnTeleport(GamePlayer player, Teleport destination) { OnTeleportSpell(player, destination); }
/// <summary> /// Player has picked a destination. /// </summary> /// <param name="player"></param> /// <param name="destination"></param> protected override void OnDestinationPicked(GamePlayer player, Teleport destination) { switch (destination.TeleportID.ToLower()) { case "aalid feie": break; // No text? case "battlegrounds": if (!ServerProperties.Properties.BG_ZONES_OPENED && player.Client.Account.PrivLevel == (uint)ePrivLevel.Player) { SayTo(player, ServerProperties.Properties.BG_ZONES_CLOSED_MESSAGE); return; } SayTo(player, "I will teleport you to the appropriate battleground for your level and Realm Rank. If you exceed the Realm Rank for a battleground, you will not teleport. Please gain more experience to go to the next battleground."); break; case "cruachan gorge": SayTo(player, "Now to the Frontiers for the glory of the realm!"); break; case "domnann": SayTo(player, "The Shrouded Isles await you."); break; case "droighaid": break; // No text? case "druim cain": SayTo(player, "Druim Cain is what you seek, and Druim Cain is what you shall find."); break; case "druim ligen": SayTo(player, "Druim Ligen is what you seek, and Druim Ligen is what you shall find."); break; case "entrance": break; // No text? case "necht": break; // No text? case "oceanus": if (player.Client.Account.PrivLevel < ServerProperties.Properties.ATLANTIS_TELEPORT_PLVL) { SayTo(player, "I'm sorry, but you are not authorized to enter Atlantis at this time."); return; } SayTo(player, "You will soon arrive in the Haven of Oceanus."); break; case "personal": break; case "hearth": break; case "shannon estuary": SayTo(player, "You shall soon arrive in the Shannon Estuary."); break; case "shar labyrinth": //if (player.HasFinishedQuest(typeof(SharLabyrinth)) <= 0) //{ // SayTo(player, String.Format("I may only send those who know the way to this {0} {1}", // "city. Seek out the path to the city and in future times I will aid you in", // "this journey.")); // return; //} break; case "tir na nog": SayTo(player, "The great city awaits!"); break; case "fintain": if (ServerProperties.Properties.DISABLE_TUTORIAL) { SayTo(player,"Sorry, this place is not available for now !"); return; } if (player.Level > 15) { SayTo(player,"Sorry, you are far too experienced to enjoy this place !"); return; } break; default: SayTo(player, "This destination is not yet supported."); return; } base.OnDestinationPicked(player, destination); }
/// <summary> /// Player has picked a destination. /// </summary> /// <param name="player"></param> /// <param name="destination"></param> protected override void OnDestinationPicked(GamePlayer player, Teleport destination) { switch (destination.TeleportID.ToLower()) { case "battlegrounds": if (!ServerProperties.Properties.BG_ZONES_OPENED && player.Client.Account.PrivLevel == (uint)ePrivLevel.Player) { SayTo(player, ServerProperties.Properties.BG_ZONES_CLOSED_MESSAGE); return; } SayTo(player, "I will teleport you to the appropriate battleground for your level and Realm Rank. If you exceed the Realm Rank for a battleground, you will not teleport. Please gain more experience to go to the next battleground."); break; case "bjarken": break; // No text? case "city of aegirhamn": SayTo(player, "The Shrouded Isles await you."); break; case "entrance": break; // No text? case "gotar": SayTo(player, "You shall soon arrive in the Gotar."); break; case "hagall": break; // No text? case "jordheim": SayTo(player, "The great city awaits!"); break; case "knarr": break; // No text? case "kobold undercity": if (player.HasFinishedQuest(typeof(KoboldUndercity)) <= 0) { SayTo(player, String.Format("I may only send those who know the way to this {0} {1}", "city. Seek out the path to the city and in future times I will aid you in", "this journey.")); return; } break; case "oceanus": if (player.Client.Account.PrivLevel < ServerProperties.Properties.ATLANTIS_TELEPORT_PLVL) { SayTo(player, "I'm sorry, but you are not authorized to enter Atlantis at this time."); return; } SayTo(player, "You will soon arrive in the Haven of Oceanus."); break; case "personal": break; case "hearth": break; case "svasud faste": SayTo(player, "Svasud Faste is what you seek, and Svasud Faste is what you shall find."); break; case "uppland": SayTo(player, "Now to the Frontiers for the glory of the realm!"); break; case "vindsaul faste": SayTo(player, "Vindsaul Faste is what you seek, and Vindsaul Faste is what you shall find."); break; case "hafheim": if (ServerProperties.Properties.DISABLE_TUTORIAL) { SayTo(player,"Sorry, this place is not available for now !"); return; } if (player.Level > 15) { SayTo(player,"Sorry, you are far too experienced to enjoy this place !"); return; } break; default: SayTo(player, "This destination is not yet supported."); return; } base.OnDestinationPicked(player, destination); }
/// <summary> /// Player has picked a destination. /// </summary> /// <param name="player"></param> /// <param name="destination"></param> protected override void OnDestinationPicked(GamePlayer player, Teleport destination) { // Not porting to where we already are. List<String> playerAreaList = new List<String>(); foreach (AbstractArea area in player.CurrentAreas) playerAreaList.Add(area.Description); if (playerAreaList.Contains(destination.TeleportID)) return; switch (destination.TeleportID.ToLower()) { case "caer gothwaite": break; case "wearyall village": break; case "fort gwyntell": break; case "caer diogel": break; default: return; } SayTo(player, "Have a safe journey!"); base.OnDestinationPicked(player, destination); }
/// <summary> /// Player has picked a destination. /// </summary> /// <param name="player"></param> /// <param name="destination"></param> protected override void OnDestinationPicked(GamePlayer player, Teleport destination) { SayTo(player, "Have a safe journey!"); base.OnDestinationPicked(player, destination); }
/// <summary> /// Should be called whenever a player teleports to a new location /// </summary> /// <param name="player"></param> /// <param name="source"></param> /// <param name="destination"></param> public override void OnPlayerTeleport(GamePlayer player, GameLocation source, Teleport destination) { // Since region change already starts an immunity timer we only want to do this if a player // is teleporting within the same region if (source.RegionID == destination.RegionID) { StartImmunityTimer(player, ServerProperties.Properties.TIMER_PVP_TELEPORT * 1000); } }
/// <summary> /// Add a new teleport destination (used by /teleport add). /// </summary> /// <param name="teleport"></param> /// <returns></returns> public static bool AddTeleportLocation(Teleport teleport) { eRealm realm = (eRealm)teleport.Realm; String teleportKey = String.Format("{0}:{1}", teleport.Type, teleport.TeleportID); lock (m_syncTeleport) { Dictionary<String, Teleport> teleports = null; if (m_teleportLocations.ContainsKey(realm)) { if (m_teleportLocations[realm].ContainsKey(teleportKey)) return false; // Double entry. teleports = m_teleportLocations[realm]; } if (teleports == null) { teleports = new Dictionary<String, Teleport>(); m_teleportLocations.Add(realm, teleports); } teleports.Add(teleportKey, teleport); return true; } }
/// <summary> /// Add a new teleport destination in memory and save to database, if /// successful. /// </summary> /// <param name="client"></param> /// <param name="teleportID"></param> /// <param name="type"></param> private void AddTeleport(GameClient client, String teleportID, String type) { GamePlayer player = client.Player; eRealm realm = player.Realm; if (WorldMgr.GetTeleportLocation(realm, String.Format("{0}:{1}", type, teleportID)) != null) { client.Out.SendMessage(String.Format("Teleport ID [{0}] already exists!", teleportID), eChatType.CT_System, eChatLoc.CL_SystemWindow); return; } Teleport teleport = new Teleport(); teleport.TeleportID = teleportID; teleport.Realm = (int)realm; teleport.RegionID = player.CurrentRegion.ID; teleport.X = player.X; teleport.Y = player.Y; teleport.Z = player.Z; teleport.Heading = player.Heading; teleport.Type = type; if (!WorldMgr.AddTeleportLocation(teleport)) { client.Out.SendMessage(String.Format("Failed to add teleport ID [{0}] in memory!", teleportID), eChatType.CT_System, eChatLoc.CL_SystemWindow); return; } GameServer.Database.AddObject(teleport); client.Out.SendMessage(String.Format("Teleport ID [{0}] successfully added.", teleportID), eChatType.CT_System, eChatLoc.CL_SystemWindow); }
/// <summary> /// Teleport the player to the designated coordinates. /// </summary> /// <param name="player"></param> /// <param name="destination"></param> protected override void OnTeleport(GamePlayer player, Teleport destination) { player.Out.SendMessage("There is an odd distortion in the air around you...", eChatType.CT_System, eChatLoc.CL_SystemWindow); base.OnTeleport(player, destination); }
/// <summary> /// Player has picked a destination. /// </summary> /// <param name="player"></param> /// <param name="destination"></param> protected override void OnDestinationPicked(GamePlayer player, Teleport destination) { switch (destination.TeleportID.ToLower()) { case "avalon marsh": SayTo(player, "You shall soon arrive in the Avalon Marsh."); break; case "battlegrounds": if (!ServerProperties.Properties.BG_ZONES_OPENED && player.Client.Account.PrivLevel == (uint)ePrivLevel.Player) { SayTo(player, ServerProperties.Properties.BG_ZONES_CLOSED_MESSAGE); return; } SayTo(player, "I will teleport you to the appropriate battleground for your level and Realm Rank. If you exceed the Realm Rank for a battleground, you will not teleport. Please gain more experience to go to the next battleground."); break; case "camelot": SayTo(player, "The great city awaits!"); break; case "castle sauvage": SayTo(player, "Castle Sauvage is what you seek, and Castle Sauvage is what you shall find."); break; case "diogel": break; // No text? case "entrance": break; // No text? case "forest sauvage": SayTo(player, "Now to the Frontiers for the glory of the realm!"); break; case "gothwaite": SayTo(player, "The Shrouded Isles await you."); break; case "gwyntell": break; // No text? case "inconnu crypt": //if (player.HasFinishedQuest(typeof(InconnuCrypt)) <= 0) //{ // SayTo(player, String.Format("I may only send those who know the way to this {0} {1}", // "city. Seek out the path to the city and in future times I will aid you in", // "this journey.")); // return; //} break; case "oceanus": if (player.Client.Account.PrivLevel < ServerProperties.Properties.ATLANTIS_TELEPORT_PLVL) { SayTo(player, "I'm sorry, but you are not authorized to enter Atlantis at this time."); return; } SayTo(player, "You will soon arrive in the Haven of Oceanus."); break; case "personal": break; case "hearth": break; case "snowdonia fortress": SayTo(player, "Snowdonia Fortress is what you seek, and Snowdonia Fortress is what you shall find."); break; // text for the following ? case "wearyall": break; case "holtham": if (ServerProperties.Properties.DISABLE_TUTORIAL) { SayTo(player,"Sorry, this place is not available for now !"); return; } if (player.Level > 15) { SayTo(player,"Sorry, you are far too experienced to enjoy this place !"); return; } break; default: SayTo(player, "This destination is not yet supported."); return; } base.OnDestinationPicked(player, destination); }
public UniPortal(GameLiving caster, Spell spell, SpellLine spellLine, Teleport destination) : base(caster, spell, spellLine) { m_destination = destination; }
/// <summary> /// Player has picked a subselection. /// </summary> /// <param name="player"></param> /// <param name="subSelection"></param> protected override void OnSubSelectionPicked(GamePlayer player, Teleport subSelection) { switch (subSelection.TeleportID.ToLower()) { case "oceanus": { String reply = String.Format("I can transport you to the Haven of Oceanus in {0} {1}", "Oceanus [Hesperos], the mouth of [Cetus' Pit], or the heights of the great", "[Temple] of Sobekite Eternal."); SayTo(player, reply); return; } case "stygia": { String reply = String.Format("Do you seek the sandy Haven of Stygia in the Stygian {0}", "[Delta] or the distant [Land of Atum]?"); SayTo(player, reply); return; } case "volcanus": { String reply = String.Format("Do you wish to approach [Typhon's Reach] from the Haven {0} {1}", "of Volcanus or do you perhaps have more ambitious plans, such as attacking", "[Thusia Nesos], the Temple of [Apollo], [Vazul's Fortress], or the [Chimera] herself?"); SayTo(player, reply); return; } case "aerus": { String reply = String.Format("Do you seek the Haven of Aerus outside [Green Glades] or {0}", "perhaps the Temple of [Talos]?"); SayTo(player, reply); return; } case "dungeons of atlantis": { String reply = String.Format("I can provide access to [Sobekite Eternal], the {0} {1}", "Temple of [Twilight], the [Great Pyramid], the [Halls of Ma'ati], [Deep] within", "Volcanus, or even the [City] of Aerus."); SayTo(player, reply); return; } case "twilight": { String reply = String.Format("Do you seek an audience with one of the great ladies {0} {1}", "of that dark temple? I'm sure that [Moirai], [Kepa], [Casta], [Laodameia], [Antioos],", "[Sinovia], or even [Medusa] would love to have you over for dinner."); SayTo(player, reply); return; } case "halls of ma'ati": { String reply = String.Format("Which interests you, the [entrance], the [Anubite] side, {0} {1}", "or the [An-Uat] side? Or are you already ready to face your final fate in the", "[Chamber of Ammut]?"); SayTo(player, reply); return; } case "deep": { String reply = String.Format("Do you wish to meet with the Mediators of the [southwest] {0} {1}", "or [northeast] hall, face [Katorii's] gaze, or are you foolish enough to battle the", "likes of [Typhon himself]?"); SayTo(player, reply); return; } case "city": { String reply = String.Format("I can send you to the entrance near the [portal], the great {0} {1} {2}", "Unifier, [Lethos], the [ancient kings] remembered now only for their reputations, the", "famous teacher, [Nelos], the most well known and honored avriel, [Katri], or even", "the [Phoenix] itself."); SayTo(player, reply); return; } } base.OnSubSelectionPicked(player, subSelection); }
/// <summary> /// Player has picked a teleport destination. /// </summary> /// <param name="player"></param> /// <param name="destination"></param> protected override void OnDestinationPicked(GamePlayer player, Teleport destination) { if (player == null) return; if (Region.IsAtlantis(player.CurrentRegionID) && Region.IsAtlantis(destination.RegionID)) destination.RegionID = player.CurrentRegionID; String teleportInfo = "The magic of the {0} delivers you to the Haven of {1}."; switch (destination.TeleportID.ToLower()) { case "hesperos": { player.Out.SendMessage(String.Format(teleportInfo, Name, "Oceanus"), eChatType.CT_System, eChatLoc.CL_SystemWindow); base.OnTeleport(player, destination); return; } case "delta": { player.Out.SendMessage(String.Format(teleportInfo, Name, "Stygia"), eChatType.CT_System, eChatLoc.CL_SystemWindow); base.OnTeleport(player, destination); return; } case "green glades": { player.Out.SendMessage(String.Format(teleportInfo, Name, "Aerus"), eChatType.CT_System, eChatLoc.CL_SystemWindow); base.OnTeleport(player, destination); return; } } base.OnDestinationPicked(player, destination); }