using Loki.Utilities;
using log4net;
using Loki.Game;
using Loki.Bot;
using Loki.Game.Objects;
public class RuntimeCode
{
private static readonly ILog Log = Logger.GetLoggerInstanceForType();
public void Execute()
{
using(LokiPoe.AcquireFrame())
{
var dom = LokiPoe.ObjectManager.GetObjectByName<Monster>("Brutus, Lord Incarcerator");
if (dom == null) {
Log.DebugFormat("Dom not loaded");
return;
}
if (dom.HasCurrentAction) {
Log.DebugFormat("ACTION!!");
Log.DebugFormat("Action performed by {0} [X : {1}, Y : {2}]", dom.Name, dom.Position.X, dom.Position.Y);
if (dom.CurrentAction.Destination != null)
Log.DebugFormat("Destination X : {0}, Y : {1}", dom.CurrentAction.Destination.X, dom.CurrentAction.Destination.Y);
if (dom.CurrentAction.Target != null)
Log.DebugFormat("Target X : {0}, Y : {1}", dom.CurrentAction.Target.Position.X, dom.CurrentAction.Target.Position.Y);
if (dom.CurrentAction.Skill != null)
Log.DebugFormat("{0} {1}",dom.CurrentAction.Skill.Name, dom.CurrentAction.Skill.Description);
} else {
Log.DebugFormat("Dom isn't doing any action");
}
}
}
}