This site uses cookies! Learn More

This site uses cookies!

By continuing to use this site, you agree to allow us to store cookies on your computer. :)

  • 0
craine

Is it possible to modify a profile while the bot is running ?

Question

Hello again, did you miss me ? Anyway.

 

I recently began to mess up with the party chat command plugin from droidz, to study the way the bot can work with user input from the game itself.

It turned out the bot can do a crazy tons of things with this plugins. So i began making a quest profile that use the custom commands to make the bot do simple things like grind a mob or gather some stuff around him. With this system, the player can play his character while being assissted by the bot.

example:

"go take out thoses bunnies around my farm" - NPC - just target a bunny, use a macro, and the bot will grind the bunnies as long has the user tell him to stop.

The problem is... is it possible to change the profile or change a specific settings while the bot is running ?

If i use the automaton to grind bunnies, i need to set the bunnies as the mobs to kill.

I was thinking of use the grinder and create a profile everytime you use the farm command then restart the bot but it might cause trouble to users with low performanc pc.

 

Do you guys have any idea ?

 

 

Share this post


Link to post
Share on other sites

3 answers to this question

Recommended Posts

  • 0

Hello it is possible, but you need to create an extra thread to run your plugin because if the product is stopped it will also dispose your plugin(you also need to write it to memorycache). So you could do different tasks while product is stopped like changing product or i guess even the profile and the other stuff you have mentioned. But it costs work :)

You can find the thread & cache manager under this post:

Usage:

	//...
	public void Initialize()//method from WRobot plugin interface
    {
        ThreadManager threadManager = new ThreadManager();
        if (!threadManager.CacheManager_.IsIncache("Pulse"))
        {
            new ThreadManager().Start(Pulse, true, DateTime.Now.AddMinutes(30));
        }
	}
	//...


    public void Pulse()
    {
        robotManager.Helpful.Logging.Write("Initialized");

        //...things you want to initialize


        var timer = new robotManager.Helpful.Timer(1000);
        timer.ForceReady();
        while (true)
        {
            try
            {
                if (Conditions.ProductIsStartedNotInPause
                    && Conditions.InGameAndConnected
                    && timer.IsReady)
                {
                    robotManager.Helpful.Logging.Write("Pulse");

                    //...on pulse

                    timer.Reset();
                }
            }
            catch (Exception e)
            {
                robotManager.Helpful.Logging.WriteError(e.ToString());
            }
            Thread.Sleep(30);
        }
    }
    

 

Edit:

Important: if the mentioned code will be used to change settings it can fail on specific products(automaton is known after some researches)

Share this post


Link to post
Share on other sites
  • 0

mmmm 

i understand what you mean but  it might be a bit hard to achive for my level, i'll look into it and try some things with a new thread to learn how that work.

 

Share this post


Link to post
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