Emberveil sourcetests/SlayerBankCatalog.java
import java.io.*;
/** Validates only items actually available in Emberveil's shipped cache. */
public final class SlayerBankCatalog {
public static void main(String[] args)throws Exception {
String root="runtime/ammunition-stage/cache/";
try(RandomAccessFile dat=new RandomAccessFile(root+"main_file_cache.dat","r");RandomAccessFile idx=new RandomAccessFile(root+"main_file_cache.idx0","r");PrintWriter json=new PrintWriter("runtime/bonds-slayer-stock.json","UTF-8");PrintWriter report=new PrintWriter("runtime/bonds-slayer-stock.tsv","UTF-8")) {
ItemDef.unpackConfig(new StreamLoader(new Decompressor(dat,idx,1).decompress(2)));
int[][] items={{4155,10},{4156,10},{4158,10},{4162,10},{4164,10},{4166,10},{4168,10},{4170,10},{4551,10},{6,10},{8,10},{10,10},{12,10},{2,100000},{4160,100000},{4161,1000},{6660,1000},{6696,1000},{7051,10},{7432,1000},{7421,10}};
json.print("[");int count=0;
for(int[] pair:items){ItemDef item=ItemDef.forID(pair[0]);if(item.name==null||item.name.equals("null")||item.certTemplateID!=-1)throw new AssertionError("Unavailable Slayer item "+pair[0]);if(count++>0)json.print(",");json.print("{\"id\":"+pair[0]+",\"amount\":"+pair[1]+"}");report.println(pair[0]+"\t"+item.name+"\t"+pair[1]);}
json.println("]");System.out.println("PASS "+count+" available Slayer gear/supply items validated");
}
}
}