Emberveil sourcetests/RangedBankCatalog.java
import java.io.*;
public final class RangedBankCatalog {
public static void main(String[] args)throws Exception {
try(RandomAccessFile dat=new RandomAccessFile("runtime/ammunition-stage/cache/main_file_cache.dat","r");RandomAccessFile idx=new RandomAccessFile("runtime/ammunition-stage/cache/main_file_cache.idx0","r");PrintWriter stock=new PrintWriter("runtime/bonds-ranged-stock.json","UTF-8");PrintWriter report=new PrintWriter("runtime/bonds-ranged-stock.tsv","UTF-8")) {
ItemDef.unpackConfig(new StreamLoader(new Decompressor(dat,idx,1).decompress(2)));
int[][] items={{11718,10},{11720,10},{11722,10},{4732,10},{4734,10},{4736,10},{4738,10},{2503,10},{2497,10},{2491,10},{3749,10},{2577,10},{2581,10},{6585,10},{6733,10},{7462,10},{3842,10},{4224,10},{9185,10},{4212,10},{861,10},{892,100000},{9144,100000},{9242,100000},{9243,100000},{9244,100000},{4740,100000},{2444,1000},{3024,1000},{2434,1000},{6685,1000},{385,10000},{3144,10000},{4160,100000},{4168,10},{4166,10},{4164,10},{4162,10},{4551,10}};
stock.print('[');int count=0;
for(int[] item:items){ItemDef d=ItemDef.forID(item[0]);if(d.name==null||d.name.equals("null")||d.certTemplateID!=-1)throw new AssertionError("Unavailable ranged item "+item[0]);if(count++>0)stock.print(',');stock.print("{\"id\":"+item[0]+",\"amount\":"+item[1]+"}");report.println(item[0]+"\t"+d.name+"\t"+item[1]);}
stock.println(']');System.out.println("PASS "+count+" available ranged PK/Slayer equipment and supplies");
}
}
}