vanbotter 12 Posted July 15, 2018 Share Posted July 15, 2018 Hi Very new to this, so far levelled a lock to 20 and a warrior to 10. Working great. One issue i do have is the warriror just standing idle to regen when out of combat. Looks very botty. I'd like there to be an option to sit for regen considering it increases health regen by 33% in Vanilla and warriors regen is already (0.8x spirit)+6 so quite high. I saw someone post you can make a plugin by simply copying a free one and putting this as the loop... I can't get this to work, i don't know anything about C programming but i edited an existing .cs file and stuck this in but it just errors. Thanks in advance! if (robotManager.Helpful.Logging.Status == "Regeneration") { if (!wManager.Wow.ObjectManager.ObjectManager.Me.IsSitting) { wManager.Wow.Helpers.Move.SitStandOrDescend(); Thread.Sleep(1000); } } This is what my whole file looks like: using System; using System.IO; using System.Media; using System.Threading; using System.Windows.Forms; using robotManager.Helpful; using robotManager.Products; using wManager; using wManager.Plugin; using wManager.Wow.Helpers; using wResources; public class Main : IPlugin { if (robotManager.Helpful.Logging.Status == "Regeneration") { if (!wManager.Wow.ObjectManager.ObjectManager.Me.IsSitting) { wManager.Wow.Helpers.Move.SitStandOrDescend(); Thread.Sleep(1000); } } } Link to comment https://wrobot.eu/forums/topic/9777-sitting-during-regeneration/ Share on other sites More sharing options...
Droidz 2738 Posted July 16, 2018 Share Posted July 16, 2018 Hello, Me.IsSitting is not in WRobot api, you cannot detect if your character is sit or not. Correct plugin code seem more like (not work) : using System.Threading; using wManager.Plugin; using wManager.Wow.Helpers; public class Main : IPlugin { public void Initialize() { while (Conditions.ProductIsStarted) { if (Conditions.InGameAndConnectedAndAliveAndProductStartedNotInPause) { if (robotManager.Helpful.Logging.Status == "Regeneration") { if (!wManager.Wow.ObjectManager.ObjectManager.Me.IsSitting) { wManager.Wow.Helpers.Move.SitStandOrDescend(); Thread.Sleep(1000); } } } Thread.Sleep(500); } } public void Dispose() { } public void Settings() { } } Try this: using System.ComponentModel; using System.Threading; using robotManager.FiniteStateMachine; using wManager.Wow.Helpers; public class Main : wManager.Plugin.IPlugin { public void Initialize() { robotManager.Events.FiniteStateMachineEvents.OnRunState += delegate(Engine engine, State state, CancelEventArgs cancelable) { if (state.DisplayName == "Regeneration") { Move.SitStandOrDescend(); Thread.Sleep(1000); } }; } public void Dispose() { } public void Settings() { } } Link to comment https://wrobot.eu/forums/topic/9777-sitting-during-regeneration/#findComment-45647 Share on other sites More sharing options...
vanbotter 12 Posted July 16, 2018 Author Share Posted July 16, 2018 Quote Hello, Me.IsSitting is not in WRobot api, you cannot detect if your character is sit or not. Correct plugin code seem more like (not work) : Thanks @Droidz He does sit with that, although he sits and them either immediately stands up and goes to fight (on low hp still) or sits and then stands up immediately and waits out the rest of the regen. currently 45% to 95% I guess i could change the sleep(1000) to be sleep(17000) but then he'd over rest! A better method? Link to comment https://wrobot.eu/forums/topic/9777-sitting-during-regeneration/#findComment-45651 Share on other sites More sharing options...
vanbotter 12 Posted July 25, 2018 Author Share Posted July 25, 2018 Still can't get this to work. Bot sits down for 1 second then stands back up and continues to wait out his regeneration. robotManager.Events.FiniteStateMachineEvents.OnRunState Isn't that line to call the plugin only once? What would make the character sit and then stand up? Move.SitStandOrDescend(); Thread.Sleep(12000); This kinda works but i don't want to sit for 12 seconds, i want to sit until the bot moves me. With a sleep of 12 seconds, if i get attacked i sit there like an idiot ? Why would after the thread sleeping, the bot stands up? Link to comment https://wrobot.eu/forums/topic/9777-sitting-during-regeneration/#findComment-46030 Share on other sites More sharing options...
vanbotter 12 Posted July 26, 2018 Author Share Posted July 26, 2018 Does noone else want their bot to sit down for regeneration? Is there no way to get this working? What actually is the cause of the bot standing back up during regen, with this simple plugin, that causes him to stand? The plugin is ofc not making him stand up. Another way to look at this is if Thread.sleep("Variable") is this possible? In logic terms i want it to read: "Thread.Sleep(Until full health), cancel on state "IsAttacked" Is that possible? Link to comment https://wrobot.eu/forums/topic/9777-sitting-during-regeneration/#findComment-46046 Share on other sites More sharing options...
Matenia 628 Posted July 26, 2018 Share Posted July 26, 2018 14 minutes ago, vanbotter said: Does noone else want their bot to sit down for regeneration? Is there no way to get this working? What actually is the cause of the bot standing back up during regen, with this simple plugin, that causes him to stand? The plugin is ofc not making him stand up. Another way to look at this is if Thread.sleep("Variable") is this possible? In logic terms i want it to read: "Thread.Sleep(Until full health), cancel on state "IsAttacked" Is that possible? while(!Conditions.IsAttackedAndCannotIgnore && ObjectManager.Me.HealthPercent < wManager.wManagerSetting.CurrentSetting.FoodMaxPercent) { Thread.Sleep(500); } Link to comment https://wrobot.eu/forums/topic/9777-sitting-during-regeneration/#findComment-46050 Share on other sites More sharing options...
vanbotter 12 Posted July 26, 2018 Author Share Posted July 26, 2018 @Matenia Thank you once again! The plugin now does keep me sitting in regeneration until health hits the upper limit! For some reason the Move.SitStandOrDescend(); doesn't do anything, so thats commented out and I had to have a macro in game with simple /sit The sit line did used to work, so not sure why it's stopped sitting me down. I appreciate you hanging around on the forums and helping as much as you do! Glad someone is doing that to help us n00bs ? using System.ComponentModel; using System.Threading; using robotManager.FiniteStateMachine; using wManager.Wow.Helpers; using wManager.Wow.ObjectManager; public class Main : wManager.Plugin.IPlugin { public void Initialize() { robotManager.Events.FiniteStateMachineEvents.OnRunState += delegate(Engine engine, State state, CancelEventArgs cancelable) { if (state.DisplayName == "Regeneration") { wManager.Wow.Helpers.Lua.LuaDoString("RunMacro('Macro2')"); //Move.SitStandOrDescend(); while(!Conditions.IsAttackedAndCannotIgnore && ObjectManager.Me.HealthPercent < wManager.wManagerSetting.CurrentSetting.FoodMaxPercent) { Thread.Sleep(500); } } }; } public void Dispose() { } public void Settings() { } } Link to comment https://wrobot.eu/forums/topic/9777-sitting-during-regeneration/#findComment-46053 Share on other sites More sharing options...
Matenia 628 Posted July 26, 2018 Share Posted July 26, 2018 You can use: Lua.LuaDoString("SitOrStand()"); //newer wow versions Lua.LuaDoString("SitStandOrDescendStart()"); //alternative approach Lua.LuaDoString("DoEmote('SIT')"); //if you wanna stand up specifically Lua.LuaDoString("DoEmote('STAND')"); Link to comment https://wrobot.eu/forums/topic/9777-sitting-during-regeneration/#findComment-46054 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