WRobot use lua to turnin quest.
You can try code like:
ulong lastTarget = 0;
wManager.Events.InteractEvents.OnInteractPulse += (target, cancelable) =>
{
try
{
if (lastTarget == target)
return;
var o = ObjectManager.GetObjectByGuid(target);
if (o.IsValid && o.Type == WoWObjectType.Unit)
{
var unit = new WoWUnit(o.GetBaseAddress);
if (unit.IsValid && unit.NpcMarker == NpcMarker.YellowQuestion)
{
lastTarget = target;
Interact.InteractGameObject(target);
// your turnin code here
}
}
}
catch { }
};
}
or
ulong lastTarget = 0;
wManager.Events.InteractEvents.OnInteractPulse += (target, cancelable) =>
{
try
{
if (lastTarget == target)
return;
if (!Logging.Status.StartsWith("Quester > TurnIn"))
return;
var o = ObjectManager.GetObjectByGuid(target);
if (o.IsValid && o.Type == WoWObjectType.Unit)
{
var unit = new WoWUnit(o.GetBaseAddress);
if (unit.IsValid)
{
lastTarget = target;
cancelable.Cancel = true;
Interact.InteractGameObject(target);
// your turnin code here
}
}
}
catch { }
};