Jump to content

[HELP] Affected by certain spell


Kaoz

Recommended Posts

So, I'm trying to make my bot react using OnFightLoop when I get hit but certain spell but I cannot find a way.

Currently, for the debuffs I use:

ObjectManager.Me.HaveBuff

Which it works well, but is there a way to know if the bot is affected by certain spell that doesn't apply a debuff?

Link to comment
Share on other sites

2 hours ago, Droidz said:

Hello,

The better is to use lua for that

Hello, thanks for your answer, could you give me a small example?

And can this be combined with CSharp?

Link to comment
Share on other sites

Let's say the character has been afected by certain AOE spell, then I want to move to stop receiving damage. I'm doing it currently for spells like Blizzard, but again, with AOE spells that dont have a debuff I don't really know how to do it.

Link to comment
Share on other sites

I couldn't give a code that works, people here are more specialized in that. But I think you should look at the lua event side (wManager.Wow.Helpers.EventsLuaWithArgs.OnEventsLuaStringWithArgs)

Run this code to dump lua event in wrobot log:

wManager.Wow.Helpers.EventsLuaWithArgs.OnEventsLuaStringWithArgs += delegate(string eventid, List<string> args)
{
    try
    {
        //if (eventid != "COMBAT_LOG_EVENT_UNFILTERED" && eventid != "COMBAT_LOG_EVENT")
        //    return;

        var argsString = new System.Text.StringBuilder();
        var first = true;
        foreach (var a in args)
        {
            if (first)
                first = false;
            else
                argsString.Append(" , ");
            argsString.Append(a);

        }
        robotManager.Helpful.Logging.Write("[L] " + eventid + " > " + argsString.ToString());
    }
    catch { }
};

 

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