Jump to content

Check IsAttack


duthibaut
 Share

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
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
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...