Core API
next()
Skips the currently active delay or wait and jumps to the next step.
next()
Synchronously forces the current wait(), move(), networking delay, or artificial typing delay to resolve instantly, accelerating the cursor to the next item in the event queue immediately.
If the cursor is currently paused via pause(), calling next() will also automatically resume playback (calling play()).
Use Cases
- Skip Buttons: Giving users the ability to skip long artificial typing delays or long sequences they've already seen.
- Manual Advancement: Using
cursor.wait(99999)internally to wait for an explicit user click (e.g. "Next Step"), and usingcursor.next()to break out of the infinite wait immediately.
Example
const cursor = new Cursor();
cursor
.move(100, 100)
.wait(86400000) // Infinite manual wait
.move(200, 200);
document.querySelector('.skip-btn').addEventListener('click', () => {
cursor.next(); // Resolves the infinite wait immediately and proceeds to (200, 200)
});