private async void StartAligningAsync(object sender, EventArgs e) { if (IsScanning || Posters.Count != columnControl.Value * rowControl.Value && button4.Text != "Aligning...") { return; } Posters = Posters.OrderBy(id => id).ToList(); button4.Text = "Aligning..."; bool isRight = rotation == 'r'; int limit = Alternative ? 32 : 16; int height = Alternative ? 16 : 8; int width = Alternative ? 16 : 8; int heightAfter = (Alternative ? 8 : 4) * (isRight ? 1 : -1); for (int currentColumn = 0; currentColumn < columnControl.Value; currentColumn++) { for (int currentRow = 0; currentRow < rowControl.Value; currentRow++) { int tempL1 = (int)offsetX.Value + (width * currentColumn); MovePoster movePoster = new MovePoster { Id = Posters[(currentColumn * (int)rowControl.Value) + currentRow], Position = string.Format(":w={0},{1} l={2},{3} {4}", (int)W1Offset.Value, (int)W2Offset.Value, tempL1, (int)(offsetY.Value + ((currentRow * height) + (currentColumn * heightAfter))), rotation) }; await _interceptor.SendToServerAsync(movePoster); await Task.Delay(50); } } button4.Text = "Align"; }
private static Task DisassembleCompleted() { Console.Beep(); Console.ForegroundColor = ConsoleColor.Yellow; Console.WriteLine("Disassembled completed. You'll now see hashes and packet structures!"); interceptor.OutgoingAttach <TalkPacket>(p => { p.Text = "HabboInterceptor"; return(Task.FromResult(true)); }); interceptor.OutgoingAttach <WalkPacket>(p => { interceptor.SendToServerAsync(new TalkPacket { Text = $"I'm moving to X: {p.X} Y: {p.Y}.", Bubble = 2 }); return(Task.FromResult(true)); }); return(Task.CompletedTask); }