Jump to content

Matenia

Elite user
  • Posts

    2230
  • Joined

  • Last visited

Everything posted by Matenia

  1. There's a blacklist editor (or add it to your profile blacklist with the profile editor). If you're using HMP, there's a blacklist (by id) in the settings. HMP log also logs vendors with ID so it's easy to blacklist.
  2. IsValid checks if it still exists in objectmanager. You never need it, unless you store a unit over a long period of time. Because when you move 100 yards from the point of unit acquire, it might have disappeared from the objectmanager and not been updated either.
  3. This is great. Now I don't have to use a Lua hook anymore. Otherwise you can use a Lua hook to create a race condition between your selection code and ANY code turning in the quest: using System; using System.Collections.Generic; using System.ComponentModel; using System.Linq; using System.Reflection; using System.Security.Cryptography; using System.Text.RegularExpressions; using System.Threading; using System.Threading.Tasks; using DatabaseManager.Enums; using robotManager.Events; using robotManager.FiniteStateMachine; using robotManager.Helpful; using robotManager.Products; using wManager; using wManager.Wow.Bot.Tasks; using wManager.Wow.Class; using wManager.Wow.Enums; using wManager.Wow.Helpers; using wManager.Wow.ObjectManager; public class QuestRewardSelector { public static string TooltipName = "QuestItemCompareTooltip"; public static void Start() { TooltipName = LuaVariableSettings.CurrentSetting.QuestToolTipName; RegisterHook(); CreateTooltip(); EventsLua.AttachEventLua((LuaEventsId) Enum.Parse(typeof(LuaEventsId), "QUEST_COMPLETE"), QuestCompleteHandler); } public static void Stop() { } public static void CreateTooltip() { Lua.LuaDoString($@" if not {TooltipName} then {TooltipName} = CreateFrame('GameTooltip', '{TooltipName}', nil, 'GameTooltipTemplate'); {TooltipName}:SetOwner(UIParent, 'ANCHOR_NONE'); end "); } public static void RegisterHook() { Lua.LuaDoString($@" if (not {LuaVariableSettings.CurrentSetting.QuestHookName}) then _OriginalQuestCompleteOnClick = QuestFrameCompleteQuestButton:GetScript(""OnClick""); function hook_QuestComplete(self, button, arg2, arg3) self = this; if (button == ""FORCE"") then --DEFAULT_CHAT_FRAME:AddMessage('Forcing quest acceptance!'); _OriginalQuestCompleteOnClick(self, button); else C_Timer.After(2500, function() --DEFAULT_CHAT_FRAME:AddMessage('Delay quest turn in by 2500ms'); _OriginalQuestCompleteOnClick(self, button); end); end end QuestFrameCompleteQuestButton:SetScript(""OnClick"", hook_QuestComplete); _GetQuestReward = GetQuestReward; function GetQuestReward(index, force) if(force) then return _GetQuestReward(index); else C_Timer.After(2500, function() --DEFAULT_CHAT_FRAME:AddMessage('Delay quest turn in by 2500ms'); return _GetQuestReward(index); end); end end --DEFAULT_CHAT_FRAME:AddMessage('Quest hook initiated'); {LuaVariableSettings.CurrentSetting.QuestHookName} = true; end "); } private static void QuestCompleteHandler(object context) { Lua.LuaDoString("QuestFrameCompleteQuestButton:Disable();"); PluginLog.Log("About to complete quest - INTERCEPT!"); SelectQuestItem(); Lua.LuaDoString("QuestFrameCompleteQuestButton:Enable();"); //fallback Lua.LuaDoString($"_GetQuestReward(1);"); } private static void SelectQuestItem() { try { int questRewards = Lua.LuaDoString<int>("return GetNumQuestChoices()"); if (questRewards == 0) { return; } Dictionary<ParsedItem, int> itemRewards = new Dictionary<ParsedItem, int>(); for (int i = 1; i <= questRewards; i++) { Lua.LuaDoString($@" {TooltipName}:Hide(); {TooltipName}:SetOwner(UIParent, 'ANCHOR_NONE'); {TooltipName}:ClearLines(); {TooltipName}:SetQuestItem(""choice"", {i}); "); ParsedItem item = ItemParser.ParseCurrentTooltip(TooltipName, true); if (item.isUsable) { itemRewards.Add(item, i); } } ItemComparator comparator = new ItemComparator(StatWeights.ForClass(ObjectManager.Me.WowClass)); ParsedItem bestItem = comparator.FindBestItem(itemRewards.Keys.ToList()); int index = itemRewards[bestItem]; PluginLog.Log("Found best item " + bestItem.name + " as reward number: " + index); Lua.LuaDoString($@" --QuestFrameCompleteQuestButton:Enable(); _GetQuestReward({index}); "); Thread.Sleep(1000); } catch (Exception e) { Logging.WriteError("" + e); } } private static async void SelectQuestItemAsync() { await Task.Run(() => { SelectQuestItem(); }); } }
  4. It's not an option. Either an addon or wrobot plugin. Or his own code that clicks something like StaticPopup1Button1, which is what appears when you get an invite ?
  5. You think the base bot should be free? You're absolutely fucking crazy and entitled if you think that. Most bots never came with free profiles, rotations, etc. Especially not across 7 versions of wow that are fundamentally different. Interacting with the game, memory reading/writing/etc is the hardest part. None of the content creators on the forums are capable of that besides Droidz. He easily deserves the most money out of anyone.
  6. You will need to use Lua to analyze COMBAT_LOG_EVENT_UNFILTERED
  7. Thank you, I did something similar but this should help in case it reloads the engine (Quester reload etc).
  8. OnAddState does not work it seems. It's never called inside the plugin. OnStartEngine, all states are missing.
  9. Yes, instead of executing the code in a loop, only execute it once or on level up.
  10. When I use OnStartEngine, none of the states have been added yet and I need to get their priority (and in some cases, I need to add NextStates). I will try OnAddState I think
  11. Right now, I use FiniteStateMachine Events and add new states. This causes issues when not all states have been loaded correctly and for some people if the Quester uses a LoadProfile or Reload step, it "breaks" the FSM context because state are already added. Can you add some method I can utilize to add states to the FSM, for example "aftersuccessfulstart" or something?
  12. If you set up shitty vendors or trainers and your bot ends up pathing to fucking stormwind or something, yeah you're gonna path through high-level zones and die. Pathfinding just means it's picking the shortest path available. That's why most profiles add transports as offmeshes and some of the more advanced profiles even do manual training at specific steps. The bot does exactly what it advertises itself as. But if you aren't willing to weed through the free tutorials and learn how to use it AND not willing to pay one of the content creators to do that work for you, then you'll have to go through trial and error yourself.
  13. Do not explicitly set ForceToTown back to false. It's not a blocking call and after the vendor run was successful, the ToTown state sets it back itself.
  14. That'S why I said, don't use the AH bot. Either use the AH API or do it yourself (interact with NPC, then execute your own scripts). You need to either create your own Product or use CustomProfile.
  15. I think you need to turn this into a custom script entirely, not with the AH bot
  16. If you'd joined Discord to get support, there's already an announcement that I introduced this bug 2 days ago and will fix it when I get home tonight.
  17. Plus you don't even have a wrobot license, how on earth did you end up here?
  18. They can use different methods of detection, same way they can detect EWT without necessarily needing to search for frame names. Anything that's pubically available has a (high) risk of detection because they can freely look at what is done to bypass their detection or even what the original method of injection is. So it's safe for now and that's it.
  19. Probably your anti-virus
  20. Considering he asked about it and people frequently make threads assuming they can use it to bot on classic, I'm well within reason to correct him on that.
  21. You should be able to cast through trees. Dotting is performing a LoS check. It's your server incorrectly handling m2 objects.
  22. Sometimes it returns true if you can ignore the mobs attacking you, for example if you're on mount with the correct options or you're supposed to ignore pulls while traveling or if Conditions.ForceIgnoreIsAttacked is activated. I recommend you just decompile the binaries and see for yourself. Even with the code being obfuscated, you can usually see these simple things.
  23. If there's a timeleft on it, they're yours in TBC. I'm sure you've noticed this before. You can only see timers on auras applied by you
  24. This is a private server bot, not for retail classic...
  25. For what you want to do, grinder is not the correct product. You need to use Quester with an EasyQuest profile containing all the steps you want done. You'll never be able to do what you want with grinder. If you're having problems with HMP, please don't try to figure them out in an unrelated thread and contact me on Discord. You can (and NEED to) send a full log file. #faq channel will help you with that.
×
×
  • Create New...