Jump to content

[HELP] Affected by certain spell


Kaoz
 Share

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

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