Send(Out["OpenFlatConnection"],79936015,"",-1); var Actions = new Dictionary { { (0, 17), () => Send(Out["Move"], 1, 17) }, { (1, 17), () => { Send(Out["Move"], 2, 17); } }, }; while (Run) { try { var realPos = (Self.CurrentUpdate.MovingTo ?? Self.Location).XY; if (Actions.TryGetValue(realPos, out var action)) action(); } catch { } Delay(100); }