public override async Task <bool> Execute() { // If we cannot 'see' the mob yet, move to the rough location... var gossipMob = ObjectManager.GetObjectsOfType <WoWUnit>().FirstOrDefault(u => u.Entry == GossipMobId); if (gossipMob == null) { await UtilityCoroutine.MoveTo(GossipMobRoughLocation, "Gossip mob"); return(true); } // Move into interact range of mob... if (Me.Location.Distance(gossipMob.Location) > gossipMob.InteractRange) { if (await UtilityCoroutine.MoveTo(gossipMob.Location, gossipMob.Name)) { return(true); } } WoWMovement.MoveStop(); // Pull up gossip frame, if not visible if (!IsGossipFrameVisible()) { await UtilityCoroutine.Interact(gossipMob); await Coroutine.Sleep(Delay.AfterInteraction); return(true); } TreeRoot.StatusText = string.Format("Gossiping with {0}", gossipMob.Name); var gossipPageIndex = 0; while (gossipPageIndex < GossipOptions.Length) { GossipEntry gossipEntry; if (!TryGetGossipEntry(GossipOptions[gossipPageIndex], out gossipEntry)) { QBCLog.Fatal( "{0} is not offering gossip option {1} on page {2}." + " Did competing player alter NPC state?" + " Did you stop/start Honorbuddy?" + " Terminating behavior.", gossipMob.Name, GossipOptions[gossipPageIndex] + 1, gossipPageIndex + 1); Utility.CloseAllNpcFrames(); Me.ClearTarget(); return(false); } // Log the gossip option we're about to take... QBCLog.DeveloperInfo( "Selecting Gossip Option({0}) on page {1}: \"{2}\"", gossipEntry.Index + 1, gossipPageIndex + 1, gossipEntry.Text); GossipFrame.Instance.SelectGossipOption(GossipOptions[gossipPageIndex]); ++gossipPageIndex; await Coroutine.Wait((int)Delay.AfterInteraction.TotalMilliseconds, () => !IsGossipFrameVisible()); } // Gossip is complete, claim credit... Utility.CloseAllNpcFrames(); var message = string.Format("Gossip with {0} complete.", gossipMob.Name); QBCLog.DeveloperInfo(message); TreeRoot.StatusText = message; return(true); }