Jump to content

Apexx

Elite user
  • Posts

    332
  • Joined

Everything posted by Apexx

  1. Hello, your method RangeManager() looks like it will only return true if there are more than 1 unit in range. if (ObjectManager.GetWoWUnitHostile().Count(u => u.Position.DistanceTo(ObjectManager.Target.Position) <= 40 && u.IsAttackable) > 1) You may want to change > 1 to >= 1 as seen below, but I could be wrong. private void RangeManager() { if (ObjectManager.GetWoWUnitHostile().Count(u => u.Position.DistanceTo(ObjectManager.Target.Position) <= 40 && u.IsAttackable) >= 1) { RangeCheck = true; } else { RangeCheck = false; } return; }
  2. I added a small sleep time before trying to launch the spell and it seems to help. public static bool CallPet() { try { if (!Me.IsCast && !Me.IsMounted && _callPet.KnownSpell && _callPet.IsDistanceGood && _callPet.IsSpellUsable) { Thread.Sleep(800); _callPet.Launch(); Thread.Sleep(SpellManager.GlobalCooldownTimeLeft() + Usefuls.Latency); return true; } } catch (Exception e) { Logging.WriteError("CallPet() ERROR: " + Environment.NewLine + e); } return false; } public static bool RevivePet() { try { if (!Me.IsCast && !Me.IsMounted && Me.ManaPercentage > 80 && _revivePet.KnownSpell && _revivePet.IsDistanceGood && _revivePet.IsSpellUsable) { Thread.Sleep(800); _revivePet.Launch(); Thread.Sleep(SpellManager.GlobalCooldownTimeLeft() + Usefuls.Latency); return true; } } catch (Exception e) { Logging.WriteError("RevivePet() ERROR: " + Environment.NewLine + e); } return false; }
  3. Thanks for the information @arkhan. That is a big help, and I will test this out soon.
  4. Hi, quick questions regarding this method to CheckPet() inside my fight class. The code below is somewhat a derivative from converting the Fight Class Editor into C#. The mana required to use the spell "Revive Pet" varies based on level, If the player does not have enough mana, It will just keep spamming the ability until their is enough. Is there a way to keep this from happening? I also am noticing the issue that when I mount or dismount, it will try and cast the Call Pet ability in that brief moment of getting on the mount, or jumping off every single time (This also includes taxis). It even gets so bad that when I mount up and try to ride off, it dismounts me to use the ability, call pet again! So far I have had to comment this sort of thing out of my fight class all together as it was just more of hassle than to worry about it. I do believe it is important though if I plan on using any portion of the bot like Grinder, Quester, Automaton, etc... Any help with the simple Pet Management would be greatly appreciated! Thanks! internal void CheckPet() { if (ObjectManager.Me.IsDeadMe || Me.IsMounted || Me.IsStunned || Me.Pacified || Me.GetMove) return; if (!ObjectManager.Pet.IsValid) { _callPet.Launch(); // Call Pet } if (!ObjectManager.Pet.IsValid || ObjectManager.Pet.IsDead) { //if (Me.Mana >= 1040) _revivePet.Launch(true); // Revive Pet } }
  5. No that was code from checking out reapler's project file and trying his Keyboard Hook class. I have attached my log file, and an example plugin that uses the same code found by you on other threads to activate spells via key bind 15 Oct 2017 10H07.log.html KeyboardHook.cs
  6. Yeah I don't think KeyboardHook is working. I have tried using Target framework .NET Framework 4.5 as well as other later versions and it still cannot register hot key. I also tried many different variations of hot key combinations.
  7. Would it be easier to create a small addon for WoW directly that communicates with the plugin? I don't have much knowledge integrated an addon with WRobot. How would one get/set variables from WRobot plugin data to an addon?
  8. Yes I did. I have searched and tried everything from the forums that returned anything to do with keyboard events. I will double check the .Net framework version in a bit.
  9. Yeah I cannot get WRobot's keyboard class to work either. Seen the examples throughout the forums though. public class Main : IPlugin { private Wradar.InputHook.KeyboardHook _hook; private Keys _keyAdd = Keys.None; private Keys _keyRemove = Keys.None; public void Initialize() { _keyAdd = Keys.F5; _keyRemove = Keys.F6; _hook = new Wradar.InputHook.KeyboardHook(true); // Strange it doesn't work with this set as Global _hook.KeyDown += HookOnKeyDown; _isLaunched = true; } private void HookOnKeyDown(Keys key, bool shift, bool ctrl, bool alt) { Logging.WriteDebug("key = " + key); if (key == _keyAdd) { try { Logging.WriteDebug("Would you like to add ____ object to the collections list?"); } catch (Exception ex) { Logging.WriteError("HookOnKeyDown _keyAdd Error:\n" + ex); } } else if(key == _keyRemove) { try { Logging.WriteDebug("Would you like to remove ____ object from the collections list?"); } catch (Exception ex) { Logging.WriteError("HookOnKeyDown _keyRemove Error:\n" + ex); } } } public void Dispose() { try { if (_hook != null) { _hook.KeyDown -= HookOnKeyDown; _hook.Dispose(); } } catch { } _isLaunched = false; } }
  10. I looked into the code and it seems you had used your own form events handling. I am using the WRobot's settings window from inside the class itself. I don't think the InputHook catches anything while the game window has focus. I guess I am trying to catch the even from WRobot directly.
  11. I just keep getting the following in log
  12. I would like to have the ability to add or remove the nearest WoW game object to the collections list for my WRadar plugin using hotkeys, like "Shift+Insert" and "Shift+Delete".
  13. Hello, is there a way to get keys pressed? I would like to have two "keybinds", to my plugin if it is at all possible?
  14. Initial SettingAttribute [Setting] [Category("Settings")] [DisplayName("Object(s) list")] [Description("")] public List<string> ObjectsList { get; set; } Modified to allow a list of strings entering each item on its own line: [Setting] [Category("Settings")] [DisplayName("Object(s) list")] [Description("")] [Editor(@"System.Windows.Forms.Design.StringCollectionEditor, System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", typeof(System.Drawing.Design.UITypeEditor))] public List<string> ObjectsList { get; set; } Finished result:
  15. Hello, is it possible to add a collection of strings from the settings? I am getting the error, "Constructor on type 'System.String' not found".
  16. I have dabbled a little bit with it, but I was not very successful myself. Maybe you need a draw event and then pulse the radar? Radar3D.OnDrawEvent += () => { // draw }; Radar3D.Pulse(); I believe you want the OnDrawEvent inside the Initialize() method.
  17. Is this XML or C#? C#: public void Initialize() // When product started, initialize and launch Fightclass { WatchForEvents(); } public class Main: ICustomClass { internal void WatchForEvents() { EventsLuaWithArgs.OnEventsLuaWithArgs += (LuaEventsId id, List<string> args) => { if (id == LuaEventsId.PLAYER_REGEN_ENABLED && ObjectManager.Me.HealthPercent <= wManager.wManagerSetting.CurrentSetting.FoodPercent) { Lua.RunMacroText("/cancelaura [stance:1] Dire Bear Form; [stance:2] Aquatic Form; [stance:3] Cat Form; [stance:4] Travel Form; [stance:5] Moonkin Form"); } }; } } This has not been tested, and I am not sure if Vanilla WoW uses the same LuaEventID. This is just an idea.
  18. Hi thanks for reading this thread post. I was wondering if Me.IsCast works for channeled spells like, Volley. My goal is to throw a while loop in my fight class, if I am casting Volley to run a Thread.Sleep(10) until cast time is diminished. Also, a question in regards to checks like, Me.Pacified. What exactly does Pacify mean here? Is there an ultimate check if the player is completely incapable of casting spells? I have added a few like, Me.HaveBuff("Sleep") etc, but the list would be huge for every spell that renders the player unable to perform attacks. The idea is to stop the bot from trying to cast spells while under those types of spell debuffs. Thanks everyone!
  19. Hi, I was wondering if I record paths that overlap each other inside Quester, KillAndLoot Type if the bot will choose random hotspots? I do not see any hotspot for pathing inside Quest Editor Quest Type KillAndLoot.
  20. This might work. if (ObjectManager.Target.Level >= (ObjectManager.Me.Level + 2)) { // Do something }
  21. Okay @Droidz, that is really strange, but it seems to work! Thank you!
×
×
  • Create New...