Notice:
This is a snippet, i cbf to help out with little things if you throw this into eclipse in your client, rename a few things & read the code you'll understand this fairly easy.
What This is/does:
It basically supports Displaying a model with or without animations assigned to it on any aspect you decide, such as the game screen. This works in the same manner the client uses to display character models on the equipment screen, but can be modified for other uses.
Reason i made this:
Was originally to make Character orb with character face + animated from outside an interface aspect, and make it fully interactive.
What i've been doing it with so far?
Character orb with full interaction + working on Character selection screen before login.
Code:
public Model getMediaModel(int j, int k, int modelType, int modelID, boolean displayAnimation) {
Model model;
/*
** still have to refractor the veriables for values when not using animations through packet 200 so i left it the same for now until i get around.
*/
model = displayAnimation ? RSInterface.getModel(modelType, modelID) : RSInterface.getModel(modelType, modelID);
if (model == null)
return null;
if (k == -1 && j == -1 && model.color == null)
return model;
Model model_1 = new Model(true, FrameReader.isFrameDead(k) & FrameReader.isFrameDead(j), false, model);
if (k != -1 || j != -1)
model_1.method469();
if (k != -1)
model_1.method470(k);
if (j != -1)
model_1.method470(j);
model_1.method479(64, 768, -50, -10, -50, true, true);
return model_1;
}
public void GameSceenModel(int width, int height, int rotationA, int rotationB, int modelZoom, int animationID, int animID, int modelType, int modelID, boolean displayAnimation) {
int k3 = Rasterizer.centerX; Rasterizer.centerX = width / 2;
int j4 = Rasterizer.centerY; Rasterizer.centerY = height / 2;
int i5 = Rasterizer.anIntArray1470[rotationA] * modelZoom >> 16;
int l5 = Rasterizer.anIntArray1471[rotationA] * modelZoom >> 16;
Model model;
if (!displayAnimation) {
model = getMediaModel(-1, -1, modelType, modelID, displayAnimation);
} else {
Animation animation = Animation.getAnim(animationID);
model = getMediaModel(animation.anIntArray354[animation.frameCount], animation.frames[animation.frameCount], modelType, modelID, displayAnimation);
}
if (model != null)
model.method482(rotationB, 0, rotationA, 0, i5, l5, 0);
Rasterizer.centerX = k3;
Rasterizer.centerY = j4;
}
YOU CANT JUST PASTE THIS INTO YOUR CLIENT AND IT WILL WORK, YOU MUST DO SOME MODIFICATION, BUT ANYONE WITH BASIC KNOWLEDGE AND ABILITY TO READ WILL BE ABLE TO MAKE USE
ENJOY!