• Visit Rebornbuddy
  • Visit Panda Profiles
  • Visit LLamamMagic
  • Work in progress World Quests

    Discussion in 'Honorbuddy Profiles' started by zinner, Sep 7, 2016.

    1. DjStyles

      DjStyles New Member

      Joined:
      Dec 16, 2012
      Messages:
      20
      Likes Received:
      0
      Trophy Points:
      1
      Needs to be copied to the "Plugins" folder, not the "Plugin" folder as per the folder structure of the SVN.
       
    2. Alexeilol

      Alexeilol New Member

      Joined:
      Jun 26, 2013
      Messages:
      19
      Likes Received:
      0
      Trophy Points:
      0
      For those of you still having issues with where to put it or can't get on to the Discord, basically, start again, clear your cache.

      Start a new folder, SVN the original link into it, as per normal, then copy this folder, into C:\xxxx\xxxx\xxxx\Honorbuddy\Plugins, or where ever you have HB installed. Once this is done, you can start the bot as per normal, make sure to select the WORLD QUEST from Plugins (This gives you your options) and load the autoloader, as you normally would - but keep in mind it is probably kept in the Plugins folder.

      Goodluck!

      As for Zim, thank you so much for not charging an exorbitant amount and making a very successful bot. Cheers!
       
    3. Beuns

      Beuns New Member

      Joined:
      Oct 6, 2016
      Messages:
      16
      Likes Received:
      0
      Trophy Points:
      0
      Hey,

      all people say that "clear your cache" but how do I clear my cache ?

      thanks
       
    4. liyuejie

      liyuejie Member

      Joined:
      May 25, 2014
      Messages:
      48
      Likes Received:
      0
      Trophy Points:
      6
      task id 42119
      when I run this profile ,my druid always open map
       
    5. everything

      everything New Member

      Joined:
      Sep 2, 2016
      Messages:
      8
      Likes Received:
      0
      Trophy Points:
      0
      Hi. I still have no fix to my problem :
      [WQ] Looping profile incase we missed something
      [WQ] Looping profile incase we missed something
      [WQ] Looping profile incase we missed something

      Done everything that says in this forum, with updating svn and getting the plugin and everything, nothing happens. pls help me
       
    6. Alexeilol

      Alexeilol New Member

      Joined:
      Jun 26, 2013
      Messages:
      19
      Likes Received:
      0
      Trophy Points:
      0
      Inside the same folder as your Plugins one etc there is one called cache, just delete whatever is in there!
       
    7. Beuns

      Beuns New Member

      Joined:
      Oct 6, 2016
      Messages:
      16
      Likes Received:
      0
      Trophy Points:
      0
      Thank you very much
       
    8. Ehnoah

      Ehnoah Member

      Joined:
      Jan 15, 2010
      Messages:
      282
      Likes Received:
      3
      Trophy Points:
      18
      last update added some compile error

      PS: DIscrd invite not work anymore on first Thread.

      Code:
       [WQ] World Quest Auto Loader $Rev: 877 $2 compiler errors encountered in profile '[WQ] World Quest Auto Loader $Rev: 877 $'
      'CustomBehavior' xml element on line number 49 has following errors with code: public class Settings : Styx.Helpers.Settings
          {
              public static readonly string _settingsPath = Path.Combine(CharacterSettingsDirectory, "Profiles",
                  "NuokWorldQuestSettings.xml");
              private static Settings _instance;
              public static Settings Instance => _instance ?? (_instance = new Settings());
              public Settings() : base(_settingsPath)
              {
              }
              [Setting]
              [Styx.Helpers.DefaultValue(false)]
              public bool DoWanted { get; set; }
              [Setting]
              [Styx.Helpers.DefaultValue(false)]
              public bool DoPvP { get; set; }
              [Setting]
              [Styx.Helpers.DefaultValue(false)]
              public bool DoDangerQuests { get; set; }
              [Setting]   
              [Styx.Helpers.DefaultValue(false)]
              public bool DoElite { get; set; }
              [Setting]
              [Styx.Helpers.DefaultValue(false)]
              public bool DoWorldBosses { get; set; }
              [Setting]
              [Styx.Helpers.DefaultValue(true)]
              public bool DoProfessions { get; set; }
              [Setting]
              [Styx.Helpers.DefaultValue(false)]
              public bool DoWorkOrders { get; set; }
              [Setting]
              [Styx.Helpers.DefaultValue(true)]
              public bool ArtifactPower { get; set; }
              [Setting]
              [Styx.Helpers.DefaultValue(true)]
              public bool Equipment { get; set; }
              [Setting]
              [Styx.Helpers.DefaultValue(true)]
              public bool Blood { get; set; }
              [Setting]
              [Styx.Helpers.DefaultValue(true)]
              public bool OrderHall { get; set; }
              [Setting]
              [Styx.Helpers.DefaultValue(true)]
              public bool Gold { get; set; }
              [Setting]
              [Styx.Helpers.DefaultValue(true)]
              public bool Items { get; set; }
              [Setting]
              [Styx.Helpers.DefaultValue(true)]
              public bool Azsuna { get; set; }
              [Setting]
              [Styx.Helpers.DefaultValue(true)]
              public bool Valsharah { get; set; }
              [Setting]
              [Styx.Helpers.DefaultValue(true)]
              public bool Stormheim { get; set; }
              [Setting]
              [Styx.Helpers.DefaultValue(true)]
              public bool Suramar { get; set; }
              [Setting]
              [Styx.Helpers.DefaultValue(true)]
              public bool Highmountain { get; set; }
              [Setting]
              [Styx.Helpers.DefaultValue(false)]
              public bool EyeofAzshara { get; set; }
              [Setting]
              [Styx.Helpers.DefaultValue(true)]
              public bool Dalaran { get; set; }
              [Setting]
              [Styx.Helpers.DefaultValue(true)]
              public bool TheWardens { get; set; }
              [Setting]
              [Styx.Helpers.DefaultValue(true)]
              public bool CourtOfFarondis { get; set; }
              [Setting]
              [Styx.Helpers.DefaultValue(true)]
              public bool KirinTor { get; set; }
              [Setting]
              [Styx.Helpers.DefaultValue(true)]
              public bool HighmountainTribe { get; set; }
              [Setting]
              [Styx.Helpers.DefaultValue(true)]
              public bool TheNightfallen { get; set; }
              [Setting]
              [Styx.Helpers.DefaultValue(true)]
              public bool Valarjar { get; set; }
              [Setting]
              [Styx.Helpers.DefaultValue(true)]
              public bool Dreamweavers { get; set; }
              [Setting]
              [Styx.Helpers.DefaultValue(true)]
              public bool SkipHBRelog { get; set; }
              [Setting]
              [Styx.Helpers.DefaultValue(false)]
              public bool SVNUpdate { get; set; }
          }
      
      
      private HashSet<int> GetWorldQuestsByZone(int zone)
              {
                  var lua = $@"SetMapByID({zone})
      local ids = {{}}
      local taskInfo = C_TaskQuest.GetQuestsForPlayerByMapID({zone})
      if (taskInfo) then
      	for i, info  in ipairs(taskInfo) do
      		if HaveQuestData(info.questId) then
      			if QuestMapFrame_IsQuestWorldQuest(info.questId) then
                          tinsert (ids, info.questId )
                          end
                      end
                  end
             end
      return unpack(ids)";
                  var getResult = Lua.GetReturnValues(lua);
                  var list = new HashSet<int>();
                  foreach (var r in getResult)
                  {
                      list.Add(Lua.ParseLuaValue<int>(r));
                  }
                  return list;
              }
      
      
              public Dictionary<int, int> WorldQuest = new Dictionary<int, int>();
      
      
              public void Update()
              {
                  WorldQuest.Clear();
      
      
                  var zones = new HashSet<int>
                  {
                      1015,
                      1018,
                      1024,
                      1017,
                      1033,
                      1096,
                      1014
                  };
      
      
                  foreach (var z in zones)
                  {
                      var quest = GetWorldQuestsByZone(z);
                      foreach (var q in quest)
                      {
                          var t = QuestRewardType(q);
                          //return error = 0, gold = 1, artifactpower = 2, items = 3, blood = 4, currency = 5
                          if(t==1)
                              Logging.WriteDiagnostic($"Found {GetQuestName(q)} ({q}) in {z}, rewards Gold");
                          if(t==2)
                              Logging.WriteDiagnostic($"Found {GetQuestName(q)} ({q}) in {z}, rewards Artifact Power");
                          if(t == 3)
                          {
                              var rewards = GetReward(q);
                              Logging.WriteDiagnostic($"Found {GetQuestName(q)} ({q}) in {z}, rewards Item {rewards[0]} {rewards[1]}");
                          }
                          if(t==4)
                              Logging.WriteDiagnostic($"Found {GetQuestName(q)} ({q}) in {z}, rewards Blood of Sargeras");
                          if(t==5)
                              Logging.WriteDiagnostic($"Found {GetQuestName(q)} ({q}) in {z}, rewards Order Hall Resources");
                          if(t == 6)
                          {
                              var rewards = GetReward(q);
                              Logging.WriteDiagnostic($"Found {GetQuestName(q)} ({q}) in {z}, rewards Equipment {rewards[0]} {rewards[1]}");
                          }
                          WorldQuest.Add(q, t);
                      }
                  }
              }
      
      
              public bool OnQuest(int id)
              {
                  return WorldQuest.ContainsKey(id);
              }
      
      
              public bool HasPlugin => PluginManager.Plugins.FirstOrDefault(p => p.Name == "WorldQuestHelper") != null;
      
      
              public void EnablePlugin()
              {
                  var plugin = PluginManager.Plugins.FirstOrDefault(p => p.Name == "WorldQuestHelper");
                  if (plugin == null) return;
                  plugin.Enabled = false;
                  plugin.Enabled = true;
              }
      
      
              public void Log(string text)
              {
                  Logging.Write(System.Windows.Media.Colors.DodgerBlue, "[WQ] " + text);
              }
      
      
              public bool ZoneEnabled(int zoneId)
              {
      			if(zoneId == 1015)
                      return Settings.Instance.Azsuna;
              	if(zoneId == 1018)
                      return Settings.Instance.Valsharah;
                  if(zoneId ==  1017)
                      return Settings.Instance.Stormheim;
                  if(zoneId ==  1033)
                      return Settings.Instance.Suramar;
                  if(zoneId ==  1024)
                      return Settings.Instance.Highmountain;
                  if(zoneId ==  1096)
                       return Settings.Instance.EyeofAzshara;
                  if(zoneId ==  1014)
                       return Settings.Instance.Dalaran;
                  return false;
              }
      
      
      public int QuestRewardType(int questId)
              {
                  var questLua = $@"local numQuestCurrencies = GetNumQuestLogRewardCurrencies({ questId })
      local money = GetQuestLogRewardMoney({ questId})
      local artifactXP = GetQuestLogRewardArtifactXP({ questId})
      local numQuestRewards = GetNumQuestLogRewards({ questId})
      if numQuestCurrencies > 0 then return 5; end
      if money > 0 then return 1; end
      if artifactXP > 0 then return 2; end
      if numQuestRewards > 0 then
          local name, texture, numItems, quality, isUsable, itemID = GetQuestLogRewardInfo(1, { questId})
          if itemID == 124124 then return 4; end
          local itemName, itemLink, itemRarity, itemLevel, itemMinLevel, itemType, itemSubType, itemStackCount, itemEquipLoc, itemTexture = GetItemInfo(itemID)
          if (itemName ~= nil and itemType == 'Consumable' and itemSubType == 'Other') then return 2; end
          if (itemName ~= nil and itemType == 'Armor') then return 6; end
          if (itemName ~= nil and itemSubType == 'Artifact Relic') then return 6; end
          return 3; end
      return 0; ";
                  return Lua.GetReturnVal<int>(questLua, 0);
              }
      
      
              public bool PassesSettings(int questId)
              {
                  if(!Settings.Instance.DoElite && EliteQuest(questId))
                      return false;
                
                  //return error = 0, gold = 1, artifactpower = 2, items = 3, blood = 4, currency = 5, gear =  6
                  var rewardType = WorldQuest[questId];
                  if(rewardType == 1)
                      return Settings.Instance.Gold;
                  if (rewardType == 2)
                      return Settings.Instance.ArtifactPower;
                  if (rewardType == 3)
                      return Settings.Instance.Items;
                  if (rewardType == 4)
                      return Settings.Instance.Blood;
                  if (rewardType == 5)
                      return Settings.Instance.OrderHall;
                  if (rewardType == 6)
                      return Settings.Instance.Equipment;
                  return false;
              }
              public int TheWardens = 1894, CourtOfFarondis = 1900, Dreamweavers = 1883, KirinTor = 1090, HighmountainTribe = 1828, TheNightfallen = 1859, Valarjar = 1948;
      
      
              public int GetFactionId(int questId)
                  =>
                  Lua.GetReturnVal<int>($@"local title, factionId, capped = C_TaskQuest.GetQuestInfoByQuestID({ questId });
                  if (factionId) then
      return factionId
      end
      return 0", 0);
      
      
              public bool DoFaction(int questId)
              {
                  var faction = GetFactionId(questId);
                  if (faction == TheWardens)
                      return Settings.Instance.TheWardens;
                  if (faction == CourtOfFarondis)
                      return Settings.Instance.CourtOfFarondis;
                  if (faction == Dreamweavers)
                      return Settings.Instance.Dreamweavers;
                  if (faction == KirinTor)
                      return Settings.Instance.KirinTor;
                  if (faction == HighmountainTribe)
                      return Settings.Instance.HighmountainTribe;
                  if (faction == TheNightfallen)
                      return Settings.Instance.TheNightfallen;
                  if (faction == Valarjar)
                      return Settings.Instance.Valarjar;
                  return false;
              }
      
      
              public List<string> GetReward(int questId) =>
                  Lua.GetReturnValues($"local name, texture, numItems, quality, isUsable, itemID = GetQuestLogRewardInfo(1, { questId }); return name, itemID");
      
      
              public string GetQuestName(int questId) =>
                  Lua.GetReturnVal<string>($"local title, factionId, capped = C_TaskQuest.GetQuestInfoByQuestID({ questId }); return title; ", 0);
      
      
              public bool EliteQuest(int questId) => Lua.GetReturnVal<bool>($"return GetQuestTagInfo({ questId})", 4);
      
      
              public bool QuestCompletedInLog(int questId) => 
                      Lua.GetReturnVal<bool>($@"for questIndex = 1, GetNumQuestLogEntries() do
                          _, _, _, _, _, isComplete, _, questID = GetQuestLogTitle(questIndex);
                  if (questID == {questId}) then return isComplete; end end return false; ",  0);
      
      
              public async Task ForceTurnin(int questId, int npcId, float x, float y, float z)
              {
                  if (!QuestCompletedInLog(questId)) return;
                  var q = Quest.FromId();
                  if(q != null)
                      TreeRoot.StatusText = $"Turnin {q.Name}";
                  var turninNpc =
                      ObjectManager.GetObjectsOfType<WoWUnit>().FirstOrDefault(u => u.IsValid && u.Entry == npcId);
      
      
                  if (turninNpc == null)
                  {
                      TreeRoot.GoalText = $"Moving to {x} {y} {z}";
                      await CommonCoroutines.MoveTo(new Vector3(x, y, z));
                      return;
                  }
      
      
                  if (!GossipFrame.Instance.IsVisible && !QuestFrame.Instance.IsVisible)
                  {
                      if (!turninNpc.WithinInteractRange)
                      {
                          TreeRoot.GoalText = $"Moving to {turninNpc}";
                          await CommonCoroutines.MoveTo(turninNpc.Location);
                          return;
                      }
                      TreeRoot.GoalText = $"Interacting with {turninNpc}";
                      turninNpc.Interact();
                      await CommonCoroutines.SleepForRandomUiInteractionTime();
                  }
      
      
                  if (GossipFrame.Instance.IsVisible)
                  {
                      var quest = GossipFrame.Instance.ActiveQuests.FirstOrDefault(q => q.Id == questId);
                      if (quest == null) return;
                      Logging.Write($"Selecting {quest.Name} (GF)");
                      GossipFrame.Instance.SelectActiveGossipQuest(quest.Index);
                      GossipFrame.Instance.SelectActiveQuest(quest.Index);
                      await CommonCoroutines.SleepForRandomUiInteractionTime();
                      return;
                  }
      
      
                  if (!QuestFrame.Instance.IsVisible) return;
      
      
                  if (QuestFrame.Instance.CurrentShownQuestId == questId)
                  {
                      Logging.Write($"Completing {QuestFrame.Instance.CurrentShownQuest.Name}");
                      QuestFrame.Instance.SelectQuestReward(1);
                      await CommonCoroutines.SleepForRandomUiInteractionTime();
                      QuestFrame.Instance.CompleteQuest();
                      await CommonCoroutines.SleepForRandomUiInteractionTime();
                      return;
                  }
                  var questF = QuestFrame.Instance.ActiveQuests.FirstOrDefault(que => que.Id == questId);
                  if (questF == null) return;
                  Logging.Write($"Selecting {questF.Name} (QF)");
                  QuestFrame.Instance.SelectActiveGossipQuest(questF.Index);
                  QuestFrame.Instance.SelectActiveQuest(questF.Index);
                  await CommonCoroutines.SleepForRandomUiInteractionTime();
              }
      	1) There is no argument given that corresponds to the required formal parameter 'id' of 'Quest.FromId(uint)' at line 296
      
      
      	2) A local or parameter named 'q' cannot be declared in this scope because that name is used in an enclosing local scope to define a local or parameter at line 324
      
      
      
       
      Last edited: Oct 11, 2016
    9. everything

      everything New Member

      Joined:
      Sep 2, 2016
      Messages:
      8
      Likes Received:
      0
      Trophy Points:
      0
      New problem:

      2 compiler errors encountered in profile '[WQ] World Quest Auto Loader $Rev: 877 $'
      'CustomBehavior' xml element on line number 49 has following errors with code: public class Settings : Styx.Helpers.Settings
      {
      public static readonly string _settingsPath = Path.Combine(CharacterSettingsDirectory, "Profiles",
      "NuokWorldQuestSettings.xml");
      private static Settings _instance;
      public static Settings Instance => _instance ?? (_instance = new Settings());
      public Settings() : base(_settingsPath)
      {
      }
      [Setting]
      [Styx.Helpers.DefaultValue(false)]
      public bool DoWanted { get; set; }
      [Setting]
      [Styx.Helpers.DefaultValue(false)]
      public bool DoPvP { get; set; }
      [Setting]
      [Styx.Helpers.DefaultValue(false)]
      public bool DoDangerQuests { get; set; }
      [Setting]
      [Styx.Helpers.DefaultValue(false)]
      public bool DoElite { get; set; }
      [Setting]
      [Styx.Helpers.DefaultValue(false)]
      public bool DoWorldBosses { get; set; }
      [Setting]
      [Styx.Helpers.DefaultValue(true)]
      public bool DoProfessions { get; set; }
      [Setting]
      [Styx.Helpers.DefaultValue(false)]
      public bool DoWorkOrders { get; set; }
      [Setting]
      [Styx.Helpers.DefaultValue(true)]
      public bool ArtifactPower { get; set; }
      [Setting]
      [Styx.Helpers.DefaultValue(true)]
      public bool Equipment { get; set; }
      [Setting]
      [Styx.Helpers.DefaultValue(true)]
      public bool Blood { get; set; }
      [Setting]
      [Styx.Helpers.DefaultValue(true)]
      public bool OrderHall { get; set; }
      [Setting]
      [Styx.Helpers.DefaultValue(true)]
      public bool Gold { get; set; }
      [Setting]
      [Styx.Helpers.DefaultValue(true)]
      public bool Items { get; set; }
      [Setting]
      [Styx.Helpers.DefaultValue(true)]
      public bool Azsuna { get; set; }
      [Setting]
      [Styx.Helpers.DefaultValue(true)]
      public bool Valsharah { get; set; }
      [Setting]
      [Styx.Helpers.DefaultValue(true)]
      public bool Stormheim { get; set; }
      [Setting]
      [Styx.Helpers.DefaultValue(true)]
      public bool Suramar { get; set; }
      [Setting]
      [Styx.Helpers.DefaultValue(true)]
      public bool Highmountain { get; set; }
      [Setting]
      [Styx.Helpers.DefaultValue(false)]
      public bool EyeofAzshara { get; set; }
      [Setting]
      [Styx.Helpers.DefaultValue(true)]
      public bool Dalaran { get; set; }
      [Setting]
      [Styx.Helpers.DefaultValue(true)]
      public bool TheWardens { get; set; }
      [Setting]
      [Styx.Helpers.DefaultValue(true)]
      public bool CourtOfFarondis { get; set; }
      [Setting]
      [Styx.Helpers.DefaultValue(true)]
      public bool KirinTor { get; set; }
      [Setting]
      [Styx.Helpers.DefaultValue(true)]
      public bool HighmountainTribe { get; set; }
      [Setting]
      [Styx.Helpers.DefaultValue(true)]
      public bool TheNightfallen { get; set; }
      [Setting]
      [Styx.Helpers.DefaultValue(true)]
      public bool Valarjar { get; set; }
      [Setting]
      [Styx.Helpers.DefaultValue(true)]
      public bool Dreamweavers { get; set; }
      [Setting]
      [Styx.Helpers.DefaultValue(true)]
      public bool SkipHBRelog { get; set; }
      [Setting]
      [Styx.Helpers.DefaultValue(false)]
      public bool SVNUpdate { get; set; }
      }

      private HashSet<int> GetWorldQuestsByZone(int zone)
      {
      var lua = $@"SetMapByID({zone})
      local ids = {{}}
      local taskInfo = C_TaskQuest.GetQuestsForPlayerByMapID({zone})
      if (taskInfo) then
      for i, info in ipairs(taskInfo) do
      if HaveQuestData(info.questId) then
      if QuestMapFrame_IsQuestWorldQuest(info.questId) then
      tinsert (ids, info.questId )
      end
      end
      end
      end
      return unpack(ids)";
      var getResult = Lua.GetReturnValues(lua);
      var list = new HashSet<int>();
      foreach (var r in getResult)
      {
      list.Add(Lua.ParseLuaValue<int>(r));
      }
      return list;
      }

      public Dictionary<int, int> WorldQuest = new Dictionary<int, int>();

      public void Update()
      {
      WorldQuest.Clear();

      var zones = new HashSet<int>
      {
      1015,
      1018,
      1024,
      1017,
      1033,
      1096,
      1014
      };

      foreach (var z in zones)
      {
      var quest = GetWorldQuestsByZone(z);
      foreach (var q in quest)
      {
      var t = QuestRewardType(q);
      //return error = 0, gold = 1, artifactpower = 2, items = 3, blood = 4, currency = 5
      if(t==1)
      Logging.WriteDiagnostic($"Found {GetQuestName(q)} ({q}) in {z}, rewards Gold");
      if(t==2)
      Logging.WriteDiagnostic($"Found {GetQuestName(q)} ({q}) in {z}, rewards Artifact Power");
      if(t == 3)
      {
      var rewards = GetReward(q);
      Logging.WriteDiagnostic($"Found {GetQuestName(q)} ({q}) in {z}, rewards Item {rewards[0]} {rewards[1]}");
      }
      if(t==4)
      Logging.WriteDiagnostic($"Found {GetQuestName(q)} ({q}) in {z}, rewards Blood of Sargeras");
      if(t==5)
      Logging.WriteDiagnostic($"Found {GetQuestName(q)} ({q}) in {z}, rewards Order Hall Resources");
      if(t == 6)
      {
      var rewards = GetReward(q);
      Logging.WriteDiagnostic($"Found {GetQuestName(q)} ({q}) in {z}, rewards Equipment {rewards[0]} {rewards[1]}");
      }
      WorldQuest.Add(q, t);
      }
      }
      }

      public bool OnQuest(int id)
      {
      return WorldQuest.ContainsKey(id);
      }

      public bool HasPlugin => PluginManager.Plugins.FirstOrDefault(p => p.Name == "WorldQuestHelper") != null;

      public void EnablePlugin()
      {
      var plugin = PluginManager.Plugins.FirstOrDefault(p => p.Name == "WorldQuestHelper");
      if (plugin == null) return;
      plugin.Enabled = false;
      plugin.Enabled = true;
      }

      public void Log(string text)
      {
      Logging.Write(System.Windows.Media.Colors.DodgerBlue, "[WQ] " + text);
      }

      public bool ZoneEnabled(int zoneId)
      {
      if(zoneId == 1015)
      return Settings.Instance.Azsuna;
      if(zoneId == 1018)
      return Settings.Instance.Valsharah;
      if(zoneId == 1017)
      return Settings.Instance.Stormheim;
      if(zoneId == 1033)
      return Settings.Instance.Suramar;
      if(zoneId == 1024)
      return Settings.Instance.Highmountain;
      if(zoneId == 1096)
      return Settings.Instance.EyeofAzshara;
      if(zoneId == 1014)
      return Settings.Instance.Dalaran;
      return false;
      }

      public int QuestRewardType(int questId)
      {
      var questLua = $@"local numQuestCurrencies = GetNumQuestLogRewardCurrencies({ questId })
      local money = GetQuestLogRewardMoney({ questId})
      local artifactXP = GetQuestLogRewardArtifactXP({ questId})
      local numQuestRewards = GetNumQuestLogRewards({ questId})
      if numQuestCurrencies > 0 then return 5; end
      if money > 0 then return 1; end
      if artifactXP > 0 then return 2; end
      if numQuestRewards > 0 then
      local name, texture, numItems, quality, isUsable, itemID = GetQuestLogRewardInfo(1, { questId})
      if itemID == 124124 then return 4; end
      local itemName, itemLink, itemRarity, itemLevel, itemMinLevel, itemType, itemSubType, itemStackCount, itemEquipLoc, itemTexture = GetItemInfo(itemID)
      if (itemName ~= nil and itemType == 'Consumable' and itemSubType == 'Other') then return 2; end
      if (itemName ~= nil and itemType == 'Armor') then return 6; end
      if (itemName ~= nil and itemSubType == 'Artifact Relic') then return 6; end
      return 3; end
      return 0; ";
      return Lua.GetReturnVal<int>(questLua, 0);
      }

      public bool PassesSettings(int questId)
      {
      if(!Settings.Instance.DoElite && EliteQuest(questId))
      return false;

      //return error = 0, gold = 1, artifactpower = 2, items = 3, blood = 4, currency = 5, gear = 6
      var rewardType = WorldQuest[questId];
      if(rewardType == 1)
      return Settings.Instance.Gold;
      if (rewardType == 2)
      return Settings.Instance.ArtifactPower;
      if (rewardType == 3)
      return Settings.Instance.Items;
      if (rewardType == 4)
      return Settings.Instance.Blood;
      if (rewardType == 5)
      return Settings.Instance.OrderHall;
      if (rewardType == 6)
      return Settings.Instance.Equipment;
      return false;
      }
      public int TheWardens = 1894, CourtOfFarondis = 1900, Dreamweavers = 1883, KirinTor = 1090, HighmountainTribe = 1828, TheNightfallen = 1859, Valarjar = 1948;

      public int GetFactionId(int questId)
      =>
      Lua.GetReturnVal<int>($@"local title, factionId, capped = C_TaskQuest.GetQuestInfoByQuestID({ questId });
      if (factionId) then
      return factionId
      end
      return 0", 0);

      public bool DoFaction(int questId)
      {
      var faction = GetFactionId(questId);
      if (faction == TheWardens)
      return Settings.Instance.TheWardens;
      if (faction == CourtOfFarondis)
      return Settings.Instance.CourtOfFarondis;
      if (faction == Dreamweavers)
      return Settings.Instance.Dreamweavers;
      if (faction == KirinTor)
      return Settings.Instance.KirinTor;
      if (faction == HighmountainTribe)
      return Settings.Instance.HighmountainTribe;
      if (faction == TheNightfallen)
      return Settings.Instance.TheNightfallen;
      if (faction == Valarjar)
      return Settings.Instance.Valarjar;
      return false;
      }

      public List<string> GetReward(int questId) =>
      Lua.GetReturnValues($"local name, texture, numItems, quality, isUsable, itemID = GetQuestLogRewardInfo(1, { questId }); return name, itemID");

      public string GetQuestName(int questId) =>
      Lua.GetReturnVal<string>($"local title, factionId, capped = C_TaskQuest.GetQuestInfoByQuestID({ questId }); return title; ", 0);

      public bool EliteQuest(int questId) => Lua.GetReturnVal<bool>($"return GetQuestTagInfo({ questId})", 4);

      public bool QuestCompletedInLog(int questId) =>
      Lua.GetReturnVal<bool>($@"for questIndex = 1, GetNumQuestLogEntries() do
      _, _, _, _, _, isComplete, _, questID = GetQuestLogTitle(questIndex);
      if (questID == {questId}) then return isComplete; end end return false; ", 0);

      public async Task ForceTurnin(int questId, int npcId, float x, float y, float z)
      {
      if (!QuestCompletedInLog(questId)) return;
      var q = Quest.FromId();
      if(q != null)
      TreeRoot.StatusText = $"Turnin {q.Name}";
      var turninNpc =
      ObjectManager.GetObjectsOfType<WoWUnit>().FirstOrDefault(u => u.IsValid && u.Entry == npcId);

      if (turninNpc == null)
      {
      TreeRoot.GoalText = $"Moving to {x} {y} {z}";
      await CommonCoroutines.MoveTo(new Vector3(x, y, z));
      return;
      }

      if (!GossipFrame.Instance.IsVisible && !QuestFrame.Instance.IsVisible)
      {
      if (!turninNpc.WithinInteractRange)
      {
      TreeRoot.GoalText = $"Moving to {turninNpc}";
      await CommonCoroutines.MoveTo(turninNpc.Location);
      return;
      }
      TreeRoot.GoalText = $"Interacting with {turninNpc}";
      turninNpc.Interact();
      await CommonCoroutines.SleepForRandomUiInteractionTime();
      }

      if (GossipFrame.Instance.IsVisible)
      {
      var quest = GossipFrame.Instance.ActiveQuests.FirstOrDefault(q => q.Id == questId);
      if (quest == null) return;
      Logging.Write($"Selecting {quest.Name} (GF)");
      GossipFrame.Instance.SelectActiveGossipQuest(quest.Index);
      GossipFrame.Instance.SelectActiveQuest(quest.Index);
      await CommonCoroutines.SleepForRandomUiInteractionTime();
      return;
      }

      if (!QuestFrame.Instance.IsVisible) return;

      if (QuestFrame.Instance.CurrentShownQuestId == questId)
      {
      Logging.Write($"Completing {QuestFrame.Instance.CurrentShownQuest.Name}");
      QuestFrame.Instance.SelectQuestReward(1);
      await CommonCoroutines.SleepForRandomUiInteractionTime();
      QuestFrame.Instance.CompleteQuest();
      await CommonCoroutines.SleepForRandomUiInteractionTime();
      return;
      }
      var questF = QuestFrame.Instance.ActiveQuests.FirstOrDefault(que => que.Id == questId);
      if (questF == null) return;
      Logging.Write($"Selecting {questF.Name} (QF)");
      QuestFrame.Instance.SelectActiveGossipQuest(questF.Index);
      QuestFrame.Instance.SelectActiveQuest(questF.Index);
      await CommonCoroutines.SleepForRandomUiInteractionTime();
      }
      1) There is no argument given that corresponds to the required formal parameter 'id' of 'Quest.FromId(uint)' at line 296

      2) A local or parameter named 'q' cannot be declared in this scope because that name is used in an enclosing local scope to define a local or parameter at line 324
       
    10. peteyboy23

      peteyboy23 Member

      Joined:
      Jan 15, 2010
      Messages:
      566
      Likes Received:
      3
      Trophy Points:
      18
      Delete the "WorldQuestSettings" folder under the "Plugins" directory under where you have HB installed. From within wherever you created the World Quest SVN, there's a "Plugin" directory. Copy that into the HB\Plugins\ directory. Make sense?
       
    11. peteyboy23

      peteyboy23 Member

      Joined:
      Jan 15, 2010
      Messages:
      566
      Likes Received:
      3
      Trophy Points:
      18
    12. peteyboy23

      peteyboy23 Member

      Joined:
      Jan 15, 2010
      Messages:
      566
      Likes Received:
      3
      Trophy Points:
      18
      Either the bot has completed all World quests that you've defined (and it's able to do) or (more likely) you haven't defined these. On the HB screen, once you have the Plugin copied over, and have restarted HB... there's a World Quests button now. Click it, and configure it how you'd like it to run. Be very careful with selecting WORLD bosses, because unless you get really lucky, you'll likely be trying to solo a world boss.
       
    13. peteyboy23

      peteyboy23 Member

      Joined:
      Jan 15, 2010
      Messages:
      566
      Likes Received:
      3
      Trophy Points:
      18
      If it just opens and closes the map, delete your cache. Instructions here: Honorbuddy:HelpDesk:Cache corruption problems - The Buddy Wiki

      I had this same exact problem, and deleting the cache worked perfectly. I even wrote a .bat file to do it. Your directories may be different than mine, so you'll have to test and adjust yours. Save the below as something like "delcache.bat" and run as administrator. Enjoy.

      rmdir /s /q "%LocalAppData%\Bossland\Honorbuddy"
      rmdir /s /q "C:\Users\%USER%\AppData\Local\Bossland\Honorbuddy"
      rmdir /s /q "C:\Users\%USER%\Desktop\HB1\cache"
      rmdir /s /q "C:\Program Files (x86)\World of Warcraft\Cache"
      rmdir /s /q "C:\Program Files (x86)\World of Warcraft\Data\Cache"
      rmdir /s /q "C:\ProgramData\Blizzard Entertainment"
       
    14. zehelfenris

      zehelfenris New Member

      Joined:
      Oct 4, 2016
      Messages:
      5
      Likes Received:
      0
      Trophy Points:
      0
      im sorry if this question been asked before but there is so many pages that its too much to read to check but would it be possible to do so the profile starts by focusing on emissary world quests before doing rest?
       
    15. everything

      everything New Member

      Joined:
      Sep 2, 2016
      Messages:
      8
      Likes Received:
      0
      Trophy Points:
      0
      I got this and I've checked out to do artifact power quests only, and I got many of those. Still this comes up
       
    16. peteyboy23

      peteyboy23 Member

      Joined:
      Jan 15, 2010
      Messages:
      566
      Likes Received:
      3
      Trophy Points:
      18
      Again, just a user here, but I would imagine that the remaining world quests aren't supported by the profile.
       
    17. peteyboy23

      peteyboy23 Member

      Joined:
      Jan 15, 2010
      Messages:
      566
      Likes Received:
      3
      Trophy Points:
      18
      I would imagine you'd have to run the bot with everything else deselected for starters, and wait until it was done with those. Then stop the bot and add those additional selections. Sorry, probably not ideal, but there it is. I don't see any way to prioritize X quest type over Y.
       
    18. skeeper

      skeeper New Member

      Joined:
      Dec 22, 2012
      Messages:
      86
      Likes Received:
      1
      Trophy Points:
      0
      Retake the Skyhorn its a bit bugged, keep running upwards and downwards
       
    19. amarissa

      amarissa Member

      Joined:
      May 16, 2012
      Messages:
      70
      Likes Received:
      0
      Trophy Points:
      6
      I cant get on discord, invite expired..

      Loading Profile [42018] Those Beyond Redemption - WiN!
      MoveTo failed to move to the location: <990.3676, 6099.369, 99.38569>


      And it keeps opening map over and over again..
      Anyone have any idea what I can do to fix this??
       
    20. Morx

      Morx New Member

      Joined:
      Jun 29, 2012
      Messages:
      139
      Likes Received:
      0
      Trophy Points:
      0
      WQ: Temple Defense in Val'sharah, you have to add some blackout zones, or whatever it's called to avoid a certain area because there is a HUGE elite in the area that will 2 shot you dead every time and it runs back and fourth along his path.

      Name of the huge elite is Gravax the Desecrator.

      Thanks.
       

    Share This Page