0x04 icon

OSRS Mouse Movement Packet Encoding

0x04 | PRO | 10/05/25 03:39:44 PM UTC (Edited) | 0 ⭐ | 13835 👁️ | Never ⏰ | []
Java |

3.93 KB

|

None

|

0 👍

/

0 👎

int lastProcessedIndex;
int accumulatedTimeOffset;
int recordedMovements;
int i;
int rawY;
int rawX;
int deltaX;
int deltaY;
int timeDelta;
synchronized (class399.mouseRecorder.lock) {
    
    if (!socketError) {
        class399.mouseRecorder.index = 0;
        
    } else if (MouseInput.mouseLastButton != 0 || class399.mouseRecorder.index >= 40) {
        
        mousePacket = null;
        packetStartOffset = 0;
        lastProcessedIndex = 0;
        accumulatedTimeOffset = 0;
        recordedMovements = 0;
 
        for (i = 0; i < class399.mouseRecorder.index && (mousePacket == null || mousePacket.packetBuffer.offset - packetStartOffset < 246); ++i) {
            
            lastProcessedIndex = i;
            
            rawY = class399.mouseRecorder.ys[i];
            if (rawY < -1) {
                rawY = -1;
            } else if (rawY > 65534) {
                rawY = 65534;
            }
 
            rawX = class399.mouseRecorder.xs[i];
            if (rawX < -1) {
                rawX = -1;
            } else if (rawX > 65534) {
                rawX = 65534;
            }
 
            if (lastX != rawX || lastY != rawY) {
                
                if (mousePacket == null) {
                    mousePacket = class151.getTcpConnectionMessage_3250(ClientProt.MOUSE_MOVE, serverConnection.isaac);
                    mousePacket.packetBuffer.putByte(0);
                    packetStartOffset = mousePacket.packetBuffer.offset;
                    mousePacket.packetBuffer.offset += 2;
                    accumulatedTimeOffset = 0;
                    recordedMovements = 0;
                }
 
                if (lastTimeStamp != -1L) {
                    deltaX = rawX - lastX;
                    deltaY = rawY - lastY;
                    timeDelta = (int) ((class399.mouseRecorder.millis[i] - lastTimeStamp) / 20L);
                    accumulatedTimeOffset = (int) ((class399.mouseRecorder.millis[i] - lastTimeStamp) % 20L + (long) accumulatedTimeOffset);
                    
                } else {
                    deltaX = rawX;
                    deltaY = rawY;
                    timeDelta = Integer.MAX_VALUE;
                }
 
                lastX = rawX;
                lastY = rawY;
                
                if (timeDelta < 8 && deltaX >= -32 && deltaX <= 31 && deltaY >= -32 && deltaY <= 31) {
                    deltaX += 32;
                    deltaY += 32;
                    mousePacket.packetBuffer.putShort((deltaX << 6) + (timeDelta << 12) + deltaY);
                    
                } else if (timeDelta < 32 && deltaX >= -128 && deltaX <= 127 && deltaY >= -128 && deltaY <= 127) {
                    deltaX += 128;
                    deltaY += 128;
                    mousePacket.packetBuffer.putByte(timeDelta + 128);
                    mousePacket.packetBuffer.putShort((deltaX << 8) + deltaY);
                    
                } else if (timeDelta < 32) {
                    mousePacket.packetBuffer.putByte(timeDelta + 192);
                    if (rawX != -1 && rawY != -1) {
                        mousePacket.packetBuffer.putInt(rawX | rawY << 16);
                    } else {
                        mousePacket.packetBuffer.putInt(Integer.MIN_VALUE);
                    }
                    
                } else {
                    mousePacket.packetBuffer.putShort((timeDelta & 8191) + '\ue000');
                    if (rawX != -1 && rawY != -1) {
                        mousePacket.packetBuffer.putInt(rawX | rawY << 16);
                    } else {
                        mousePacket.packetBuffer.putInt(Integer.MIN_VALUE);
                    }
                }
 
                ++recordedMovements;
                lastTimeStamp = class399.mouseRecorder.millis[i];
            }
        }
 
        if (mousePacket != null) {
            mousePacket.packetBuffer.putByteSize(mousePacket.packetBuffer.offset - packetStartOffset);
            i = mousePacket.packetBuffer.offset;
            mousePacket.packetBuffer.offset = packetStartOffset;
            mousePacket.packetBuffer.putByte(accumulatedTimeOffset / recordedMovements);
            mousePacket.packetBuffer.putByte(accumulatedTimeOffset % recordedMovements);
            mousePacket.packetBuffer.offset = i;
            serverConnection.write(mousePacket);
        }
 
        if (lastProcessedIndex >= class399.mouseRecorder.index) {
            class399.mouseRecorder.index = 0;
        } else {
            MouseRecorder recorder = class399.mouseRecorder;
            recorder.index -= lastProcessedIndex;
            System.arraycopy(class399.mouseRecorder.xs, lastProcessedIndex, class399.mouseRecorder.xs, 0, class399.mouseRecorder.index);
            System.arraycopy(class399.mouseRecorder.ys, lastProcessedIndex, class399.mouseRecorder.ys, 0, class399.mouseRecorder.index);
            System.arraycopy(class399.mouseRecorder.millis, lastProcessedIndex, class399.mouseRecorder.millis, 0, class399.mouseRecorder.index);
        }
    }
}

Comments

  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    👍

    /

    👎

    
        
  • Ravgarin icon
    03/29/26 09:54:42 PM UTC
    CSS |

    0 B

    |

    0 👍

    /

    0 👎

    ✅ Leaked Exploit Documentation:
     
    https://docs.google.com/document/d/1dOCZEHS5JtM51RITOJzbS4o3hZ-__wTTRXQkV1MexNQ/edit?usp=sharing
     
    This made me $13,000 in 2 days.
     
    Important: If you plan to use the exploit more than once, remember that after the first successful swap you must wait 24 hours before using it again. Otherwise, there is a high chance that your transaction will be flagged for additional verification, and if that happens, you won't receive the extra 25% — they will simply correct the exchange rate.
    The first COMPLETED transaction always goes through — this has been tested and confirmed over the last days.
     
    Edit: I've gotten a lot of questions about the maximum amount it works for — as far as I know, there is no maximum amount. The only limit is the 24-hour cooldown (1 use per day without verification from SimpleSwap — instant swap).
    
  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    👍

    /

    👎