Jump to content
View in the app

A better way to browse. Learn more.

RuneSuite RSPS Development

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Dbcrazy

Members
  • Joined

  • Last visited

Everything posted by Dbcrazy

  1. Nice one mate
  2. The code will tell you the coords. All you do is run the class in an IDE and it will ask you to input the region id and it will spit out the coords for that region. If you packed the map then the mapfile should be named as the region ID, or the folder the map files were in. Again im not sure about lower revision as I normally work with 667+ so it could be a little different. Could also try this public final class MapDefinitionParser { private MapDefinitionParser() { } public static Map<Integer, MapDefinition> parse(Cache cache) throws IOException { final Map<Integer, MapDefinition> definitions = new HashMap<>(); byte[] data = cache.getArchive(ArchiveType.VERSION_LIST).readFile("map_index"); Buffer buffer = Buffer.wrap(data); int mapCount = buffer.getCapacity() / (3 * Short.BYTES + Byte.BYTES); for (int map = 0; map < mapCount; map++) { int regionId = buffer.readUShort(); int terrainFileId = buffer.readUShort(); int objectFileId = buffer.readUShort(); boolean members = buffer.readByte() == 1; definitions.put(regionId, new MapDefinition(regionId, terrainFileId, objectFileId, members)); } decodeStaticObjects(cache, definitions); return definitions; } private static void decodeStaticObjects(Cache cache, Map<Integer, MapDefinition> definitions) throws IOException { Store mapStore = cache.getStore(StoreType.MAP); for (Entry<Integer, MapDefinition> entry : definitions.entrySet()) { MapDefinition def = entry.getValue(); int hash = def.getRegionId(); int x = (hash >> 8 & 0xFF) * 64; int y = (hash & 0xFF) * 64; ByteBuffer gameObjectData = ByteBuffer.wrap(mapStore.readFile(def.getObjectFileId())); parseGameObject(gameObjectData, x, y); Buffer terrainData = Buffer.wrap(mapStore.readFile(def.getTerrainFileId())); parseTerrain(terrainData, x, y); } } private static void parseGameObject(ByteBuffer gameObjectBuffer, int x, int y) { for (int deltaId, id = -1; (deltaId = BufferUtils.readSmart(gameObjectBuffer)) != 0;) { id += deltaId; for (int deltaPos, hash = 0; (deltaPos = BufferUtils.readSmart(gameObjectBuffer)) != 0;) { hash += deltaPos - 1; int localX = hash >> 6 & 0x3F; int localY = hash & 0x3F; int height = hash >> 12 & 0x3; int attributeHashCode = gameObjectBuffer.get() & 0xFF; Optional<GameObjectType> type = GameObjectType.valueOf(attributeHashCode >> 2); Optional<GameObjectOrientation> orientation = GameObjectOrientation.valueOf(attributeHashCode & 0x3); Position position = new Position(x + localX, y + localY, height); if (type.isPresent() && orientation.isPresent()) { World.gameObjects.add(new GameObject(id, position, type.get().getId(), orientation.get().getId())); } } } } private static void parseTerrain(Buffer mapBuffer, int x, int y) { for (int height = 0; height < 4; height++) { for (int localX = 0; localX < 64; localX++) { for (int localY = 0; localY < 64; localY++) { Position position = new Position(x + localX, y + localY, height); int flags = 0; for (;;) { int attributeId = mapBuffer.readUByte(); if (attributeId == 0) { terrainDecoded(flags, position); break; } else if (attributeId == 1) { mapBuffer.readByte(); terrainDecoded(flags, position); break; } else if (attributeId <= 49) { mapBuffer.readByte(); } else if (attributeId <= 81) { flags = attributeId - 49; } } } } } } all you have to do is grab map_index, and then use that file to parse maps located in index 4 of the cache.
  3. I haven't used RSPSi much but here is what I use to generate coords from a RegionId package com.rs.jagex.tools; import java.io.BufferedWriter; import java.io.File; import java.io.FileWriter; import java.io.IOException; import java.util.Scanner; /** * * @author Tyler * */ public class CoordinateGenerator { public static void main(String[] args) throws IOException { Scanner input = new Scanner(System.in); BufferedWriter writer = null; File file = new File("Coords.txt"); writer = new BufferedWriter(new FileWriter(file)); System.out.println("Please enter the region id."); while(input.hasNextLine()) { if(!input.hasNextInt()) { break; } int regionId = input.nextInt(); int x = (regionId >> 8) << 6; int y = (regionId & 0xFF) << 6; System.out.println("Coords : "+x+ ": "+y+ " Region ID: "+regionId); writer.append("Coords : "+x+ ": "+y+ " Region ID: "+regionId); writer.newLine(); writer.flush(); } writer.close(); } }
  4. 68825 should be the model id not 18908
  5. Thanks brotha
  6. Thank you for this, will use!
  7. This is mad sick! Thank you!
  8. Good stuff, thanks!
  9. Sorry if this is a grave dig, however I wanted to use and abuse the models and in order to do so I must reply! Very nice models, and I appreciate you uploading these

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.