This could be extended but I am just adjusting the SpriteIDs
Go into your client and find
Code:
for (int j3 = 0; j3 <= 14; j3++)
sideIcons[j3] = new Sprite(mediaArchive, "sideicons", j3);
*This code reads the sideicons.dat (in the cache in the 2dgraphics data) to declare the sideIcon sprites, since we want our own we will add a different way*
Comment that code out, or just replace it with this
Code:
for (int i = 0; i < 14; i++)
sideIcons[i] = cacheSprite[SideIcon.getIcon(i).getSpriteId()];
Create a new enumeration in your client called SideIcon
Code:
public enum SideIcon {
COMBAT(431),
STATS(432),
QUEST(674),//433
INVENTORY(434),
EQUIPMENT(435),
PRAYER(436),
SPELLBOOK(437),
CLAN(438),
FRIENDS(439),
IGNORE(440),
LOGOUT(441),
SETTINGS(442),
EMOTES(443),
MISC(444);
private int spriteId;
SideIcon(int spriteID) {
this.setSpriteId(spriteID);
}
public static SideIcon getIcon(int index) {
return values()[index];
}
public int getSpriteId() {
return spriteId;
}
public void setSpriteId(int spriteId) {
this.spriteId = spriteId;
}
}
I have this command for testing
Code:
if (inputString.equals("::testquest")) {
if (teststuff == true) {
teststuff = false;
sideIcons[SideIcon.QUEST.ordinal()] = SpriteLoader.sprites[675];
sideIcons[SideIcon.SPELLBOOK.ordinal()] = SpriteLoader.sprites[679];
} else {
teststuff = true;
sideIcons[SideIcon.QUEST.ordinal()] = SpriteLoader.sprites[676];
sideIcons[SideIcon.SPELLBOOK.ordinal()] = SpriteLoader.sprites[680];
}
drawSideIcons();
}
This doesn't adjust the X/Y of the sprite, that's hard coded in the Client and it would take some time to adjust the offsets for whichever game view you have (resizable, ect)
All this does is update the spriteID, and if the Sprite is properly setup it should work without much issue of needing to update the x/y of the sprite
When you did it all, the result is this...
I just wanted to give you guys something this sunday! I hope to release actual tutorials soon! IF you guys have any suggestions for a tutorial, let me know!
- Strict