insanity 11 Posted April 9, 2017 Share Posted April 9, 2017 Hey, Is there an easy way to force the bot to pause for like 20-30 seconds dependant on hp/mana of pet, after combat. I've tried with Thread.Sleep(20000) as a spell in my fightclass with hp condition of my pet and not in combat. According to the log, it actually runs the spell, but the bot will just continue attacking mobs. Link to comment https://wrobot.eu/forums/topic/5619-force-bot-to-take-a-break/ Share on other sites More sharing options...
Zan 99 Posted April 9, 2017 Share Posted April 9, 2017 Did you try Others.Wait(20000) ? Link to comment https://wrobot.eu/forums/topic/5619-force-bot-to-take-a-break/#findComment-25637 Share on other sites More sharing options...
Droidz 2738 Posted April 11, 2017 Share Posted April 11, 2017 Hello, try new Thread(() => { robotManager.Products.Products.InPause = true; Thread.Sleep(20 * 1000); // 20 secondes robotManager.Products.Products.InPause = false; }).Start(); or robotManager.Products.Products.InPause = true; Thread.Sleep(20 * 1000); // 20 secondes robotManager.Products.Products.InPause = false; Link to comment https://wrobot.eu/forums/topic/5619-force-bot-to-take-a-break/#findComment-25693 Share on other sites More sharing options...
insanity 11 Posted April 11, 2017 Author Share Posted April 11, 2017 Yep. I actually used simular code as you Droidz. Now I got a new problem. I want to run this code RANDOMLY after combat when the manapercent of my pet is less than xx. Eg. condition: Pet.Manapercent <= 20 && (Others.Random(1,20) <= 4) && Notincombat.. Since the bot checks spells conditions each tick?, the random condition will eventually return true, because it runs often. The result is that the bot always pauses after combat when manapercent of pet is less that 20. Would it be possible to only check these conditions once after combat? Is there a easier solution? Link to comment https://wrobot.eu/forums/topic/5619-force-bot-to-take-a-break/#findComment-25694 Share on other sites More sharing options...
insanity 11 Posted April 14, 2017 Author Share Posted April 14, 2017 Not possible? Link to comment https://wrobot.eu/forums/topic/5619-force-bot-to-take-a-break/#findComment-25796 Share on other sites More sharing options...
Mykoplazma 24 Posted April 14, 2017 Share Posted April 14, 2017 Everything is possible. It will be easier to make plugin to do that. I have something like that so what you need exactly? to stop the bot we need : in_combat = false petMana < 20% and ( % chance to stop? ) to start it again we need? time interval? random time interval? external stimuli? Link to comment https://wrobot.eu/forums/topic/5619-force-bot-to-take-a-break/#findComment-25797 Share on other sites More sharing options...
insanity 11 Posted April 16, 2017 Author Share Posted April 16, 2017 Sorry for late reply. Yes something like that. Conditions: Not in combat, should be straight after combat. Pet Mana < 20 Randomizer, lets say 25% for beeing true. When all these conditions is true, we should pause bot for like 20 seconds, something like this: robotManager.Products.Products.InPause = true; Others.Wait(Others.Random(20000); robotManager.Products.Products.InPause = false; Link to comment https://wrobot.eu/forums/topic/5619-force-bot-to-take-a-break/#findComment-25877 Share on other sites More sharing options...
insanity 11 Posted April 18, 2017 Author Share Posted April 18, 2017 Up Link to comment https://wrobot.eu/forums/topic/5619-force-bot-to-take-a-break/#findComment-25950 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