Skip to content
View in the app

A better way to browse. Learn more.

WRobot

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

[BUG] [PARTY] Bot d'ont regen if "ressurect when dead" is disabled

Featured Replies

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);
            }
        }
    }
}

 

  • 10 months later...

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 by Matenia

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.

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.