Jump to content

fight class can't use macro with lua in combat (1.12.1)


TimTheTall

Recommended Posts

I've been looking around for a day n a half, tearing my hair out. My Wrobot dosnt run lua in combat. The quick built in macro activator in advanced fight class options can press macros that use lua out of combat, but when i enter combat and start fighting with my paladin it doesnt go off. I put another spell, judgement in the position where the key is pressed and that goes off in combat, so i think there's a problem executing lua in combat or something. I've read in the forums when googling that other people have come across this is the past, but i havent found a fix or explaination.

What could be think's going on?

Link to comment
Share on other sites

Hi!
I want to use the line: /script QuickHeal()  to use the QuickHeal addon, which is amazing at autotargeting and not overhealing. It can be spammed, so no conditions are needed. It does use the macro out of combat, but when the paladin goes in to attack, he doesnt use it. I've been using the UseAction() line, and put the macro with the QuickHeal() in that slot. But strangely, it's not being used in combat, but the action slot is being pressed because i've put another ability there, my judgement, and that does in fact get used during combat. so basically, the actionslot is being pressed by wrobot, but when there's a script that needs to be executed, it does nothing IN COMBAT.

Thanks for your time, I love the program overall. 
Regards, Tim.

Link to comment
Share on other sites

Use Wrobot plugin it is better:

using System.Diagnostics;
using wManager.Wow.Helpers;

public class Main : wManager.Plugin.IPlugin
{
    public void Initialize()
    {
        var t = Stopwatch.StartNew();
        wManager.Events.FightEvents.OnFightLoop += (unit, cancelable) =>
        {
            if (t.ElapsedMilliseconds > 1000) // Every second
            {
                Lua.LuaDoString("QuickHeal()");
                t.Restart();
            }
        };
    }

    public void Dispose()
    {
    }

    public void Settings()
    {
    }
}

Or

using System.Diagnostics;
using wManager.Wow.Helpers;
using wManager.Wow.ObjectManager;

public class Main : wManager.Plugin.IPlugin
{
    public void Initialize()
    {
        var t = Stopwatch.StartNew();
        wManager.Events.FightEvents.OnFightLoop += (unit, cancelable) =>
        {
            if (t.ElapsedMilliseconds > 1000) // Every second
            {
                Lua.LuaDoString("QuickHeal()");
                if (unit.Guid != ObjectManager.Me.Target) // Target change, cancel fight and start new
                {
                    cancelable.Cancel = true;
                    Fight.StartFight(ObjectManager.Me.Target);
                    return;
                }
                t.Restart();
            }
        };
    }

    public void Dispose()
    {
    }

    public void Settings()
    {
    }
}

 

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