Jump to content

Apexx

Elite user
  • Posts

    332
  • Joined

Reputation Activity

  1. Like
    Apexx got a reaction from maukor in Grind if reputation isnt Friendly   
    Perfect! That is all that matters. I lead you into the correct direction. Have a nice day!
  2. Like
    Apexx reacted to TheSmokie in Interact with NPC - PickUp Quest if option is available   
    You could use my toolbox > 
    input into custom script, and call it using 
     
    return faction(“name”, amount);
     
  3. Like
    Apexx got a reaction from Pudge in Check For Hostiles Unit(s) Behind Player   
    I may have something here if anyone is interested. It still needs more testing though.
    Code:
    private void FightEventsOnFightStart(WoWUnit wowUnit, CancelEventArgs cancelable) { try { if (Settings.Backpedal) Var.SetVar("CanBack", true); } catch (Exception ex) { MyFunctions.LogWrite("FightEventsOnFightStart() Exception:" + Environment.NewLine + ex.ToString(), true); } } private async void FightEventsOnFightLoop(WoWUnit wowUnit, CancelEventArgs cancelable) { Random _rand = new Random(); bool _playerAggro = false; bool _playerStuck = false; #region Backpedal if (Settings.Backpedal && // Make sure Include Backpedal is TRUE in Settings (!Player.IsPartyMember || ObjectManager.Me.IsInGroup) && // Let's not backpedal in groups! Var.Exist("CanBack") && // Make sure our Variable exists Var.GetVar<bool>("CanBack") && // Make sure the Variable is TRUE Player.InCombat && // Make sure Player is in combat !Player.IsIndoors && // Skip if Player is indoor !Player.IsCast && // Make sure the Player is NOT casting Target.IsAlive && // Make sure the Target is valid Target.IsTargetingMe && // Make sure the Unit is Targeting the player !wowUnit.IsCast && // We don't want to backpedal from a casting target! MyFunctions.TargetInCooldownLevelRange()) // Target level is > Settings CD lvl { try { // Player.IsFacing(Vector3 targetPosition, [float arcRadians = 0.2]) // Player.IsFacing(u.Position, 1.5f) // 1.5 radians = 85.9 degrees || Arc Length = 37.5yd || Sector Area = 468.75 yd^2 var EnemiesInFrontPlayerNearTarget = ObjectManager.GetWoWUnitHostile().Where(u => u.IsValid && u.IsAlive && !u.InCombat && Player.IsFacing(u.Position, 1.5f) && Player.Target != u.GetBaseAddress && u.Position.DistanceTo(Target.Position) <= Settings.BackpedalScanRadius && (u.Reaction == Reaction.Hated || u.Reaction == Reaction.Hostile || u.Reaction == Reaction.Unfriendly)).OrderBy(o => Player.Position.DistanceTo(o.Position)).ToList(); var EnemiesBehindPlayer = ObjectManager.GetWoWUnitHostile().Where(u => u.IsValid && u.IsAlive && !u.InCombat && !Player.IsFacing(u.Position, 1.5f) && Player.Target != u.GetBaseAddress && u.Position.DistanceTo(Player.Position) <= (Settings.BackpedalScanRadius + (Settings.BackpedalScanRadius / 2)) && (u.Reaction == Reaction.Hated || u.Reaction == Reaction.Hostile || u.Reaction == Reaction.Unfriendly)).OrderBy(o => Player.Position.DistanceTo(o.Position)).ToList(); if (EnemiesInFrontPlayerNearTarget != null && EnemiesInFrontPlayerNearTarget.Count > 0) { foreach (WoWUnit unit in EnemiesInFrontPlayerNearTarget.Take(3)) { MyFunctions.LogDebug("Backpedal -> Enemy (Front): " + unit.Level + "-" + unit.Name + " (Distance: " + System.Math.Round(Player.Position.DistanceTo(unit.Position), 3) + "yd"); } WoWUnit NearestFrontUnit = EnemiesInFrontPlayerNearTarget.FirstOrDefault(); if (EnemiesBehindPlayer != null && EnemiesBehindPlayer.Count < 1) { var timer = new robotManager.Helpful.Timer(_rand.Next(3000, 4000)); var timerCheckDistance = new robotManager.Helpful.Timer(_rand.Next(1500, 2250)); Vector3 PlayerStartPos = Player.Position; int EnemyCountBegin = MyFunctions.HostileUnitsInRange(100.0f); MyFunctions.LogDebug("Backpedal -> Found no enemies behind you. Begin Backpedal"); if (wowUnit != NearestFrontUnit && !_playerAggro) { Move.Backward(Move.MoveAction.DownKey); while (!_playerStuck && (!timer.IsReady || wowUnit.Position.DistanceTo(NearestFrontUnit.Position) <= Settings.BackpedalScanRadius)) { if (Player.GetMove && wowUnit.IsCast) { MyFunctions.LogDebug("Backpedal -> Your target is casting; Stopping movement"); Var.SetVar("CanBack", false); break; } if (MyFunctions.HostileUnitsInRange(100.0f) != EnemyCountBegin) { MyFunctions.LogDebug("Backpedal -> Enemy count changed, you may have aggro'd something; Stopping movement"); Var.SetVar("CanBack", false); break; } if (timerCheckDistance.IsReady && Player.Position.DistanceTo(PlayerStartPos) < 1) just over a 1.5 sec. { MyFunctions.LogDebug("Backpedal -> Player might be stuck; Stopping movement"); _playerStuck = true; Var.SetVar("CanBack", false); break; } if (Player.Position.DistanceTo(NearestFrontUnit.Position) > Settings.BackpedalScanRadius) { MyFunctions.LogDebug("Backpedal -> Distance is greater than " + Settings.BackpedalScanRadius + " yards; Stopping movement"); Var.SetVar("CanBack", false); break; } if (Settings.BackpedalScanRadius > 0 && Player.Position.DistanceTo(PlayerStartPos) > Settings.BackpedalScanRadius) { MyFunctions.LogFight("Backpedal -> Player has moved more than " + Settings.BackpedalScanRadius + " yards; Stopping movement"); Var.SetVar("CanBack", false); break; } if (TraceLine.TraceLineGo(wowUnit.Position)) { MyFunctions.LogFight("Backpedal -> Your target is out of line of sight; Stopping movement"); Var.SetVar("CanBack", false); break; } Thread.Sleep(100); return; } } } else if (EnemiesBehindPlayer != null && EnemiesBehindPlayer.Count > 0) { foreach (WoWUnit unit in EnemiesBehindPlayer) { MyFunctions.LogDebug("Backpedal -> Enemy (Back): " + unit.Level + "-" + unit.Name + " (Distance: " + System.Math.Round(Player.Position.DistanceTo(unit.Position), 3) + "yd"); } MyFunctions.LogDebug("Backpedal -> Skipping movement"); Var.SetVar("CanBack", false); return; } } } catch (Exception ex) { MyFunctions.LogWrite("FightEventsOnFightLoop -> Backpedal Exception:" + Environment.NewLine + ex.ToString(), true); } } }  
  4. Like
    Apexx reacted to Andoido in Help Requested - Create simple addon to communicate with custom plugin   
    Shoot me a PM, I can give you the custom code used in most of my Profiles if you are interested.
    The link above works too!
  5. Like
    Apexx reacted to Talamin in Help Requested - Create simple addon to communicate with custom plugin   
    Here is all you need, take a look at the Plugin!
     
  6. Thanks
    Apexx reacted to Ordush in Fightclasses & Stuns   
    ofc. ?
    If you do a dungeon or a raid, notice that you can't hear any of the other players yelling "Spell is not ready yet". Trust me 90% of wow players mash keys. ?
  7. Like
    Apexx reacted to Matenia in Fightclasses & Stuns   
    Your client blocks it from sending abilities to the server if you're stunned. So the spamming you see isn't visible to anyone and the server isn't receiving any info about it either.
  8. Thanks
    Apexx got a reaction from sith500 in ObjectManager.Target.HaveBuff Array   
    private static List<string> MagicEffects = new List<string>(); MagicEffects.Add("Amplify Magic"); MagicEffects.Add("Avenging Wrath"); MagicEffects.Add("Barkskin"); MagicEffects.Add("Bloodlust"); MagicEffects.Add("Dampen Magic"); MagicEffects.Add("Divine Favor"); MagicEffects.Add("Earth Shield"); MagicEffects.Add("Fade"); MagicEffects.Add("Fel Domination"); MagicEffects.Add("Hand of Protection"); MagicEffects.Add("Heroism"); MagicEffects.Add("Ice Barrier"); MagicEffects.Add("Innervate"); MagicEffects.Add("Lightning Shield"); MagicEffects.Add("Mana Shield"); MagicEffects.Add("Nether Protection"); MagicEffects.Add("Pain Suppression"); MagicEffects.Add("Power Infusion"); MagicEffects.Add("Power Word: Shield"); MagicEffects.Add("Prayer of Mending"); MagicEffects.Add("Presence of Mind"); MagicEffects.Add("Regrowth"); MagicEffects.Add("Rejuvenation"); MagicEffects.Add("Renew"); MagicEffects.Add("Sacrifice"); MagicEffects.Add("Thorns"); MagicEffects.Add("Water Shield"); foreach(string effect in MagicEffects) { if (ObjectManager.Target.HaveBuff(new Spell(effect).Ids)) { _spellName.Launch(); Logging.WriteDebug("*** Dispelled " + effect + " from " + ObjectManager.Target.Name + " ***"); Thread.Sleep(SpellManager.GlobalCooldownTimeLeft() + Usefuls.Latency); return true; } }  
    Could try that..
  9. Like
    Apexx got a reaction from timamusic in Mend Pet Not Working 3.3.5a   
    Looking into the fight class, these are the following conditions that must be met in order for it to use Mend Pet:
    Pet Health Percent <= 85 Health Points Lost >= 300 (Not sure if this is Player Health Points Lost, or Pet) Target Health Percent == 25 Timer has reached 16 seconds Checking how much health points lost is quite redundant if you are already checking if the pet health percent is below # value.
    Why only use Mend Pet when your target health is exactly 25%?
    hbs27 Current Spell Settings:
    Timer = 16000 (This may or may not be necessary).
    Cast spell on  is set to none. (not sure if spell needs to be cast on Pet?)
     
    Spell Settings (Adjusted):
    Timer  ([optional] Mend Pet Cooldown Time) Cast spell on = Pet? Check if know spell = True Check is spell is good distance = True Check if spell is usable = True  Spell Conditions:
    Pet Health Percent = SmallerOrEqual (Desired value) May want to check Pet Buff as well, to see if your pet already has the buff. May want to check if Pet is Alive and Valid with C Sharp Code C Sharp Code:
    ObjectManager.Pet.IsAlive && ObjectManager.Pet.IsValid
     
     
  10. Like
    Apexx got a reaction from morris79 in Wand Use & IsAutoRepeatAction(slot)   
    For anyone having issues with using the Wand Shoot ability, here is a snippet for you:
    // Test if player has a wand in the proper equipment slot | In Combat if (ObjectManager.Me.GetEquipedItemBySlot(wManager.Wow.Enums.InventorySlot.INVSLOT_RANGED) != 0 && ObjectManager.Me.InCombat && !ObjectManager.Me.GetMove) { // Wand Shoot if(Lua.LuaDoString<int>("isAutoRepeat = \"\"; isAutoRepeat = 0; local name = GetSpellInfo(5019); if IsAutoRepeatSpell(name) then isAutoRepeat = 1 end", "isAutoRepeat") == 0) { // Spammable Shoot Macro Lua.RunMacroText("/castsequence !Shoot, !Shoot"); } }  
  11. Thanks
    Apexx reacted to Droidz in why do you pref wrobot   
    And this plugin already exists: https://wrobot.eu/files/file/359-whisper-reply/
    And about Warmane detection, how I told and some private discutions, for the moment, I found nothing to confirm than Warmane detect WRobot, and I do not think that WRobot is detected, I think more about DB queries (VPN IPs, time in game, number of farms/fishings/mobs killed/accounts/quests/...) or traps (tp, mob spawn, freeze, ... but this automaticly? I read somewhere than Warmane have write few years ago antibot bot?). When I bot 1 or 2 hours per days, with my IP (real IP), my account still alive (I monitoring, sometime players (or GM?) talks to me). But I could be wrong and WRobot is really detected. But I work on it.
    If anyone has more info about Warmane or saw something strange (when he played manually or with the bot) he does not hesitate to tell me.
  12. Like
    Apexx reacted to Droidz in [TAURI] Wrobot detected   
    I found how they detect WRobot I'll fix it in next update
     
  13. Like
    Apexx reacted to lalazors in Vendoring?   
    Cheers mate! Appreciate it!
  14. Like
    Apexx reacted to iMod in Key press lua, cant get it to work   
    Change your init method to
    public void Initialize() // When product started, initialize and launch Fightclass { _isLaunched = true; { EventsLuaWithArgs.OnEventsLuaWithArgs += delegate (LuaEventsId id, List<string> args) { if (id == LuaEventsId.MODIFIER_STATE_CHANGED && args.Count == 2) { // Possible values are LSHIFT, RSHIFT, LCTRL, RCTRL, LALT, and RALT string key = args[0]; // 1 means that the the key has been pressed. 0 means that the key has been released int state = int.Parse(args[1]); // AOE mode if (key == "LALT" && state == 0) { // Set status aoeMode = !aoeMode; Logging.Write($"AOE {this.aoeMode.ToString()}"); } // Burst mode if (key == "LCTRL" && state == 0) { // Set status burstMode = !burstMode; Logging.Write($"BURST {this.burstMode.ToString()}"); } } }; } Logging.Write("[My fightclass] Is initialized."); Rotation(); } Make sure the aoe or burst mode are really enabled by checking the log.
    Also it helps if you write more logging stuff to make sure the routine enters the if block or not just for debugging.
  15. Like
    Apexx reacted to senojin in Mend Pet Not Working 3.3.5a   
    Thank you for taking the time to write this all up! I was able to get it figured out thankfully :D
  16. Like
    Apexx got a reaction from BetterSister in Mend Pet Not Working 3.3.5a   
    Looking into the fight class, these are the following conditions that must be met in order for it to use Mend Pet:
    Pet Health Percent <= 85 Health Points Lost >= 300 (Not sure if this is Player Health Points Lost, or Pet) Target Health Percent == 25 Timer has reached 16 seconds Checking how much health points lost is quite redundant if you are already checking if the pet health percent is below # value.
    Why only use Mend Pet when your target health is exactly 25%?
    hbs27 Current Spell Settings:
    Timer = 16000 (This may or may not be necessary).
    Cast spell on  is set to none. (not sure if spell needs to be cast on Pet?)
     
    Spell Settings (Adjusted):
    Timer  ([optional] Mend Pet Cooldown Time) Cast spell on = Pet? Check if know spell = True Check is spell is good distance = True Check if spell is usable = True  Spell Conditions:
    Pet Health Percent = SmallerOrEqual (Desired value) May want to check Pet Buff as well, to see if your pet already has the buff. May want to check if Pet is Alive and Valid with C Sharp Code C Sharp Code:
    ObjectManager.Pet.IsAlive && ObjectManager.Pet.IsValid
     
     
  17. Like
    Apexx got a reaction from Seminko in Prioritize Low HP targets   
    I do believe Seminko did not define unitToAttack.
    Simply replace
    if (lowestHP != null && unitToAttack.IsValid && unitToAttack.IsAlive && !lowestHP.IsMyTarget) // if the lowest hp mob is valid, alive and NOT your current target with:
    if (lowestHP != null && lowestHP.IsValid && lowestHP.IsAlive && !lowestHP.IsMyTarget) // if the lowest hp mob is valid, alive and NOT your current target  
  18. Like
    Apexx reacted to Marsbar in [SOLVED] Move after Frost Nova - is it really that hard?   
    Try adding 
    FightEvents.OnFightLoop += (unit, cancelable) => { if (ObjectManager.Target.GetDistance < 8) { var xvector = (ObjectManager.Me.Position.X) - (ObjectManager.Target.Position.X); var yvector = (ObjectManager.Me.Position.Y) - (ObjectManager.Target.Position.Y); Vector3 newpos = new Vector3() { X = ObjectManager.Me.Position.X + (float)((xvector * (20 / ObjectManager.Target.GetDistance) - xvector)), Y = ObjectManager.Me.Position.Y + (float)((yvector * (20 / ObjectManager.Target.GetDistance) - yvector)), Z = ObjectManager.Me.Position.Z }; MovementManager.Go(PathFinder.FindPath(newpos), false); Thread.Sleep(1500); } }; edit: the thread.sleep is a bit of a workaround to stop whatever else is interfering
    you may also want to increase that if distance to higher than 8
  19. Like
    Apexx reacted to Seminko in [SOLVED] Move after Frost Nova - is it really that hard?   
    GG WP! Yup that's it. Works both in my test blank fightclass as well as in the main one!
    Thank you very much @Marsbar.
    Also thank you @Matenia and @Apexx ! I apreciate the help guys!
    This will definitely help me with my rogue fightclass as well. The only thing missing from perfection is moving to a spot without mobs. But that is way above my knowledge of coding :-D
     
    You know what the funny part is? I've seen that post dozens of times when I was googling but since I didn't know what FightEvents.OnFightLoop was or even how to use it properly I didn't even attempted to fiddle with it. I was so close yet so far :-D
  20. Thanks
    Apexx got a reaction from Seminko in [SOLVED] Move after Frost Nova - is it really that hard?   
    Not sure if you have seen this post -> move back if... add code in fightclass editor
  21. Like
    Apexx reacted to Droidz in Click to move!   
    Hello, try to use also this plugin 
     
  22. Thanks
    Apexx reacted to reapler in Plugins and Accept User Keyboard Input   
    I've looked into it, you need to run the hook on its own context via "Application.Run();" to get it working:
    using System; using System.Diagnostics; using System.Runtime.InteropServices; using System.Threading.Tasks; using System.Windows.Forms; using robotManager.Helpful; using wManager.Plugin; public class Main : IPlugin { public void Initialize() { KeyBoardHook.Initialize(); KeyBoardHook.OnKeyDown += KeyDown; } public void Dispose() { KeyBoardHook.OnKeyDown -= KeyDown; KeyBoardHook.Dispose(); } public void Settings() { } private static void KeyDown(object sender, KeyBoardHook.KeyArgs keyArgs) { Logging.Write(keyArgs.Key.ToString()); } public class KeyBoardHook { private const int WH_KEYBOARD_LL = 13; private const int WM_KEYDOWN = 0x0100; private const int WM_KEYUP = 0x101; private static readonly LowLevelKeyboardProc Proc = HookCallback; private static IntPtr _hookId = IntPtr.Zero; private static Keys _lastKeyDown = Keys.None; public delegate void KeyBoardHookEventHandler(object sender, KeyArgs e); public static event KeyBoardHookEventHandler OnKeyDown = delegate{}; public static event KeyBoardHookEventHandler OnKeyUp = delegate{}; internal static void Initialize() { Task.Factory.StartNew(() =>//avoid thread blocking from Application.Run(); { _hookId = SetHook(Proc); Application.Run(); //important! need to run in its own "context" }); } internal static void Dispose() { UnhookWindowsHookEx(_hookId); Application.Exit(); } private static IntPtr SetHook(LowLevelKeyboardProc proc) { using (var curProcess = Process.GetCurrentProcess()) using (var curModule = curProcess.MainModule) { return SetWindowsHookEx(WH_KEYBOARD_LL, proc, GetModuleHandle(curModule.ModuleName), 0); } } private delegate IntPtr LowLevelKeyboardProc(int nCode, IntPtr wParam, IntPtr lParam); private static IntPtr HookCallback(int nCode, IntPtr wParam, IntPtr lParam) { if (nCode < 0) return CallNextHookEx(_hookId, nCode, wParam, lParam); if (wParam == (IntPtr) WM_KEYDOWN) { var vkCode = (Keys) Marshal.ReadInt32(lParam); if (_lastKeyDown == vkCode) return CallNextHookEx(_hookId, nCode, wParam, lParam); OnKeyDown(null, new KeyArgs(vkCode)); _lastKeyDown = vkCode; } else if (wParam == (IntPtr) WM_KEYUP) { var vkCode = (Keys) Marshal.ReadInt32(lParam); OnKeyUp(null, new KeyArgs(vkCode)); if (_lastKeyDown == vkCode) _lastKeyDown = Keys.None; } return CallNextHookEx(_hookId, nCode, wParam, lParam); } [DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = true)] private static extern IntPtr SetWindowsHookEx(int idHook, LowLevelKeyboardProc lpfn, IntPtr hMod, uint dwThreadId); [DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = true)] [return: MarshalAs(UnmanagedType.Bool)] private static extern bool UnhookWindowsHookEx(IntPtr hhk); [DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = true)] private static extern IntPtr CallNextHookEx(IntPtr hhk, int nCode, IntPtr wParam, IntPtr lParam); [DllImport("kernel32.dll", CharSet = CharSet.Auto, SetLastError = true)] private static extern IntPtr GetModuleHandle(string lpModuleName); public class KeyArgs : EventArgs { public Keys Key { get; private set; } public KeyArgs(Keys key) { this.Key = key; } } } } So far it worked well.
  23. Thanks
    Apexx reacted to iMod in Plugins and Accept User Keyboard Input   
    Oh damn i had the same problems y.y thats why i switched over to lua ingame detection. This will be a part for Driodz.
  24. Like
    Apexx got a reaction from arkhan in 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; }  
  25. Thanks
    Apexx reacted to Droidz in Me.IsCast and a Few Questions   
    Hello,
    Yes Me.IsCast should works with Volley (you can check in "dev... tools" button "memory info...." to get player current stat).
×
×
  • Create New...