Jump to content

Pudge

WRobot user
  • Posts

    348
  • Joined

  • Last visited

Posts posted by Pudge

  1. 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

  2.     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).

  3. 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

  4. 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 

  5. 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

  6. 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.

  7. 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

×
×
  • Create New...