Jump to content

Relogger plugin


Pudge

Recommended Posts

Hi, I am trying to make a plugin for a relogger that will change account data depending on the conditions. I am facing a problem.

System.Threading.Tasks.Task.Factory.StartNew(() =>
            {
                
                    for (int i = 0; i < Relogger.Classes.ReloggerGeneralSettings.CurrentSetting.Profiles.Count; i++)
                    {
                        try
                        {
                        var p = Relogger.Classes.ReloggerGeneralSettings.CurrentSetting.Profiles[i];
                        if (p.Checked && p.Name.ToLower().Contains("myaccountname"))
                        {
                            robotManager.Helpful.Logging.Write("124");
                            p.CurrentWowAccount.AccountName = "1242";
                            p.CurrentWowAccount.Password = "1242";
                            
                        }
                    }
                        catch (Exception e)
                        {
                            robotManager.Helpful.Logging.WriteError(Name + " > " + e);
                        }

                    }

            });

When trying to read or change the field CurrentWowAccount.AccountName or CurrentWowAccount.Password I get the error:

[E] 22:26:06 - CHANGEKEY > System.NullReferenceException: Ссылка на объект не указывает на экземпляр объекта.
в MyNamespace.MyPlugin.b__0()

Is it possible to implement changing account data through a plugin or is this error a consequence of data protection?

Link to comment
Share on other sites

Hey,

In you log you have line  robotManager.Helpful.Logging.Write("124")?

try to add these lines afer:

                        robotManager.Helpful.Logging.Write("p.CurrentWowAccount==null > " + (p.CurrentWowAccount == null));
                        robotManager.Helpful.Logging.Write("p.CurrentWowAccount.AccountName==null > " + (p.CurrentWowAccount.AccountName == null));
                        robotManager.Helpful.Logging.Write("p.CurrentWowAccount.Password==null > " + (p.CurrentWowAccount.Password == null));

You run this code at start? if yes try to wait few seconds (maybe relogger profiles are not completly loaded)

Link to comment
Share on other sites

1 hour ago, Droidz said:

You run this code at start?

This is the body of the OnButtonPress() method

Аfter adding 

robotManager.Helpful.Logging.Write("p.CurrentWowAccount==null > " + (p.CurrentWowAccount == null));
                        robotManager.Helpful.Logging.Write("p.CurrentWowAccount.AccountName==null > " + (p.CurrentWowAccount.AccountName == null));
                        robotManager.Helpful.Logging.Write("p.CurrentWowAccount.Password==null > " + (p.CurrentWowAccount.Password == null));

We get:

238673641_(2021_09.2413-34-44).jpg.2d6848098b8cf41194fa0b88b5932bc1.jpg

 

Link to comment
Share on other sites

I think I figured out why it didn't work. p.CurrentWowAccount == null if no windows are running in the relogger.

There is one more problem, the relogger for some reason does not support the russian language, instead of it there are some symbols in the form of a question mark.

do so:

robotManager.Helpful.Logging.Write("авбгдиичоаып");

we get:

22:03:04 - ������������

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...