Jump to content

Matenia

Elite user
  • Posts

    2226
  • Joined

  • Last visited

Reputation Activity

  1. Thanks
    Matenia got a reaction from Dwink in Ignore Mobs Whilst Mounted   
    Disable your fightclass entirely and see if the bot still fights back against enemies while on ground mount
  2. Like
    Matenia reacted to Dwink in Ignore Mobs Whilst Mounted   
    was integrated into the profile have worked out how to disable but thanks for the reply :) 
  3. Like
    Matenia reacted to Inf3ctious in Thoradin's Wall (Hillsbrad/Arathi wall)   
    The meshes do not seem to account for the solid wall that separates Hillsbrad Foothills from Arathi Highlands. I will often find the bot running into the wall, it looks like wrobot thinks there is a gap in the wall somewhere south of the gate.
  4. Thanks
    Matenia got a reaction from tdalton1 in My Game Freezes Until I Stop Bot   
    I responded to this yesterday. This is not the complete error message, so I can only guess - but I'm not going into great detail like I did yesterday.
    Enable Lua to move or start wRobot with "No Frame Lock" option. Either should hopefully work.
    The problem is that wRobot sends keybinds to the client while while the frame is locked. This causes a deadlock. If you use any of my fightclasses, they all automatically enable Lua to move - you can disable framelock in the settings.
    If you profile disables Lua to move (first step) in quester as RunCode, for example) this could be the cause. 
  5. Like
    Matenia got a reaction from PirriPirri in My Game Freezes Until I Stop Bot   
    I responded to this yesterday. This is not the complete error message, so I can only guess - but I'm not going into great detail like I did yesterday.
    Enable Lua to move or start wRobot with "No Frame Lock" option. Either should hopefully work.
    The problem is that wRobot sends keybinds to the client while while the frame is locked. This causes a deadlock. If you use any of my fightclasses, they all automatically enable Lua to move - you can disable framelock in the settings.
    If you profile disables Lua to move (first step) in quester as RunCode, for example) this could be the cause. 
  6. Like
    Matenia got a reaction from PirriPirri in Vanilla upgrade profile is too small   
    Also, no he should NOT open source it. It took almost a year to get to the point where it is right now. Many people have shared it before, which lead to it even being taken down entirely.
    He keeps testing and improving, all communication happens on Discord. In fact, a select few people ARE allowed to contribute to his private Git respository. But not random people, some who have made a name for themselves before.
    If it was freely available, everyone would just share it again, use different versions and cry everywhere.  
  7. Like
    Matenia reacted to Droidz in Flightmaster distance   
    Hello, it is the minimum distance (2d) between your character and current destination to take taxi (if distance is less than FlightMasterTaxiDistance WRobot will ignore flightmaster during traveling).
  8. Like
    Matenia got a reaction from x11r6 in Bot keeps running toward a tree to get to an unreachable mob   
  9. Like
    Matenia reacted to Droidz in Stop quest turn in and inject my own code?   
    WRobot use lua to turnin quest.
    You can try code like: 
    ulong lastTarget = 0; wManager.Events.InteractEvents.OnInteractPulse += (target, cancelable) => { try { if (lastTarget == target) return; var o = ObjectManager.GetObjectByGuid(target); if (o.IsValid && o.Type == WoWObjectType.Unit) { var unit = new WoWUnit(o.GetBaseAddress); if (unit.IsValid && unit.NpcMarker == NpcMarker.YellowQuestion) { lastTarget = target; Interact.InteractGameObject(target); // your turnin code here } } } catch { } }; } or
    ulong lastTarget = 0; wManager.Events.InteractEvents.OnInteractPulse += (target, cancelable) => { try { if (lastTarget == target) return; if (!Logging.Status.StartsWith("Quester > TurnIn")) return; var o = ObjectManager.GetObjectByGuid(target); if (o.IsValid && o.Type == WoWObjectType.Unit) { var unit = new WoWUnit(o.GetBaseAddress); if (unit.IsValid) { lastTarget = target; cancelable.Cancel = true; Interact.InteractGameObject(target); // your turnin code here } } } catch { } };  
  10. Confused
    Matenia got a reaction from BetterSister in Stop quest turn in and inject my own code?   
    Hey @Droidz,
    currently, I'm trying to execute my own code instead of letting wRobot finish the quest (very last step - select item and complete quest).
    I've been doing it like this:
    EventsLua.AttachEventLua((LuaEventsId) Enum.Parse(typeof(LuaEventsId), "QUEST_COMPLETE"), QuestCompleteHandler); private static void QuestCompleteHandler(object context) { PluginLog.Log("About to complete quest - INTERCEPT!"); SelectQuestItem(); } private static void SelectQuestItem() { //my logic to turn in quest Lua.LuaDoString($@" QuestRewardItem{index}:Click(); QuestFrameCompleteQuestButton:Click(); "); } However, it seems wRobot will still be faster in turning in the quest and although I can correctly log which is the best item to choose, wRobot will select another item and finish the quest.
    If I run this code in wRotation and manually open the quest dialog, it works 100%.

    How can I stop the quester from turning it at that point? I've tried using Products.InPause = true and pausing the bot before selecting the quest item myself, but it doesn't seem to work.
  11. Like
    Matenia got a reaction from ScripterQQ in Autoattack breaking stealth (rogue, druid) and slow targeting enemies   
    You will need to make Cheap Shot itself Lua.
    Then in one Lua execution, you put:
     
    StopAttack(); CastSpellByName("Cheap Shot"); of course you need to add condition so it doesn't try to stop your attacks while you're out of stealth etc. Rather check you're stealthed/cheap shot isUsable etc.
  12. Like
    Matenia got a reaction from ScripterQQ in Autoattack breaking stealth (rogue, druid) and slow targeting enemies   
    Mount Distance 20 means if anything is 20 yards or further away, it will mount up instead of walking.
    There's no real way to prevent "right click" sine that's how Click To Move works.

    Instead, add Lua "StopAttack();" spam so that it won't break stealth with autoattack before cheap shotting.
     
  13. Like
    Matenia reacted to Droidz in [Question]CustomClass   
    Hello, if you use dll fightclass you can:
    var dllFile = System.IO.File.ReadAllBytes("fightclass.dll"); var assembly = System.Reflection.Assembly.Load(dllFile); var obj = assembly.CreateInstance("Main", false); if (obj is ICustomClass instanceFromOtherAssembly) { instanceFromOtherAssembly.Initialize(); } else you need to use CompileAssemblyFromSource
  14. Like
    Matenia got a reaction from BetterSister in [Solved] Hunter 0 Ammo log out   
    Why not just buy more ammo automatically?
     
  15. Like
    Matenia got a reaction from eniac86 in C# Framework for wRobot 1.12.1 Fightclasses   
    Hey guys,
    I recently ported some of my fightclass framework to vanilla. I'm happy with where it currently is but will probably push updates.
    You can find a working version (and any future update) in my repository on GitHub. This framework is intended for all the developers on the wRobot Discord channel who keep working on the same issues over and over again. Hopefully this will encourage people to make pull requests and contribute to an overall community effort. 
    Also, hopefully it will help with some of the more regular Discord users not having to answer a lot of questions over and over.
    Enjoy:
    https://github.com/Schaka/VanillaFightclassFramework
  16. Like
    Matenia got a reaction from arkhan in C# Framework for wRobot 1.12.1 Fightclasses   
    Hey guys,
    I recently ported some of my fightclass framework to vanilla. I'm happy with where it currently is but will probably push updates.
    You can find a working version (and any future update) in my repository on GitHub. This framework is intended for all the developers on the wRobot Discord channel who keep working on the same issues over and over again. Hopefully this will encourage people to make pull requests and contribute to an overall community effort. 
    Also, hopefully it will help with some of the more regular Discord users not having to answer a lot of questions over and over.
    Enjoy:
    https://github.com/Schaka/VanillaFightclassFramework
  17. Like
    Matenia reacted to Avvi in Avvi's C# Tips & Tricks with Helpful Code Snippets   
    Hi all,
    I figured I'd post some things that I have learned during my time of developing in C#. Perhaps some of this is obvious for some of the more experienced WRobot C# writers, but for me, I had to do a lot of forum searching and experimenting to make progress on any of my work. 
     
    How do I get started?
    Please see this post by @Droidz
     
     
    How can I see what Functions are available to me in the WRobot API?
    I recommend using some sort of decompiler in order to see what functions are available in the WRobot API. That is, use something such as dotPeek from jetbrains. See this URL: https://www.jetbrains.com/decompiler/ . Once you have this downloaded, open  the WRobot Binaries located in the (C:\WRobot\Bin) folder in dotPeek. I cannot even begin to explain how many times the recompiled helped me find useful things I could re-use. As a quick tip, I would suggest taking a look at the wManager.wManager.Wow.Helpers functions that are available. Anything listed as public static <variable type>  will be available to use from a Plugin/Profile/Fightclass etc.
     
    What if WRobot doesn't have an available function that I will need?
    WRobot doesn't have everything instantly available, so you may need to resort to using some Lua Functions to get information back from the WoW Client. An example of this that I ran into at some point was getting the number of Character Macros someone has.. Of course this is very specific, but please bear with me for the sake of this example :).
    WoW Lua Reference:  http://wowprogramming.com/docs/api_categories
    Using Lua in C#:
    This snippet will return a List of integers and set the C# variable numberOfMacros  equal to the returned list of the DoString function. To be more specific, it will provide a list of the number of Global account Macros , and the number of Personal Character Macros.
    var numberOfMacros = Lua.LuaDoString<List<int>>("return numCharacterMacros");  
    The below will return just the number Character Macros someone has.  If you need a specific variable from a Lua Function, then do the following: 
    var numPersonalMacros = Lua.LuaDoString<int>("local numAccountMacros, numCharacterMacros = GetNumMacros(); return numCharacterMacros"); The above snippet will set the C# variable numPersonalMacros equal to numCharacterMacros from the lua return value.
    Using a Variable in the Lua.LuaDoString.  The below will return the text body of the macro that has the id of 121.
    var _macroID = 121 string macroBody = Lua.LuaDoString<string>("return GetMacroBody(" + _macroID + ")");  
     
    Executing Lua Code in C#
    This  will leave the party (if the player is in one).
    wManager.Wow.Helpers.Lua.RunMacroText("/run LeaveParty()");  
    What is the difference between Lua.LuaDoString() and RunMacroText()? 
    The difference is in can be understand in how you think about them. Lua.LuaDoString should be seen as a way to retrieve information.. More specifically, the Lua.LuaDoString's purpose is to have a value returned to it, so that you can assign it to a C# Variable. RunMacroText can be used to do something in game. More specifically, RunMacroText should be used when trying to run some sort of in-game script (such as /cast spell).
     
    Plugin Template C#: Plugin-Template.cs
    I have attached a basic plugin template that can be used. In it, I have provided an example of:
    A Basic Implementation of the wManager.Plugin.IPlugin Class (including Settings/Initialize/Dispose) Basic loop that will occur while WRobot is running Settings that can be configured from Plugin Page A Category/Short Description for the Plugin Settings An example of Watching for Game Events. An example of OnRunState / OnAfterRunState for WRobot States Watching For Game Events
    Sometimes you may find that you need to wait for something to occur in game before you can take a specific action. In WoW / WRobot world, these things are called events. Below are two examples of events. The first event will occur when either the Group Loot Settings change, or a Player Enters/Joins the current Party.The second Event will occur when a System Message is received.  I recommend adding this watchForEvents Function in the Initialize function of a plugin, or somewhere where it will only be called once. For an example of this, please see my Plugin Template.
    private void watchForEvents() { EventsLuaWithArgs.OnEventsLuaWithArgs += (LuaEventsId id, List<string> args) => { if (id == wManager.Wow.Enums.LuaEventsId.PARTY_MEMBERS_CHANGED) { Logging.Write("Joined Group or something about the current group was changed."); } if (id == wManager.Wow.Enums.LuaEventsId.CHAT_MSG_SYSTEM) { Logging.Write("We Received a System Message."); } }; }  
    Finding the list of available Game Events:
    Each version of the game is different here, so this is where you will need to be careful. By that I mean, some versions of the game may have an event type, but a different version may not. Blizzard was not always consistent in their name accross different versions of the game, so please be careful to test against multiple versions of the game. 
     Open DotPeek  Search for "LuaEventsID" Double Click LuaEventsId in the Assembly Explorer Window. A window will open displaying a list of Events. What do each of these Events mean?
    WoW Event Reference:  http://wowwiki.wikia.com/wiki/Event_API 
    (Reminder! Some of these may be different in different versions of the game.)
     
    Watching For WRobot State Changes
    In addition to in game events, there are also WRobot 'states'. Similar to Game Events, WRobot states are the particular condition that WRobot is in at a specific time. For example, there is a state called 'MillingState', and another called 'Looting' that come out with WRobot. States are managed by the WRobot FiniteStateMachineEvents Engine. When a State occurs/changes/ends/etc, an event is passed to the FiniteStateMachine (pardon my wording here if this is not 100% correct). There are three main events that we can use to manage our States.
    State Events that occur:
    OnBeforeCheckIfNeedToRunState - This can be used to CANCEL an event if specific conditions are met. OnRunState - This can be used to do something just as the State is being started. OnAfterRunState - This can be used to do something just as the State has completed.  
    Example of OnRunState and OnAfterRunState
    In this example we are watching for when WRobot starts the ToTown State and when it finishes it. We create a boolean that is set to true when the state is started, and then set it to false when the State is completed. I recommend adding the initializeToTownWatcher() function in the Initialize function of a plugin, or somewhere where it will only be called once. For example of this, please see my Plugin Template.
    bool goToTown = false; private void initializeToTownWatcher() { robotManager.Events.FiniteStateMachineEvents.OnRunState += (engine, state, cancelable) => { if (state != null && state.DisplayName == "To Town") { goToTown = true; Logging.Write("Going to Town State has been initiated."); } }; robotManager.Events.FiniteStateMachineEvents.OnAfterRunState += (engine, state) => { if (state != null && state.DisplayName == "To Town") { goToTown = false; Logging.Write("We have completed going To Town State."); } }; } Example of OnBeforeCheckIfNeedToRunState
    In this example, we catch the state with the name of To Town and cancel it by setting the passed in cancelable parameter to true.
    private void cancelToTownState() { robotManager.Events.FiniteStateMachineEvents.OnBeforeCheckIfNeedToRunState += (engine, state, cancelable) => { if (state != null && state.DisplayName == "To Town") { Logging.Write("We have cancelled the To Town State"); cancelable.Cancel = true; } }; } Where can I find other WRobot States?
    Each version of the WRobot is different, so some versions of WRobot may have a state type, but a different version may not. Please be careful to test against multiple versions of the game/WRobot. 
    Open DotPeek Expand wManager Module Expand wManager.Wow.Bot.States namespace.  
     
    MORE TBA....
    The above is my attempt at trying to help newcomers to WRobot at writing their own plugins / fight classes / etc. If there are any questions , suggestions, or even  corrections, please do let me know in the comments and I'll be sure to add/update things as they come up!
     
    Thanks,
    - Avvi 
     
  18. Like
    Matenia reacted to Ordush in Feeding Pet   
    Your in-game macro is not using UseItemByName, it's taking what you have in container slot 0,1. This means it will only try to feed your pet with whatever is in that slot.
    You can do the same with your bot with the following Code:
    if GetPetHappiness() < 3 then CastSpellByName("Feed Pet") PickupContainerItem(0,1) end This will make the bot feed the pet with whatever you have in slot 0,1 in your bags (like your macro) if the pet is not happy. :)

    Edit: For the first code snippet to work, you could make a foreach loop and check every slot in your bag for itemname. :)
  19. Like
    Matenia reacted to d3kxn in Hunter - ammo bags / loot and buying ammo   
    I have something like this in my fight class to detect this situation:
    wManager.Events.LootingEvents.OnLootingTaskEnd += (cancelable) => { this.CheckBagStopConditions(); }; /* * Check whether or not to stop the bot when the inventory is full * or no ammonition is available anymore. * (The full bag detection of wrobot is broken (because of the quiver)) */ private void CheckBagStopConditions() { if (!this.HasBagSpaceFree() || !this.HasAmmonition()) { Logging.Write("Stop the bot!"); Products.ProductStop(); } } private bool HasBagSpaceFree() { int FreeTotal = wManager.Wow.Helpers.Bag.GetContainerNumFreeSlotsNormalType; int FreeQuiver = wManager.Wow.Helpers.Bag.GetContainerNumFreeSlotsByBagID(4); // TODO: Make configurable int FreeForLoot = FreeTotal - FreeQuiver; return FreeForLoot > 0; } private bool HasAmmonition() { if (MySettings.CurrentSetting.AmmonitionName == "") { return true; // disable this check } return ItemsManager.GetItemCountByNameLUA(MySettings.CurrentSetting.AmmonitionName) > 0; } It currently simply stops the bot. But you could use it to do anything else in this situation. You will need to replace MySettings.CurrentSetting.AmmonitionName with the name of the ammonition you use.
  20. Like
    Matenia reacted to Memus in WoWUnit.Target()   
    Aye.
    Tho the ObjectManager.Me.Target property works for targeting.
    Ie ObjectManager.Me.Target = WoWUnit.Guid
     
  21. Like
    Matenia reacted to iMod in Force bot to Eat > first aid   
    using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.ComponentModel; using System.Diagnostics; using System.Threading; using robotManager.Helpful; using robotManager.Products; using wManager.Wow.Helpers; using wManager.Wow.ObjectManager; public class Main : wManager.Plugin.IPlugin { private bool isRunning; private BackgroundWorker pulseThread; public void Start() { pulseThread = new BackgroundWorker(); pulseThread.DoWork += Pulse; pulseThread.RunWorkerAsync(); } public void Pulse(object sender, DoWorkEventArgs args) { try { // Loop while (isRunning) { // Valid? if (!Conditions.InGameAndConnectedAndAliveAndProductStartedNotInPause && !Fight.InFight && !ObjectManager.Me.IsMounted && ObjectManager.Me.HealthPercent <= 80) { uint[] items = new uint[] { 14530, 14529, 3531, 3530, 6451, 6450, 3531, 3530, 2581, 1251 }; uint? currentItemID = null; // Get itemID foreach (uint itemID in items) { // Exists? if (ItemsManager.HasItemById(itemID)) { // Set currentItemID = itemID; break; } } // Any? if (currentItemID.HasValue) { // Stop moving MovementManager.StopMoveTo(false, 10000); // Use item ItemsManager.UseItem(currentItemID.Value); Logging.WriteDebug("Using consumable bandage"); // Wait Thread.Sleep(Usefuls.Latency); Usefuls.WaitIsCasting(); } } // Wait Thread.Sleep(20000); } } catch (Exception ex) { Logging.WriteError(ex.ToString()); } } public void Dispose() { try { isRunning = false; this.pulseThread.Dispose(); } catch (Exception ex) { Logging.WriteError(ex.ToString()); } } public void Initialize() { isRunning = true; Start(); } public void Settings() { } }  
  22. Like
    Matenia reacted to Arcangelo in NPC database for Vanilla   
    I have only added vendors that sell food/water ;)
    So if you set it up properly it should work.
    //arcangelo 
  23. Like
    Matenia got a reaction from Lbniese in [Feature request/Help] Smart targeting/pulls   
    Hey @Droidz,
    currently in older expansions like vanilla/tbc/wrath the bot is lacking a few very important features that are probably not too hard for you to implement. 
    I could try fixing all of these through my plugin, but it's hard to do, because a lot of bot behavior is unpredictable I don't know the inner workings of your code, so for a lot I have to do guess work.
     
    So here are some suggestions that early expansions really need:
    regen takes priority BEFORE "Attack before being attacked", currently especially after rezzing the bot will keep attacking new targets after combat because they are in 20 yards, even if they wouldn't attack you (it's better to rely on IsAttacked state during regen) smart rezz (and small bug fix), try to REALLY find a save spot to rezz, but more importantly recognize when you can't rezz and move a bit closer to the corpse, some servers don't calculate distance 100% the same as the client and won't accept rezz if you aren't a bit closer. I use code to solve this1 smart target/pulls - before pulling check if any units are near by the pulled unit (20 yards + number from general settings), then ALSO check every Vector3 2 yards between you and your target  move around if the above conditions aren't met for any targets (find a line between you and target with no mobs between) (slightly improved AvoidIt plugin) If Conditions.ForceIgnoreIsAttacked is set, do NOT try to enter regen mode while you are still being attacked - keep running to the next waypoint or try to drop combat A way to avoid certain zones when doing long-travel (this is enough if we can add it through API) - for example if we are level 25, avoid Burning Steppes zone in all paths, but you can give an alternative "Task" or "Action" (where it would then take the tram, executing your own C# code, for example) ??? (reserved for more things)  
     
  24. Like
    Matenia reacted to Cptcodface in This program I believe to be a malware   
    Every bot, cheat or hack will - i repeat - will be reported as some sort of malware at some point, simply due to the manner they work in. They inject into running processes, which is virus-like behaviour. If you don't like the way this works, don't use it, plain and simple. There isn't a tin foil hat in the world thick enough to protect you from imaginary threats.
  25. Like
    Matenia reacted to KnightRyder in This program I believe to be a malware   
    Unsatisfied is not the same as unauthorized. 
×
×
  • Create New...