So ya uhm, some guy made a thread saying that he was selling the looting bag interface for $15 (with an extra $25 for server side) and that kind of pissed me off, because this interface is literally like 15 lines of code, and easy to make (took me like 10 mins to get sprites, positioning, etc, and make whole interface). I don't want to see anybody getting ripped off for something so easy to make, so I decided to make the interface and release it. I've also seen a couple of threads asking for the interface, plus his didn't even fit 28 items on the interface. So yeah here it is.
What you're adding:
SPRITES DOWNLOAD: Download looting.rar @ UppIT
Mirror:
Step 1:
Download the sprites, and extract the folder inside it (looting) to your sprites folder in your cache.
It should look like "Cache/Sprites/looting/"
Step 2:
In your client files, open RSInterface.java and add this code anywhere you want.
Code:
public static void lootingBag(TextDrawingArea[] tda) {
RSInterface tab = addInterface(26700);
addSprite(26701, 0, "looting/BAG");
addHoverButton(26702, "looting/BAG", 1, 16, 16, "Close", 0, 26703, 1);
addHoveredButton(26703, "looting/BAG", 2, 16, 16, 26704);
addText(26705, "Looting bag", tda, 2, 0xFF9900, true, true);
itemGroup(26706, 4, 7, 13, 0, false, true);
addText(26707, "Value: 0 coins", tda, 0, 0xFF9900, true, true);
tab.totalChildren(6);
tab.child(0, 26701, 9, 21);
tab.child(1, 26702, 168, 4);
tab.child(2, 26703, 168, 4);
tab.child(3, 26705, 95, 4);
tab.child(4, 26706, 12, 23);
tab.child(5, 26707, 95, 250);
}
Step 3:
In RSInterface.java find
and under that, add this:
Code:
lootingBag(textDrawingAreas);
Step 4:
You may need this method to make the interface work, unless you already have it
Code:
public static void itemGroup(int id, int w, int h, int x, int y) {
RSInterface rsi = addInterface(id);
rsi.width = w;
rsi.height = h;
rsi.inv = new int[w * h];
rsi.invStackSizes = new int[w * h];
rsi.usableItemInterface = false;
rsi.isInventoryInterface = false;
rsi.invSpritePadX = x;
rsi.invSpritePadY = y;
rsi.spritesX = new int[20];
rsi.spritesY = new int[20];
rsi.sprites = new Sprite[20];
rsi.type = 2;
}
So there you go, you now have the looting bag interface.
The interface ID is 26700.
To display items on the interface, use packet 34 server sided by doing something like
Code:
player.getPA().sendFrame34(26706, itemId, slot, amount);
Enjoy