public override bool SpecialHarvest(Mobile from, Item tool, HarvestDefinition def, Map map, Point3D loc) { PlayerMobile player = from as PlayerMobile; Container pack = from.Backpack; if (player != null) { QuestSystem qs = player.Quest; if (qs is CollectorQuest) { QuestObjective obj = qs.FindObjective(typeof(FishPearlsObjective)); if (obj != null && !obj.Completed) { if (Utility.RandomDouble() < 0.5) { player.SendLocalizedMessage(1055086, "", 0x59); // You pull a shellfish out of the water, and find a rainbow pearl inside of it. obj.CurProgress++; } else { player.SendLocalizedMessage(1055087, "", 0x2C); // You pull a shellfish out of the water, but it doesn't have a rainbow pearl. } return(true); } } if (from.Region.IsPartOf("Underworld")) { foreach (BaseQuest quest in player.Quests) { if (quest is SomethingFishy && Utility.RandomDouble() < 0.1) { Item red = new RedHerring(); from.AddToBackpack(red); player.SendLocalizedMessage(1095047, "", 0x23); // You pull a shellfish out of the water, but it doesn't have a rainbow pearl. return(true); } if (quest is ScrapingtheBottom && Utility.RandomDouble() < 0.1) { Item mug = new MudPuppy(); from.AddToBackpack(mug); player.SendLocalizedMessage(1095064, "", 0x23); // You pull a shellfish out of the water, but it doesn't have a rainbow pearl. return(true); } } } #region High Seas Charydbis if (tool is FishingPole && CharydbisSpawner.SpawnInstance != null && CharydbisSpawner.SpawnInstance.IsSummoned) { Item oracle = from.Backpack.FindItemByType(typeof(OracleOfTheSea)); FishingPole pole = tool as FishingPole; CharydbisSpawner sp = CharydbisSpawner.SpawnInstance; if (oracle != null && sp != null) { if (from.Map != sp.Map) { from.SendLocalizedMessage(1150861); //Charybdis have never been seen in these waters, try somewhere else. } else if (pole.BaitType == typeof(Charydbis) && from.Skills[SkillName.Fishing].Value >= 100) { if (sp.Charydbis == null && !sp.HasSpawned && sp.CurrentLocation.Contains(loc)) { Server.Multis.BaseBoat boat = Server.Multis.BaseBoat.FindBoatAt(from, from.Map); sp.SpawnCharydbis(from, loc, sp.Map, boat); sp.HasSpawned = true; pole.OnFishedHarvest(from, true); return(true); } else if (sp.LastLocation.Contains(loc)) { from.SendLocalizedMessage(1150862); //The charybdis has moved on from this location, consult Oracle Of The Seas again. } } else { from.SendLocalizedMessage(1150858); //You see a few bubbles, but no charybdis. } } } #endregion } return(false); }
public override bool SpecialHarvest(Mobile from, Item tool, HarvestDefinition def, Map map, Point3D loc) { PlayerMobile player = from as PlayerMobile; Container pack = from.Backpack; if (player != null) { QuestSystem qs = player.Quest; if (qs is CollectorQuest) { QuestObjective obj = qs.FindObjective(typeof(FishPearlsObjective)); if (obj != null && !obj.Completed) { if (Utility.RandomDouble() < 0.5) { player.SendLocalizedMessage(1055086, "", 0x59); // You pull a shellfish out of the water, and find a rainbow pearl inside of it. obj.CurProgress++; } else { player.SendLocalizedMessage(1055087, "", 0x2C); // You pull a shellfish out of the water, but it doesn't have a rainbow pearl. } return(true); } } foreach (BaseQuest quest in player.Quests) { if (quest is SomethingFishy) { if (Utility.RandomDouble() < 0.1 && (from.Region != null && from.Region.IsPartOf("AbyssEntrance"))) { Item red = new RedHerring(); pack.AddItem(red); player.SendLocalizedMessage(1095047, "", 0x23); // You pull a shellfish out of the water, but it doesn't have a rainbow pearl. break; } return(true); } if (quest is ScrapingtheBottom) { if (Utility.RandomDouble() < 0.1 && (from.Region != null && from.Region.IsPartOf("AbyssEntrance"))) { Item mug = new MudPuppy(); pack.AddItem(mug); player.SendLocalizedMessage(1095064, "", 0x23); // You pull a shellfish out of the water, but it doesn't have a rainbow pearl. break; } return(true); } } } return(false); }