Everything posted by Apexx
- Plugins and Accept User Keyboard Input
-
Making Range a variable
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; }
-
Hunter Pet Management (Fight Class)
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 replies
-
- hunter
- pet
- pet manager
- fight class
-
Tagged with:
-
Hunter Pet Management (Fight Class)
Thanks for the information @arkhan. That is a big help, and I will test this out soon.
- 3 replies
-
- hunter
- pet
- pet manager
- fight class
-
Tagged with:
-
Hunter Pet Management (Fight Class)
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 } }
- 3 replies
-
- hunter
- pet
- pet manager
- fight class
-
Tagged with:
- Plugins and Accept User Keyboard Input
- Plugins and Accept User Keyboard Input
- Plugins and Accept User Keyboard Input
- Plugins and Accept User Keyboard Input
-
Plugins and Accept User Keyboard Input
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; } }
- Plugins and Accept User Keyboard Input
- Plugins and Accept User Keyboard Input
- Plugins and Accept User Keyboard Input
- Plugins and Accept User Keyboard Input
- Plugins and Accept User Keyboard Input
-
String Collection Editor Error
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:
-
String Collection Editor Error
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".
-
Radar3D How to use it?
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.
-
Druid shapeshift
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.
-
Me.IsCast and a Few Questions
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!
- Quester - KillAndLoot HotSpots?
-
Target Lvl 2+ > My Level
This might work. if (ObjectManager.Target.Level >= (ObjectManager.Me.Level + 2)) { // Do something }
- Hunter Class - Auto Shot and Attack Interrupt Issue
- Hunter Class - Auto Shot and Attack Interrupt Issue
- Hunter Class - Auto Shot and Attack Interrupt Issue