craine 0 Posted June 9, 2017 Share Posted June 9, 2017 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 ? Link to comment https://wrobot.eu/forums/topic/6066-is-it-possible-to-modify-a-profile-while-the-bot-is-running/ Share on other sites More sharing options...
reapler 154 Posted June 9, 2017 Share Posted June 9, 2017 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) Link to comment https://wrobot.eu/forums/topic/6066-is-it-possible-to-modify-a-profile-while-the-bot-is-running/#findComment-27586 Share on other sites More sharing options...
craine 0 Posted June 9, 2017 Author Share Posted June 9, 2017 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. Link to comment https://wrobot.eu/forums/topic/6066-is-it-possible-to-modify-a-profile-while-the-bot-is-running/#findComment-27594 Share on other sites More sharing options...
reapler 154 Posted June 9, 2017 Share Posted June 9, 2017 Hello, i'm glad to hear it. If you have a specific question you may ask here on the forum. I also recommend to look into https://stackoverflow.com/ if you have a c# related question on your mind. Edit: forgot to mention that https://www.dotnetperls.com/ is also a good source for simple examples Link to comment https://wrobot.eu/forums/topic/6066-is-it-possible-to-modify-a-profile-while-the-bot-is-running/#findComment-27599 Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now