Jump to content

Pudge

WRobot user
  • Posts

    348
  • Joined

  • Last visited

Posts posted by Pudge

  1. Hello everybody, i need some help with my code....
    I use this method to load quest profile from plugin or in Runcode:

    public static void LoadProfile(string file)
        {
            System.Threading.Tasks.Task.Factory.StartNew(() =>
            {
                Logging.Write("[QuestHelper]: loading profile " + file);
                Quester.Bot.QuesterSetting.CurrentSetting.ProfileName = file;
                Quester.Bot.QuesterSetting.CurrentSetting.Save();
                Thread.Sleep(2000);
                robotManager.Products.Products.ProductRestart();
            });
        }

    But i always get next error after executing code:

    [D] 21:45:05 - [FSM] State wManager.Wow.Bot.States.Idle already launched, ignore it.
    [D] 21:45:05 - [FSM] State   already launched, ignore it.
    [D] 21:45:05 - [FSM] State wManager.Wow.Bot.States.Trainers already launched, ignore it.
    [D] 21:45:05 - [FSM] State wManager.Wow.Bot.States.Talents already launched, ignore it.
    [D] 21:45:05 - [FSM] State wManager.Wow.Bot.States.FlightMasterDiscoverState already launched, ignore it.
    [D] 21:45:05 - [FSM] State wManager.Wow.Bot.States.ToTown already launched, ignore it.
    [D] 21:45:05 - [FSM] State wManager.Wow.Bot.States.FlightMasterTakeTaxiState already launched, ignore it.
    [D] 21:45:05 - [FSM] State wManager.Wow.Bot.States.ProspectingState already launched, ignore it.
    [D] 21:45:05 - [FSM] State wManager.Wow.Bot.States.MillingState already launched, ignore it.
    [D] 21:45:05 - [FSM] State wManager.Wow.Bot.States.Farming already launched, ignore it.
    [D] 21:45:05 - [FSM] State wManager.Wow.Bot.States.Looting already launched, ignore it.
    [D] 21:45:05 - [FSM] State wManager.Wow.Bot.States.Regeneration already launched, ignore it.
    [D] 21:45:05 - [FSM] State wManager.Wow.Bot.States.FarmingRange already launched, ignore it.
    [D] 21:45:05 - [FSM] State wManager.Wow.Bot.States.LootingRange already launched, ignore it.
    [D] 21:45:05 - [FSM] State wManager.Wow.Bot.States.BattlePetState already launched, ignore it.
    [D] 21:45:05 - [FSM] State wManager.Wow.Bot.States.IsAttacked already launched, ignore it.
    [D] 21:45:05 - [FSM] State wManager.Wow.Bot.States.MyMacro already launched, ignore it.
    [D] 21:45:05 - [FSM] State wManager.Wow.Bot.States.Resurrect already launched, ignore it.
    [D] 21:45:05 - [FSM] State wManager.Wow.Bot.States.Pause already launched, ignore it.
    [D] 21:45:05 - [FSM] State wManager.Wow.Bot.States.Relogger already launched, ignore it.

     

    Аfter these lines in the log, the bot stops working and just stay.

    I cant understand what is wrong with this code and how to make it work as it should, I will be glad of any help.

     

     

     

     

     

  2. for (int i = 0; i < Relogger.Classes.ReloggerGeneralSettings.CurrentSetting.Profiles.Count; i++)
                        {
                            var p = Relogger.Classes.ReloggerGeneralSettings.CurrentSetting.Profiles[i];
    
    
                            if (p.Status == Relogger.Classes.Status.Running)
                            {
                                if (p.CurrentWowAccount.Server == "server name")
                                {
                                    if (p.ExistWowProcess())
                                    {
                                        p.KillWowProcess();
                                        robotManager.Helpful.Logging.Write(Name + ": Kill wow for  " + p.Name);
                                    }
                                    if (p.ExistWRobotProcess())
                                    {
                                        p.ExistWRobotProcess();
                                        robotManager.Helpful.Logging.Write(Name + ": Kill Bot for  " + p.Name);
                                    }
                                    p.Stop();
                                    Thread.Sleep(Others.Random(5000, 10000));
                                }
                            }
    
                        }

    It works, thanks.

  3. Hi, I have a need to stop all bots on separate servers, how can I do this using the reloger plugin?

    I wrote a small plugin

    using robotManager.Helpful;
    using System;
    using System.Threading;
    using System.Windows.Forms;
    
    namespace Killer
    {
        public class MyPlugin : Relogger.ReloggerPlugin
        {
            public override string Name { get { return "Killer"; } }
    
            bool IsRunning { get; set; }
    
            public override void OnStart()
            {
            }
            public override void OnStop()
            {
                IsRunning = false;
            }
    
            public override void OnButtonPress()
            {
                System.Threading.Tasks.Task.Factory.StartNew(() =>
                {
                Logging.WriteDebug("Kill all tasks started");
                for (int i = 15; i > 0; i--)
                {
                    Logging.WriteDebug(i + " seconds until start end");
                    Thread.Sleep(1000);
                }
                try
                {
    
                    for (int i = 0; i < Relogger.Classes.ReloggerGeneralSettings.CurrentSetting.Profiles.Count; i++)
                    {
                        var p = Relogger.Classes.ReloggerGeneralSettings.CurrentSetting.Profiles[i];
    
                        if (p.Status == Relogger.Classes.Status.Running)
                        {
                            if (p.ExistWowProcess())
                            {
                                p.KillWowProcess();
                                robotManager.Helpful.Logging.Write(Name + ": Kill wow for  " + p.Name);
                            }
                            if (p.ExistWRobotProcess())
                            {
                                p.ExistWRobotProcess();
                                robotManager.Helpful.Logging.Write(Name + ": Kill Bot for  " + p.Name);
                            }
                            p.Stop();
                            Thread.Sleep(Others.Random(5000, 10000));
                        }
                    }
                }
                catch (Exception e)
                {
                    robotManager.Helpful.Logging.WriteError(Name + " > " + e);
                }
                });
                //System.Threading.Thread.Sleep(500);
    
                base.OnButtonPress();
            }
        }
    }

    that turns off all running bots.
    Is it possible to implement this through the ReloggerPlugin or some other way?

    @Droidz would not want to add the ability to use multiple RelogerGeneralSettings.xml instead of copying the bot folder.But I would like to be able to stop bots on specific servers without stopping everyone.

  4. Hi everyone, I have a question, how better to change the fight class... When I use the next code

     if(ObjectManager.Me.WowClass == WoWClass.Paladin)
      {
          wManager.wManagerSetting.CurrentSetting.CustomClass = "ret_pal.cs";
      }
      CustomClass.DisposeCustomClass();
      Thread.Sleep(2000);
      CustomClass.LoadCustomClass();

    Sometimes the fiteclass for some reason does not load, can someone tell me another way without bugs?

    And I would also like to understand what the CustomClass.ResetCustomClass() method does?

  5.  

    [E] 17:41:02 - Compilator Error :
    error CS0009: Не удалось открыть файл метаданных "c:\Windows\Microsoft.NET\Framework\v4.0.30319\mscorlib.dll" -- "Процесс не может получить доступ к файлу, так как этот файл занят другим процессом."

    Hi, recently this error started appearing when starting the bot while loading plugins. I don't understand where it can be from..

  6. 
    public class MyCustomScript
    {
        static MyCustomScript()
        {
            robotManager.Events.ProductEvents.OnProductStopping += OnProductStopping;//subscribe
        }
        public static void OnProductStopping(string str)
    	{
            //code when product stopping
    		Logging.Write("Stopping " + str);
            robotManager.Events.ProductEvents.OnProductStopping -= OnProductStopping; //unsubscribe
    	}
    }
    

     

  7. Hi guys, does anyone know if there is a way to use a method like Dispose () as in the plugin, only in the quester, namely in a custom script, when the product stops, I need to reset some custom settings that I write in an xml file. In general, i just need a method that will be triggered before the Quester stops.

  8. Hey there, have a quick question, blacklists are always work in 2d mode? Not in 3d? Until this moment, I did not notice this, but it seems that this is how it works. I'm blacklisting area on Z = 87 with a radius = 5 polyarea_bigdanger, and npc which is at Z = 101 gets blacklisted (IsBlacklisted = True)
     

     

    image.png.06c81aba23e7e6e1034251719ea01a0c.png

  9. On 12/27/2020 at 3:50 PM, Droidz said:

    hi,

    Are you sure that your path only requires 1 offmesheconnection? Because WRobot can only support 1 per path.

    Share here (or by private message) offmeshesconnection used and from/to path (that you want fix)


    Hi!  I dont know, what that means support 1 per path... maybe i'm dumb or have too low iq, ah, dont care.

    Really need 2 connections for this lift, up and down, object id 190118, for some reason it is impossible to force the bot to use offmesh connections, it generates weird straight paths across the rock ...

    new Vector3(1695.941, -5839.131, 11.99734) // character wait/leave pos at bottom

    new Vector3(1688.42, -5831.752, 12.07372) // pos to enter lift at bottom

    new Vector3(1680.11, -5824.42, -72.76543) // lift stop pos bottom

    new Vector3(1680.11, -5824.42, 161.673)) // lift stop pos top

    new Vector3(1687.812, -5831.235, 246.5121, "None") // pos to enter lift at top

    new Vector3(1662.868f, -5808.526f, 252.1796f, "None") // character wait/leave pos at top

     

     

  10. Thanks, have already found Droidz's post with the barrens elevator

     

    Made by this sample, put in plugin and it works.
     

        private void InitializeOffmeshes()
        {
            List<PathFinder.OffMeshConnection> Doodad_VR_Elevator_Lift02_FJORD = new List<PathFinder.OffMeshConnection>
            {
                new PathFinder.OffMeshConnection(new List<Vector3>
                {
                    new Vector3(1596.064, -5748.844, 255.9307), 
                    new Vector3(1677.591, -5822.056, 248.18), // elevator waiting point at the top
                    new Vector3(1688.42, -5831.752, 246.5121) {Action = "c#: Logging.WriteNavigator(\"[OffMeshConnection] Fjord Horde Elevator DOWN > Wait Elevator\"); while (Conditions.InGameAndConnectedAndProductStartedNotInPause) { var elevator = ObjectManager.GetWoWGameObjectByEntry(190118).OrderBy(o => o.GetDistance).FirstOrDefault(); if (elevator != null && elevator.IsValid && elevator.Position.DistanceTo(new Vector3(1680.11, -5824.42, 161.673)) < 0.5) break; Thread.Sleep(10); }"}, // the point at which we stand in the elevator and the elevator stopping point at the top
                    new Vector3(1695.742, -5839.653, 11.995) {Action = "c#: Logging.WriteNavigator(\"[OffMeshConnection] Fjord Horde Elevator DOWN > Wait to leave Elevator\"); while (Conditions.InGameAndConnectedAndProductStartedNotInPause) { var elevator = ObjectManager.GetWoWGameObjectByEntry(190118).OrderBy(o => o.GetDistance).FirstOrDefault(); if (elevator != null && elevator.IsValid && elevator.Position.DistanceTo(new Vector3(1680.11, -5824.42, -72.76543)) < 0.5) break; Thread.Sleep(10); }"}, // elevator exit point below and elevator stop point below
                    new Vector3(1704.343, -5831.836, 11.99983),
                    new Vector3(1720.702, -5847.75, 5.766593),
                }, (int)ContinentId.Northrend, PathFinder.OffMeshConnectionType.Unidirectional, true),
    
                new PathFinder.OffMeshConnection(new List<Vector3>
                {
                    new Vector3(1720.702, -5847.75, 5.766593),
                    new Vector3(1704.343, -5831.836, 11.99983),
                    new Vector3(1695.941, -5839.131, 11.99734), // elevator waiting point below
                    new Vector3(1688.42, -5831.752, 12.07372) {Action = "c#: Logging.WriteNavigator(\"[OffMeshConnection] Fjord Horde Elevator UP > Wait Elevator\"); while (Conditions.InGameAndConnectedAndProductStartedNotInPause) { var elevator = ObjectManager.GetWoWGameObjectByEntry(190118).OrderBy(o => o.GetDistance).FirstOrDefault(); if (elevator != null && elevator.IsValid && elevator.Position.DistanceTo(new Vector3(1680.11, -5824.42, -72.76543)) < 0.5) break; Thread.Sleep(10); }"}, // the point at which we stand in the elevator and the elevator stopping point below
                    new Vector3(1677.591, -5822.056, 248.18) {Action = "c#: Logging.WriteNavigator(\"[OffMeshConnection] Fjord Horde Elevator UP > Wait to leave Elevator\"); while (Conditions.InGameAndConnectedAndProductStartedNotInPause) { var elevator = ObjectManager.GetWoWGameObjectByEntry(190118).OrderBy(o => o.GetDistance).FirstOrDefault(); if (elevator != null && elevator.IsValid && elevator.Position.DistanceTo(new Vector3(1680.11, -5824.42, 161.673)) < 0.5) break; Thread.Sleep(10); }"}, // elevator exit point at the top and elevator stop point at the top
                    new Vector3(1596.064, -5748.844, 255.9307),
                }, (int)ContinentId.Northrend, PathFinder.OffMeshConnectionType.Unidirectional, true),
            };
    
            PathFinder.OffMeshConnections.AddRange(Doodad_VR_Elevator_Lift02_FJORD);
            PathFinder.OffMeshConnections.Save();
        }

     

    Still don't understand why Droidz didn't add all of the elevator offmeshes to pathfinder if that is so easy.

  11. Hi, I want to use the same quest in different profiles, for example fly to dalaran (follow path type) quest, I know this can be done via custom script but I don't understand a little how to use it (in quest editor), need a little help, thanks in advance.


    image.thumb.png.0e884a0a65fa86eb463b37d89c694f15.png

     

  12. 23 hours ago, TheSmokie said:

    Hey @pudge, While i was looking to help you, I've looking into offsets that does what you asking, this works, I tested it on my account and it returned the name. enjoy.

    Note : i only ran in dev tools.

    
    
    
    var accountName = wManager.Wow.Memory.WowMemory.Memory.ReadStringUTF8(0x10D7914);
      if(!string.IsNullOrEmpty(accountName))
      {
        Logging.Write(accountName.ToString());
      }

     

    this code does'nt always return the account name =(

    need a 100% method, otherwise you get something like this...image.png.cdbf6ae96e41fa0b40ec67ff9569c5f7.png

  13. Hi all, please tell me if anyone knows what code I need to use to get the name of the account on which the bot is running? I need several bots on the same account to somehow understand that they are on the same account. I do not know something like a CML file with the account name, so that several characters use the settings for the account on which they (these characters) are. The problem is that I do not know how to get the account name from the relogger or using Lua...

×
×
  • Create New...