Jump to content

Recommended Posts

I try something like :

 public void SkipNodesIfFight()
    {

        robotManager.Events.FiniteStateMachineEvents.OnBeforeCheckIfNeedToRunState += (engine, state, cancelable) =>
        {
            if (state is wManager.Wow.Bot.States.IsAttacked)
            {
                _isFight = true; 
                wManager.Wow.Helpers.Chat.SendChatMessageWhisper("IsFight","namespeudo"); 
                Thread.Sleep(10000);
                Initialize(); 
            }
            else {

                _isFight = false;
                wManager.Wow.Helpers.Chat.SendChatMessageWhisper("NotISFight","namespeudo");
                 Thread.Sleep(10000); 
            }
            Thread.Sleep(10000);
        
        };
    }

But never say "IsFight" when a mob attack me ?

Link to comment
https://wrobot.eu/forums/topic/11370-check-isattack/#findComment-54385
Share on other sites

3 hours ago, duthibaut said:

I try something like :


 public void SkipNodesIfFight()
    {

        robotManager.Events.FiniteStateMachineEvents.OnBeforeCheckIfNeedToRunState += (engine, state, cancelable) =>
        {
            if (state is wManager.Wow.Bot.States.IsAttacked)
            {
                _isFight = true; 
                wManager.Wow.Helpers.Chat.SendChatMessageWhisper("IsFight","namespeudo"); 
                Thread.Sleep(10000);
                Initialize(); 
            }
            else {

                _isFight = false;
                wManager.Wow.Helpers.Chat.SendChatMessageWhisper("NotISFight","namespeudo");
                 Thread.Sleep(10000); 
            }
            Thread.Sleep(10000);
        
        };
    }

But never say "IsFight" when a mob attack me ?

for this code to work you'd need to make it run inside 

Initialize();
Link to comment
https://wrobot.eu/forums/topic/11370-check-isattack/#findComment-54388
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...