Skip to content

Instantly share code, notes, and snippets.

@Vulcanacht
Created November 28, 2015 02:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Vulcanacht/d4d77dc87da3220ba6f3 to your computer and use it in GitHub Desktop.
Save Vulcanacht/d4d77dc87da3220ba6f3 to your computer and use it in GitHub Desktop.
public static void main(String[] args) throws Exception {
int fileId = 4151;
if (args.length == 1) {
try {
fileId = Integer.parseInt(args[0]);
} catch (NumberFormatException e) {
}
}
RuneFS runefs = new RuneFS();
runefs.init("test_data");
Js5 configClient = runefs.getJs5Client(JS5Indices.CONFIGURATION.getStoreId());
byte[] data = configClient.getFile(JS5Configuration.OBJTYPE.getGroupid(), fileId);
if (data != null) {
ObjType type = new ObjType();
type.decode(new Buffer(data));
System.out.println("Name: " + type.getName());
System.out.println("Cost: " + type.getCost());
}
runefs.cleanup();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment