Jump to content
This site uses cookies! Learn More

This site uses cookies!

By continuing to use this site, you agree to allow us to store cookies on your computer. :)

  • battleground debuff


    The Smokie.
    • Product: Battlegrounder Type: Suggestion Status: Unconfirmed

    for some reason my plugin will stop and go if i have the debuff for leaving a battleground (bottish, move one step then stop, move one step then stop) , is there anyway to add a delay to the battleground que so it waits till the debuff is off?




    User Feedback

    Recommended Comments

    i have it set up to buy gems and mounts as of this moment but i will be adding other options later on like armor and other pvp items i think that will help. when my toon gets the debuff BG Deserter, it will take 2 steps and go , two steps and go. i am trying to have the plugin move to the area where the pvp venders are at.

    List<Vector3> pathToFollow = new List<Vector3>();
    
                        if (Conditions.InGameAndConnectedAndAliveAndProductStartedNotInPause && zone == "Stormwind City" && !(ObjectManager.Me.Position.DistanceTo2D(new Vector3(-8768.91f, 419.931f, 103.921f)) < 100) && !Battleground.IsInBattleground())
                        {
                            pathToFollow = PathFinder.FindPath(new Vector3(-8768.91f, 419.931f, 103.921f));
                            GoToTask.ToPosition(new Vector3(-8768.91f, 419.931f, 103.921f));
    
                            while (MovementManager.InMovement && !(ObjectManager.Me.Position.DistanceTo2D(new Vector3(-8768.91f, 419.931f, 103.921f)) < 20))
                            {
                                Thread.Sleep(1000);
                            }
    
    
                        }

    i have tried to use 

    Movement.Manager.go(pathToFollow); 

    but still same problem, i think its because wrobot detects the debuff and it sits at the local of where you are with the buff till it wares off, once the debuff is off it will run to the area with no problems. i need it to move while having the debuff.

    Share this comment


    Link to comment
    Share on other sites

    Why not use "Buy" feature (in advavanced general settings tab "Vendor" button "Edit list of items at buy")?

    And you probably need to execute your code from the thread of product (use events)

    Share this comment


    Link to comment
    Share on other sites

    every time i use the "edit list of items at buy" it goes to a not responeding and my bot crashes. and i am trying to make this plugin to help people and to learn more about c# coding. 

    Do you by chance have a simple of a event code? i have never use a event code . (i could be wrong, idk if i have or not.)

    Share this comment


    Link to comment
    Share on other sites
        robotManager.Events.FiniteStateMachineEvents.OnBeforeCheckIfNeedToRunState += (engine, state, cancelable) =>
            {
                if (state is wManager.Wow.Bot.States.IsAttacked && !state.NeedToRun)
                {
                    // you code here
                }
            };

     

    Share this comment


    Link to comment
    Share on other sites
    using robotManager.FiniteStateMachine;
    private bool _BG = false;
    public void BG(Engine engine, State state, CancelEventArgs cancelable)
        {
    		if (state.DisplayName == "Battleground" && state.NeedToRun && 
    			!(ObjectManager.Me.Position.DistanceTo2D(new Vector3(x, y, z)) < 100))
    		{
              _BG = false
              //run code
              Logging.Write("Moving to vender");                                                                        
    		}
                                                                                      
            if (state.DisplayName == "Battleground" && state.NeedToRun && ObjectManager.Me.Position.DistanceTo2D(new Vector3(x, y, z)) < 100)
            {
               Logging.Write("Back to BG farming");
               _BG = true;
            }
        }

     

    Share this comment


    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
    Add a comment...

    ×   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.


×
×
  • Create New...