Last active
March 11, 2026 07:47
-
-
Save Infinitay/79ca9bf103e9eaf480a5e4c2987a984c to your computer and use it in GitHub Desktop.
Abex Cache Viewer Coord Bruteforce
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import * as c2 from "@abextm/cache2"; | |
| import * as context from "viewer/context"; | |
| for (let rowID = 0; rowID < 5154; rowID++) { | |
| const row = await c2.DBRow.load(context.cache, rowID); | |
| // const indexOfCord = row?.types.flat().findIndex(x => x === c2.ScriptVarType.coord.id); | |
| const indicesOfCord = row?.types.flat().reduce((acc, curr, index) => (curr === c2.ScriptVarType.coord.id ? [...acc, index] : acc), [] as number[]); | |
| if (indicesOfCord) { | |
| for (const indexOfCord of indicesOfCord) { | |
| const encodedCord = +(row?.values.flat()[indexOfCord] as number || 0); | |
| const decodedCord = [(encodedCord >> 14) & 0x3FFF, encodedCord & 0x3FFF, (encodedCord >> 28) & 3]; | |
| // console.log(decodedCord); | |
| if (decodedCord[0] >= 1400 && decodedCord[0] - 1400 < 100) { | |
| console.log(`FOUND ${decodedCord} (${encodedCord}) @ Row ID: ${rowID} [${generateLink(decodedCord)}]`); | |
| } | |
| } | |
| } | |
| } | |
| function generateLink(coords: number[]) { | |
| return `https://mejrs.github.io/osrs?m=-1&z=5&p=${coords[2]}&x=${coords[0]}&y=${coords[1]}&layer=labels&layer=grid` | |
| } |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://abextm.github.io/cache2/#/editor