Skip to content
View in the app

A better way to browse. Learn more.

WRobot

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Pudge

WRobot user
  • Joined

  • Last visited

Posts posted by Pudge

  1. 1 hour ago, Droidz said:

    Hi,

    No teested but you can try :

    
    using System;
    using System.ComponentModel;
    using System.Configuration;
    using System.Collections.Generic;
    using System.IO;
    using System.Linq;
    using robotManager.Helpful;
    using wManager;
    using wManager.Plugin;
    using wManager.Wow.Helpers;
    using wManager.Wow.ObjectManager;
    
    public class Main : IPlugin
    {
        private bool _isLaunched;
    
        public void Initialize()
        {
            _isLaunched = true;
            ChangeTargetSettings.Load();
            wManager.Events.FightEvents.OnFightLoop += TargetSwitcher;
            Logging.Write("[ChangeTarget2] Started.");
        }
    
        public void Dispose()
        {
            try
            {
                wManager.Events.FightEvents.OnFightLoop -= TargetSwitcher;
            }
            catch { }
            _isLaunched = false;
            Logging.Write("[ChangeTarget2] Stoped.");
        }
    
        public void Settings()
        {
            ChangeTargetSettings.Load();
            ChangeTargetSettings.CurrentSetting.ToForm();
            ChangeTargetSettings.CurrentSetting.Save();
            Logging.Write("[ChangeTarget2] Settings saved.");
        }
    
    
    
        private void TargetSwitcher(WoWUnit woWPlayer, System.ComponentModel.CancelEventArgs cancelable)
        {
            while (_isLaunched)
            {
                WoWPlayer player = ObjectManager.GetNearestWoWPlayer(ObjectManager.GetObjectWoWPlayer());
                if (player == null || !player.IsValid || !player.IsAlive || player.Faction == ObjectManager.Me.Faction || player.IsFlying || player.IsMyTarget || woWPlayer.Guid == player.Guid)
                    return;
                if (player.InCombatWithMe) // you can also try to use only player.IsTargetingMe
                {
                    //if(ObjectManager.Target.Type != WoWObjectType.Player)
                    //Fight.StopFight();
                    //Lua.LuaDoString("TargetNearestEnemyPlayer();");
                    //Interact.InteractGameObject(player.GetBaseAddress, false);
                    cancelable.Cancel = true;
                    //Fight.StartFight(true, true, false, true);
                    //FightBG.StartFight(player.Guid);
                    var m = Fight.StartFight(player.Guid, false);
                }
            }
        }
    }
    public class ChangeTargetSettings : Settings
    {
        public ChangeTargetSettings()
        {
    
        }
    
        public static ChangeTargetSettings CurrentSetting { get; set; }
    
        public bool Save()
        {
            try
            {
                return Save(AdviserFilePathAndName("ChangeTarget", ObjectManager.Me.Name + "." + Usefuls.RealmName));
            }
            catch (Exception e)
            {
                Logging.WriteError("ChangeTargetSettings > Save(): " + e);
                return false;
            }
        }
    
        public static bool Load()
        {
            try
            {
                if (File.Exists(AdviserFilePathAndName("ChangeTarget", ObjectManager.Me.Name + "." + Usefuls.RealmName)))
                {
                    CurrentSetting =
                        Load<ChangeTargetSettings>(AdviserFilePathAndName("ChangeTarget",
                            ObjectManager.Me.Name + "." + Usefuls.RealmName));
                    return true;
                }
                CurrentSetting = new ChangeTargetSettings();
            }
            catch (Exception e)
            {
                Logging.WriteError("ChangeTargetSettings > Load(): " + e);
            }
            return false;
        }
    
    }

     

    In your version, he stops attacking mobs, but does not take the attacking player in the target, he just stands and looks towards the player

    if add 

    Lua.LuaDoString("TargetNearestEnemyPlayer();");

    Behaves in the way I described when I posted the code (constantly changing the target from one to another)

  2. Hello to all who care, I think that a bot is very easy to detect when it grinds mobs. If an enemy player attacks the bot, until the bot kills all the mobs he fought before the player attacks him, he will not attack the player. I began to search on the forum, but did not find anything similar on this topic.

    using System;
    using System.ComponentModel;
    using System.Configuration;
    using System.Collections.Generic;
    using System.IO;
    using System.Linq;
    using robotManager.Helpful;
    using wManager;
    using wManager.Plugin;
    using wManager.Wow.Helpers;
    using wManager.Wow.ObjectManager;
    
    public class Main : IPlugin
    {
        private bool _isLaunched;
    
        public void Initialize()
        {
            _isLaunched = true;
            ChangeTargetSettings.Load();
            wManager.Events.FightEvents.OnFightLoop += TargetSwitcher;
            Logging.Write("[ChangeTarget2] Started.");
        }
    
        public void Dispose()
        {
            try
            {
                wManager.Events.FightEvents.OnFightLoop -= TargetSwitcher;
            }
            catch { }
            _isLaunched = false;
            Logging.Write("[ChangeTarget2] Stoped.");
        }
    
        public void Settings()
        {
            ChangeTargetSettings.Load();
            ChangeTargetSettings.CurrentSetting.ToForm();
            ChangeTargetSettings.CurrentSetting.Save();
            Logging.Write("[ChangeTarget2] Settings saved.");
        }
    
    
    
        private void TargetSwitcher(WoWUnit woWPlayer, System.ComponentModel.CancelEventArgs cancelable)
        {
            while (_isLaunched)
            {
                WoWPlayer player = ObjectManager.GetNearestWoWPlayer(ObjectManager.GetObjectWoWPlayer());
                if (!player.IsAlive || player.Faction == ObjectManager.Me.Faction || player.IsFlying || player.IsMyTarget)
                    return;
                if (player != null && player.IsValid && player.InCombatWithMe)
                {
                    //if(ObjectManager.Target.Type != WoWObjectType.Player)
                    //Fight.StopFight();
                    Lua.LuaDoString("TargetNearestEnemyPlayer();");
                    //Interact.InteractGameObject(player.GetBaseAddress, false);
                    cancelable.Cancel = true;
                    //Fight.StartFight(true, true, false, true);
                    //FightBG.StartFight(player.Guid);
                    var m = Fight.StartFight(player.Guid, false);
                }
            }
        }
    }
        public class ChangeTargetSettings : Settings
    {
        public ChangeTargetSettings()
        {
    
        }
    
        public static ChangeTargetSettings CurrentSetting { get; set; }
    
        public bool Save()
        {
            try
            {
                return Save(AdviserFilePathAndName("ChangeTarget", ObjectManager.Me.Name + "." + Usefuls.RealmName));
            }
            catch (Exception e)
            {
                Logging.WriteError("ChangeTargetSettings > Save(): " + e);
                return false;
            }
        }
    
        public static bool Load()
        {
            try
            {
                if (File.Exists(AdviserFilePathAndName("ChangeTarget", ObjectManager.Me.Name + "." + Usefuls.RealmName)))
                {
                    CurrentSetting =
                        Load<ChangeTargetSettings>(AdviserFilePathAndName("ChangeTarget",
                            ObjectManager.Me.Name + "." + Usefuls.RealmName));
                    return true;
                }
                CurrentSetting = new ChangeTargetSettings();
            }
            catch (Exception e)
            {
                Logging.WriteError("ChangeTargetSettings > Load(): " + e);
            }
            return false;
        }
    
    }

    I made a plugin, but it does not work correctly. The plugin tries to start a fight with a player who attacked everything, but the fight with mobs does not stop, and the bot turns either towards the player or tries to fight with mobs. Is there any way to stop attacking mobs and focus on the bot attacking player?

  3. just in case I’ll publish the code if you suddenly do not want to download the project

    Main.cs

    using robotManager.Helpful;
    using System.Threading;
    using robotManager.Products;
    using wManager.Wow.Enums;
    using wManager.Wow.Helpers;
    using wManager.Wow.ObjectManager;
    using System;
    using System.Collections.Generic;
    using System.IO;
    using System.Net.Mail;
    using System.Net;
    using System.Configuration;
    using System.ComponentModel;
    using System.Text;
    using robotManager;
    using System.Threading.Tasks;
    using robotManager.Events;
    using robotManager.FiniteStateMachine;
    using System.Linq;
    using wManager.Wow.Bot.States;
    using System.Drawing;
    
    public class Main : wManager.Plugin.IPlugin
    {
        private bool _isLaunched;
        public static bool Enemynear;
        private enum GameState { None, Logged_Out = 0, Logged_In = 1 };
        // enemyAlert
        private DateTime nextEnemyAlertTime;
        DateTime todaysDates;
        public List<string> myEnemyList;
        private bool hasAddedState;
    
        public void Initialize()
        {
            Logging.Write("[EnemyAlert] Started.");
            _isLaunched = true;
            todaysDates = DateTime.Now;
    
            //Fixed issue for BN_WHISPER not defined.
            initializeEnemiesList();
            nextEnemyAlertTime = DateTime.Now;
            doStuffLoop();
            FiniteStateMachineEvents.OnBeforeCheckIfNeedToRunState += new FiniteStateMachineEvents.FSMEngineStateCancelableHandler(this.FiniteStateMachineEvents_OnBeforeCheckIfNeedToRunState);
    
        }
        private void initializeEnemiesList()
        {
            if (_settings.enemyAlertEnabled)
            {
                string[] enemySplit = _settings.enemyNamesList.Split(',');
                myEnemyList = new List<string>(enemySplit);
            }
    
        }
    
        public void Dispose()
        {
            nextEnemyAlertTime = DateTime.Now;
            myEnemyList = null;
            FiniteStateMachineEvents.OnBeforeCheckIfNeedToRunState -= new FiniteStateMachineEvents.FSMEngineStateCancelableHandler(this.FiniteStateMachineEvents_OnBeforeCheckIfNeedToRunState);
            _isLaunched = false;
            Logging.Write("[RoboAlert] Disposed.");
        }
        public void Settings()
        {
            _settings.ToForm();
            _settings.Save();
        }
    
        public void doStuffLoop()
        {
    
            while (Products.IsStarted && _isLaunched)
            {
                // Products.InPause = true;
    
    
                if (!Products.InPause)
                {
    
                    if (_settings.enemyAlertEnabled)
                        GetEnemiesNearMe();
                    Thread.Sleep(20000);
                }
            }
    
        }
        private void FiniteStateMachineEvents_OnBeforeCheckIfNeedToRunState(
      Engine engine,
      robotManager.FiniteStateMachine.State state,
      CancelEventArgs cancelable)
        {
            if (this.hasAddedState)
                return;
            int priority = engine.States.Find((Predicate<robotManager.FiniteStateMachine.State>)(s => s.GetType() == typeof(Grinding))).Priority;
            Engine engine1 = engine;
            LeaveHaters leaveHaters = new LeaveHaters();
            leaveHaters.Priority = priority + 5;
            engine1.AddState((robotManager.FiniteStateMachine.State) leaveHaters);
            Logging.Write("[TSO]: Profession Training state added.", Logging.LogType.Normal, Color.SteelBlue);
            engine.States.Sort();
            this.hasAddedState = true;
        }
        public bool GetEnemiesNearMe()
        {
            var enemiesNearMe = GetEnemiesNearMe(_settings.enemyScanRange, myEnemyList);
            if(!(ObjectManager.Me.InCombatFlagOnly) && enemiesNearMe.Count > 0 && (DateTime.Now > nextEnemyAlertTime))
            {
                nextEnemyAlertTime = DateTime.Now.AddSeconds(_settings.enemyAlertWaitTime);
                Enemynear = true;
                var enemyNames = "";
                foreach (var enemy in enemiesNearMe)
                {
                    enemyNames += (enemy.Name + " ");
                }
                Logging.Write("[EnemyAllert] Enemies Near Me ");
                wManager.Wow.Helpers.Lua.LuaDoString("BasicScriptErrors:SetScale(6) if BasicScriptErrors:IsShown() then BasicScriptErrors:Hide() end message('ХЕЙТЕР " + enemyNames + "')");
                return Enemynear;
            }
            return false;          
        }
    
        private List<WoWPlayer> GetEnemiesNearMe(int range, List<string> enemyName)
        {
    
            foreach (var enemy in enemyName)
            {
                Logging.Write(enemy);
            }
    
            List<WoWPlayer> enemiesNearMe = ObjectManager.GetObjectWoWPlayer().FindAll(p => p.GetDistance <= range && enemyName.Contains(p.Name) && p.IsAlive);
            return enemiesNearMe;
        }
    
    
        private roboAlertSettings _settings
        {
            get
            {
                try
                {
                    if (roboAlertSettings.CurrentSetting == null)
                        roboAlertSettings.Load();
                    return roboAlertSettings.CurrentSetting;
                }
                catch
                {
                }
                return new roboAlertSettings();
            }
            set
            {
                try
                {
                    roboAlertSettings.CurrentSetting = value;
                }
                catch
                {
                }
            }
        }
    
        [Serializable]
        public class roboAlertSettings : Settings
        {
    
            public roboAlertSettings()
            {
                enemyAlertEnabled = true;
                enemyNamesList = "Sosuza,player2,player3";
                enemyAlertWaitTime = 20;
                enemyScanRange = 500;
            }
    
    
            [Setting]
            [Category("Enemy Alert Settings")]
            [DisplayName(" Enemy Alert Enabled")]
            public bool enemyAlertEnabled { get; set; }
            [Setting]
            [Category("Enemy Alert Settings")]
            [DisplayName("Enemy Names")]
            [Description("Check for specific Enemy by name. For multiple enemies, use a comma seperated list (Do not include spaces). This can be used in either the Elite Name or Normal Enemy Name.")]
            public string enemyNamesList { get; set; }
            [Setting]
            [Category("Enemy Alert Settings")]
            [DisplayName("Enemy Alert Pulse")]
            [Description("Time to wait until creating another subsequent alert after receiving an Enemy Alert (seconds). This prevents spamming of the alert")]
            public int enemyAlertWaitTime { get; set; }
            [Setting]
            [Category("Enemy Alert Settings")]
            [DisplayName("Enemy Scan Range")]
            [Description("The max range that RoboAlert will scan for enemies near you. (default is 500 units)")]
            public int enemyScanRange { get; set; }
    
            public static roboAlertSettings CurrentSetting { get; set; }
    
            public bool Save()
            {
                try
                {
                    return Save(AdviserFilePathAndName("EnemyAlert", ObjectManager.Me.Name + "." + Usefuls.RealmName));
                }
                catch (Exception e)
                {
                    Logging.WriteError("EnemyAlert > Save(): " + e);
                    return false;
                }
            }
    
            public static bool Load()
            {
                try
                {
                    if (File.Exists(AdviserFilePathAndName("EnemyAlert", ObjectManager.Me.Name + "." + Usefuls.RealmName)))
                    {
                        CurrentSetting =
                            Load<roboAlertSettings>(AdviserFilePathAndName("EnemyAlert",
                                                                          ObjectManager.Me.Name + "." + Usefuls.RealmName));
                        return true;
                    }
                    CurrentSetting = new roboAlertSettings();
                }
                catch (Exception e)
                {
                    Logging.WriteError("EnemyAlert > Load(): " + e);
                }
                return false;
            }
        }
    
    
    }

    LeaveHaters.cs

    using robotManager.Helpful;
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Drawing;
    using System.Linq;
    using System.Threading;
    using wManager.Wow.Bot.Tasks;
    using wManager.Wow.Class;
    using wManager.Wow.Enums;
    using wManager.Wow.Helpers;
    using wManager.Wow.ObjectManager;
    
    internal class LeaveHaters : robotManager.FiniteStateMachine.State
    {
        private int _priority;
    
        public override string DisplayName
        {
            get
            {
                return "Test State";
            }
        }
    
        public override int Priority
        {
            get
            {
                return this._priority;
            }
            set
            {
                this._priority = 99;
            }
        }
    
        public override bool NeedToRun
        {
            get
            {
                return Main.Enemynear && (!ObjectManager.Me.InCombat && !ObjectManager.Me.IsCast && !ObjectManager.Me.IsLooting());
            }
        }
    
        public override List<robotManager.FiniteStateMachine.State> NextStates
        {
            get
            {
                return new List<robotManager.FiniteStateMachine.State>();
            }
        }
    
        public override List<robotManager.FiniteStateMachine.State> BeforeStates
        {
            get
            {
                return new List<robotManager.FiniteStateMachine.State>();
            }
        }
    
        public override void Run()
        {
            wManager.Events.FightEvents.OnFightLoop += delegate (WoWUnit unit, CancelEventArgs cancelable)
            {
                
                
                    var toPosition = new Vector3(4286.155, -884.4277, 251.7935, "Flying");
                    LongMove.LongMoveGo(toPosition);
                
            };
        }
        
    }

    I would be grateful for any help

  4. I have already spent several days trying to come up with something to implement through the plugin and it seems to me that this venture failed, all that I found and that could work to get the bot to go somewhere during grind (immediately after the battle) or (farm ore or grass), the bot can’t just leave and go where I need to. Maybe this can be implemented somehow differently, for example, to call a special state with a high priority, if a specific player is nearby, but I found even less information regarding the forum states

  5.     public void Initialize()
        {
                if (_settings.enemyAlertEnabled)
                {
                    string[] enemySplit = _settings.enemyNamesList.Split(',');
                    myEnemyList = new List<string>(enemySplit);
                    robotManager.Events.FiniteStateMachineEvents.OnBeforeCheckIfNeedToRunState += delegate (Engine engine, State state, CancelEventArgs cancelable)
                    {
                        if (!(state is wManager.Wow.Bot.States.IsAttacked) || ObjectManager.Me.InCombat || ObjectManager.Me.IsCast || ObjectManager.Me.IsLooting())
                            return;
                                while (!wManager.Wow.Helpers.Conditions.IsAttackedAndCannotIgnore)
                                {
                                   var enemiesNearMe = GetEnemiesNearMe(_settings.enemyScanRange, myEnemyList);
                                   if (enemiesNearMe.Count > 0 && GetUnitsNearMe(50).Count == 0)
                                   {
                                        moveto();
                                        Thread.Sleep(200);
                                   }
                                }
    
    
                    };
                }
    
      
    
    }
    
        private void moveto()
        {
                    wManager.Events.FightEvents.OnFightLoop += delegate (WoWUnit unit, CancelEventArgs cancelable)
                    {
                        var toPosition = new Vector3(4286.155, -884.4277, 251.7935, "Flying");
                        LongMove.LongMoveGo(toPosition);
                    };        
        }
        public List<WoWUnit> GetUnitsNearMe(int range)
        {
            List<WoWUnit> GetUnitsNearMe = wManager.Wow.ObjectManager.ObjectManager.GetWoWUnitHostile().FindAll(u => (double)u.GetDistance <= range);
            return GetUnitsNearMe;
        }

    If the bot is farming and a specific player flies up to it, it simply finishes the mobs and becomes afk (it doesn’t even take loot).

  6. private void initializeEnemiesList()
        {
            if (_settings.enemyAlertEnabled)
            {
                string[] enemySplit = _settings.enemyNamesList.Split(',');
                myEnemyList = new List<string>(enemySplit);
            }
    
        }
     public void enemyAlert()
        {
    
            var enemiesNearMe = GetEnemiesNearMe(_settings.enemyScanRange, myEnemyList);
            if (!(ObjectManager.Me.InCombatFlagOnly) && enemiesNearMe.Count > 0 && (DateTime.Now > nextEnemyAlertTime))
            {
                nextEnemyAlertTime = DateTime.Now.AddSeconds(_settings.enemyAlertWaitTime);
                var enemyNames = "";
                foreach (var enemy in enemiesNearMe)
                {
                    enemyNames += (enemy.Name + " ");
                }
                moveto();
                Logging.Write("[RoboAlert] Enemies Near Me ");
    			wManager.Wow.Helpers.Lua.LuaDoString("BasicScriptErrors:SetScale(6) if BasicScriptErrors:IsShown() then BasicScriptErrors:Hide() end message('HATER "  + enemyNames + "')");
    
        }
    
        private void moveto()
        {
            wManager.Events.FightEvents.OnFightLoop += delegate (WoWUnit unit, CancelEventArgs cancelable)
            {
                var enemiesNearMe = GetEnemiesNearMe(_settings.enemyScanRange, myEnemyList);
                if (enemiesNearMe.Count > 0)
        {
                    var toPosition = new Vector3(4286.155, -884.4277, 251.7935, "Flying");
                    wManager.Wow.Helpers.MovementManager.MoveTo(toPosition);
                    while (wManager.Wow.Helpers.MovementManager.InMoveTo && toPosition.DistanceTo(wManager.Wow.ObjectManager.ObjectManager.Me.Position) > 17)
                    {
                        System.Threading.Thread.Sleep(10000);
                    }
                }
            };
        }

    What code could be placed in the body of the method moveto() so that the bot flew to a specific point if the enemy suddenly appeared nearby, And after that the bot returned

  7. Hi guys, I'm editing Roboalert, or rather I'm trying to add a method thanks to which the bot will fly to a certain point if it meets a certain player (bot catcher)

        public void LeavePlace()
        {
            robotManager.Events.FiniteStateMachineEvents.OnRunState += (FiniteStateMachineEvents.FSMEngineStateCancelableHandler)((engine, state, cancelable) =>
            {
                    Vector3 newpos = new Vector3()
                    {
                        X = 5296.862f,
                        Y = 974.8112f,
                        Z = 447.8605f,
                        Type = "Flying"
                    };
                    Logging.Write("Leave");
                    wManager.Wow.Helpers.LongMove.LongMoveByNewThread(newpos);
                    if (wManager.Wow.Helpers.LongMove.IsLongMove)
                    {
                        Thread.Sleep(20000);
                        Logging.Write("летим");
                    }
                    
                
            });
        }

    I tried to put everything in one method, but it turned out - some shit 

  8. hi, is there a c# way to targeting npcs like a lua TargetUnit()? by using this code "ObjectManager.Me.Target = ObjectManager.GetWoWUnitByName("Havenshire Stallion").First().Guid;" bot starts move straight to target and interact with them instead of just targeting

  9. I mainly use Grinder, and I do a lot tasks like "Run" in the reloger, and when there is a change of "run", the bot uses the Path Finder, which automatically draws a route through the bottom of any rivers and lakes. There is a solution - add to the blacklist all the reservoirs that are between the routes, and you need to do blacklists at the bottom of the reservoirs and not on their surface, if on the surface - the bot can ignore the blacklist and get stuck.

  10. On 4/28/2018 at 8:21 PM, Droidz said:

    Hello, 

    he go from location from A to B or because he try to rearch mob/node in water?

     

    a bot often flies from one location to another. When a bot flies over water, it often uses points under water when it is on a flying mount and starts to get stuck on the surface without dismounting from the mount. Please help with the solution

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.