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.

Bot.States

Featured Replies

Hello,

        bool added = false;
        robotManager.FiniteStateMachine.State myState = null; // ...
        robotManager.Events.FiniteStateMachineEvents.OnAddState += delegate (robotManager.FiniteStateMachine.Engine engine, robotManager.FiniteStateMachine.State state, System.ComponentModel.CancelEventArgs cancelable)
        {
            if (added)
                return;
            if (state.DisplayName == "Quester")
            {
                added = true;
                state.NextStates.Add(myState);
                //engine.AddState(myState);
                //state.BeforeStates.Add(myState);
            }
        };

 

  • Author

Can you add any working example?
My code either produces errors or the state does nothing.

Can you also add functions to the bot?

Me.SubZoneId == 111

ItemsManager.UseItem() - by WoWItem, not entry

Item.UseContainerItem

WoWGameObject.InteractDistance
WoWGameObject.IsGoodInteractDistance

Me.GetAllAuras().Any(a => (a.Spell.Mechanic == WoWSpellMechanic.Stunned || a.Spell.Mechanic == WoWSpellMechanic.Fleeing || a.Spell.Mechanic == 
WoWSpellMechanic.Asleep || a.Spell.Mechanic == WoWSpellMechanic.Charmed) && a.IsActive && a.TimeLeft.TotalSeconds >= 2))

and fix this

wManager.Wow.Helpers.Bag.PickupContainerItem - just does not work.

wManager.Wow.Bot.Tasks.GoToTask.ToPositionAndIntecractWith(WoWGameObject) - goes to the object and does not interact, with npc works fine.

 

You can try 

        bool added = false;
        robotManager.FiniteStateMachine.State myState = null; // ...
        robotManager.Events.FiniteStateMachineEvents.OnBeforeCheckIfNeedToRunState += delegate (robotManager.FiniteStateMachine.Engine engine, robotManager.FiniteStateMachine.State state, System.ComponentModel.CancelEventArgs cancelable)
        {
            if (added)
                return;
            if (state.DisplayName == "Quester")
            {
                added = true;
                state.NextStates.Add(myState);
                //engine.AddState(myState);
                //state.BeforeStates.Add(myState);
            }
        };

(replace "null" line 2 by your state instance)

  • Author

I already tried it.

My state, after adding, the text should be spammed. But there is nothing

public class TestState : robotManager.FiniteStateMachine.State
{
    public override string DisplayName
    {
        get { return "TestState"; }
    }

    public override int Priority
    {
        get { return priority; }
        set { priority = value; }
    }
    private int priority;

    public override bool NeedToRun
    {
        get
        {
            if (!Conditions.InGameAndConnectedAndAliveAndProductStartedNotInPause || Conditions.IsAttackedAndCannotIgnore)
               return false;

               return true;
        }
    }

    public override List<robotManager.FiniteStateMachine.State> NextStates
    {
        get { return new List<robotManager.FiniteStateMachine.State>(); }
    }

    public override List<robotManager.FiniteStateMachine.State> BeforeStates
    {
        get { return new List<robotManager.FiniteStateMachine.State>(); }
    }
      
    public override void Run()
    {

        Logging.Write("TestState", Logging.LogType.Normal, System.Drawing.Color.BlueViolet); 
        
    }
}

 

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.