/// @group Bots public class TileAction { private readonly Action MainAction; private readonly Action ElseAction; private readonly Func Condition; public TileAction(Action mainAction) => MainAction = mainAction; public TileAction(Action mainAction, Action elseAction, Func condition) : this(mainAction) { ElseAction = elseAction; Condition = condition; } public void Execute() { if (Condition == null || Condition()) { MainAction(); } else { ElseAction(); } } } public Point RealPos => (Self.CurrentUpdate.MovingTo ?? Self.Location).XY; Dictionary Actions = new() { // HIER DEINE ACTIONS { ( 24, 15), new (() => Send(Out["EnterOneWayDoor"],2147418205)) }, { ( 24, 16), new (() => Send(Out["EnterOneWayDoor"],2147418204)) }, { ( 25, 16), new (() => Send(Out["EnterOneWayDoor"],2147418203)) }, { ( 25, 17), new (() => Send(Out["EnterOneWayDoor"],2147418547)) }, { ( 26, 19), new (() => Send(Out["EnterOneWayDoor"],2147418490)) }, { ( 25, 19), new (() => Send(Out["EnterOneWayDoor"],2147418211)) }, { ( 25, 20), new (() => Send(Out["EnterOneWayDoor"],2147418212)) }, { ( 24, 20), new (() => Send(Out["EnterOneWayDoor"],2147418551)) }, }; while (Run) { try { if (Actions.TryGetValue(RealPos, out var result)) { result.Execute(); } } catch { } Delay(100); }