public int BUFF = 182226;
public int ITEMID = 122742;
public static DateTime lastHookUsed = DateTime.Now;
public override void Pulse()
{
try
{
if (!Me.Mounted
&& !Me.IsFlying
&& !Me.IsDead
&& !Me.IsGhost
&& !Me.OnTaxi
&& !Me.IsOnTransport)
{
if (!Me.HasAura(BUFF))
{
WoWItem potion = Me.BagItems.FirstOrDefault(h => h.Entry == ITEMID);
if (potion == null)
{
return;
}
if ((potion != null) && //has item
(potion.CooldownTimeLeft.TotalMilliseconds <= 0) && //item not on cooldown
(lastHookUsed < (DateTime.Now + new TimeSpan(0, 0, 0, 20, 0)))) //we are not on internal cooldown from applying last hook
{
Logging.Write(Colors.LightCoral, "Csali felrakva!!");
potion.Use();
lastHookUsed = DateTime.Now; //update time
}
}
}
return;
}
catch {}
}
}