Jump to content

TimTheTall

Members
  • Posts

    3
  • Joined

  • Last visited

Reputation Activity

  1. Like
    TimTheTall reacted to Droidz in fight class can't use macro with lua in combat (1.12.1)   
    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() { } }  
×
×
  • Create New...