Jump to content
  • Add Events in WRobot code


    Droidz
    • Version: All Product: Developers Type: Suggestion Status: Added

    Add Events and cancelable Events in WRobot code to give more opportunity to the plugin (to hook existing WRobot method).



    User Feedback

    Recommended Comments

    Hello,

    I have start to add events, now you can hook fight class like:

            wManager.Events.FightEvents.OnFightLoop += (unit, cancelable) =>
            {
                if (!unit.IsValid)
                    return;
                if (unit.GetDistance2D - unit.CombatReach < 10 && unit.GetDistance - unit.CombatReach < 15)
                {
                    if (unit.IsStunned || unit.Root || unit.Confused || unit.HaveBuff("Concussive Shot"))
                        Move.Backward(Move.MoveAction.PressKey, 1000 * 3);
                }
            };

    (you need to wait next update).

    If you need events/hooks for specific WRobot method, do not hesitate to tell me.

    Link to comment
    Share on other sites

    4 hours ago, Droidz said:

    Hello,

    I have start to add events, now you can hook fight class like:

    
            wManager.Events.FightEvents.OnFightLoop += (unit, cancelable) =>
            {
                if (!unit.IsValid)
                    return;
                if (unit.GetDistance2D - unit.CombatReach < 10 && unit.GetDistance - unit.CombatReach < 15)
                {
                    if (unit.IsStunned || unit.Root || unit.Confused || unit.HaveBuff("Concussive Shot"))
                        Move.Backward(Move.MoveAction.PressKey, 1000 * 3);
                }
            };

    (you need to wait next update).

    If you need events/hooks for specific WRobot method, do not hesitate to tell me.

    can i use this code in quester? events cleared when bot start/stop ? or i should unsubscribe ?

    can you give some advice how manage aoe effects? move outside 

    Link to comment
    Share on other sites

    19 hours ago, camelot10 said:

    can i use this code in quester? events cleared when bot start/stop ? or i should unsubscribe ?

    can you give some advice how manage aoe effects? move outside 

    Yes you can use this in quester, yes events are auto cleared when bot is stopped (to avoid problems). I'll writte small guide after release (with WRobot for wow 7.1).

    Link to comment
    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...