Code:
public class special {
public void loginSpec(client c, int item)
{
boolean flag = false;
for(int wep : SPEC_WEPS){
if(wep == item){
flag = true;
}
}
for(int frame = 0; frame < SPEC_BAR_FRAMES.length; frame++){
c.outStream.createFrame(171);
c.outStream.writeByte((flag ? 0 : 1));
c.outStream.writeWord(SPEC_BAR_FRAMES[frame]);
c.flushOutStream();
}
}
public void needSpecial(client c, int item, int target)
{
if(target != 3){
return;
}
loginSpec(c, item);
}
public void loadSpecBar(client c)
{
c.outStream.createFrame(87);
c.outStream.writeWordBigEndian(300);
c.outStream.writeDWord_v1(c.specialAmount * 10);
c.flushOutStream();
c.outStream.createFrame(36);
c.outStream.writeWordBigEndian(301);
c.outStream.writeByte(c.specOn ? 1 : 0);
c.flushOutStream();
}
public int[] SPEC_WEPS = {
1215, 1231, 1249, 1263, 8010, 1305,
1377, 1434, 3204, 4587, 5680,
5698, 5716, 5730, 6739, 7158,
859, 861, 4827, 667, 746,
2402, 8100, 4151, 4153, 8002, 35,
13643, 7617, 9813, 9803, 9802, 10025
};
public int[] SPEC_BAR_FRAMES = {
12323,7574,7599,7549,8493,
7499,7474,7674,7624,7800,10025
};
}