Evaexe 1 Posted August 4, 2022 Share Posted August 4, 2022 Hi In party product, the bot will not start regen if "ressurect when dead" is disabled thanks Link to comment https://wrobot.eu/forums/topic/14698-bug-party-bot-dont-regen-if-ressurect-when-dead-is-disabled/ Share on other sites More sharing options...
Droidz 2742 Posted August 5, 2022 Share Posted August 5, 2022 Hello, Party bot haven't regen feature. But you can use https://wrobot.eu/files/file/650-party-chat-command/ to make the members of the group eat/drink. Link to comment https://wrobot.eu/forums/topic/14698-bug-party-bot-dont-regen-if-ressurect-when-dead-is-disabled/#findComment-66389 Share on other sites More sharing options...
Evaexe 1 Posted August 5, 2022 Author Share Posted August 5, 2022 with the PartyRegen pluggin party regen. but only if "resurect when dead" is enable Link to comment https://wrobot.eu/forums/topic/14698-bug-party-bot-dont-regen-if-ressurect-when-dead-is-disabled/#findComment-66394 Share on other sites More sharing options...
Droidz 2742 Posted August 5, 2022 Share Posted August 5, 2022 try with this code using System; using robotManager.Events; using robotManager.FiniteStateMachine; using robotManager.Helpful; using wManager.Plugin; using wManager.Wow.Bot.States; public class Main : IPlugin { private bool _stateAdded; public void Initialize() { FiniteStateMachineEvents.OnStartEngine += StateAddEventHandler; FiniteStateMachineEvents.OnAfterRunState += AfterStateAddEventHandler; } private void AfterStateAddEventHandler(Engine engine, State state) { AddState(engine); } private void StateAddEventHandler(Engine engine) { AddState(engine); } public void Dispose() { FiniteStateMachineEvents.OnStartEngine -= StateAddEventHandler; FiniteStateMachineEvents.OnAfterRunState -= AfterStateAddEventHandler; } public void Settings() { } private void AddState(Engine engine) { if (!_stateAdded && engine != null) { try { State resState = engine.States.Find(state => state.GetType() == typeof(IsAttacked)); engine.AddState(new Regeneration() {Priority = resState.Priority - 1}); engine.States.Sort(); _stateAdded = true; Logging.Write("Adding Regen State"); } catch (Exception e) { //Logging.WriteError("" + e); } } } } Link to comment https://wrobot.eu/forums/topic/14698-bug-party-bot-dont-regen-if-ressurect-when-dead-is-disabled/#findComment-66395 Share on other sites More sharing options...
Evaexe 1 Posted August 5, 2022 Author Share Posted August 5, 2022 That work !!!! Link to comment https://wrobot.eu/forums/topic/14698-bug-party-bot-dont-regen-if-ressurect-when-dead-is-disabled/#findComment-66396 Share on other sites More sharing options...
Evaexe 1 Posted August 5, 2022 Author Share Posted August 5, 2022 We maybe should update the pluging ? Link to comment https://wrobot.eu/forums/topic/14698-bug-party-bot-dont-regen-if-ressurect-when-dead-is-disabled/#findComment-66397 Share on other sites More sharing options...
Weer36 3 Posted June 15, 2023 Share Posted June 15, 2023 @Droidz after this code I catch "collection was modified". Obviously due to "foreach (State state in States)" code How to add&sort states before first Pulse() of it? Link to comment https://wrobot.eu/forums/topic/14698-bug-party-bot-dont-regen-if-ressurect-when-dead-is-disabled/#findComment-68404 Share on other sites More sharing options...
Matenia 630 Posted June 16, 2023 Share Posted June 16, 2023 (edited) That error happens once, in WRobot's code. Next iteration it does, it now has your states in it and everything works without error. Edit: These are 5 years old, but the code is still applicable as far as I know. No guarantee PartyBot Helper still works with HMP. Edited June 16, 2023 by Matenia Link to comment https://wrobot.eu/forums/topic/14698-bug-party-bot-dont-regen-if-ressurect-when-dead-is-disabled/#findComment-68405 Share on other sites More sharing options...
Weer36 3 Posted June 16, 2023 Share Posted June 16, 2023 4 hours ago, Matenia said: in WRobot's code. Sure, I even gave an example: "foreach (State state in States)". Thanks anyway Link to comment https://wrobot.eu/forums/topic/14698-bug-party-bot-dont-regen-if-ressurect-when-dead-is-disabled/#findComment-68407 Share on other sites More sharing options...
Matenia 630 Posted June 16, 2023 Share Posted June 16, 2023 Look at what I linked. The error happens ONCE after you add your state. This code works fine - wRobot's FiniteStateMachine that iterates the states throws the error. Since you only modify the collection ONCE to add your state(s), the very next iteration across all states works just fine. I'm telling you, you can ignore the error. Link to comment https://wrobot.eu/forums/topic/14698-bug-party-bot-dont-regen-if-ressurect-when-dead-is-disabled/#findComment-68408 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