Well was bored so i logged in RS and realized that there were new interface so i decided to made it for RSPS...pretty easy took about 15 min anyway here the code:
public static void addInv(int id, int pID, int h, int w)
{
Class9 Tab = aClass9Array210[id] = new Class9();
Tab.anIntArray253 = new int[w * h];
Tab.anIntArray252 = new int[w * h];
for(int i1 = 0; i1 < w * h; i1++)
{
Tab.anIntArray252[i1] = 0;
Tab.anIntArray253[i1] = 0;
}
Tab.anIntArray247 = new int[20];
Tab.anIntArray215 = new int[20];
for(int i2 = 0; i2 < 20; i2++)
{
Tab.anIntArray247[i2] = 0;
Tab.anIntArray215[i2] = 0;
}
Tab.anInt220 = w;
Tab.anInt230 = -1;
Tab.anInt236 = pID;
Tab.anInt250 = id;
Tab.anInt261 = 0;
Tab.anInt262 = 2;
Tab.anInt267 = h;
}
Code:
public static void addJeffScapeSprite(int i, int j, int k, int width, int height, String s)
{
Class9 class9 = aClass9Array210[i] = new Class9();
class9.anInt250 = i;
class9.anInt236 = i;
class9.anInt262 = 5;
class9.anInt217 = 1;
class9.anInt214 = 0;
class9.anInt220 = width;
class9.anInt267 = height;
class9.aByte254 = 0;
class9.anInt230 = 52;
class9.aClass30_Sub2_Sub1_Sub1_207 = JeffScapeLoader(j, "custom");
class9.aClass30_Sub2_Sub1_Sub1_260 = JeffScapeLoader(k, "custom");
class9.aString221 = s;
}
Create a folder named JeffScape in your cache folder and put those sprite in it: [Only registered and activated users can see links. ]
RENAMED VERSION:
Code:
Add this where you add your interface code
Code:
public static void PriceChecker(Class30_Sub2_Sub1_Sub4[] wid)
{
RSInterface rsinterface = addTab(20000);
addText(15126, "Click on an object in your inventory to see it value.", wid, 1, 0xff9040);
addText(15128, "Total Value :", wid, 0, 0xff9040);
addText(15129, "0", wid, 0, 0xff9040);
addText(15130, "Made by Jeff", wid, 0, 0xff9040);
addText(15131, "Proud owner of JeffScape", wid, 0, 0xff9040);
addJeffScapeSprite2(15106, 15106, 15106, "Sprite");
addJeffScapeSprite(15127, 15127, 15127, 16, 16, "Close");
rsinterface.aBoolean266 = false;
rsinterface.scrollMax = 0;
rsinterface.children = new int[7];
rsinterface.childX = new int[7];
rsinterface.clildY = new int[7];
rsinterface.children[0] = 15106;
rsinterface.childX[0] = 12;
rsinterface.clildY[0] = 20;
rsinterface.children[1] = 15127;
rsinterface.childX[1] = 473;
rsinterface.clildY[1] = 23;
rsinterface.children[2] = 15126;
rsinterface.childX[2] = 65;
rsinterface.clildY[2] = 166;
rsinterface.children[3] = 15128;
rsinterface.childX[3] = 93;
rsinterface.clildY[3] = 297;
rsinterface.children[4] = 15130;
rsinterface.childX[4] = 339;
rsinterface.clildY[4] = 297;
rsinterface.children[5] = 15129;
rsinterface.childX[5] = 127;
rsinterface.clildY[5] = 309;
rsinterface.children[6] = 15131;
rsinterface.childX[6] = 339;
rsinterface.clildY[6] = 309;
}
then search for this:
Code:
aMRUNodes_238
and under this add:
Code:
PriceChecker(textDrawingAreas);
then add these 3 method:
Code:
private static Sprite JeffScapeLoader(int i, String s)
{
long l = (Class50.method585((byte)1, s) << 8) + (long)i;
Sprite sprite = (Sprite)aMRUNodes_238.method222(l);
if(sprite != null) {
return sprite;
}
try {
sprite = new Sprite(signlink.findcachedir()+"/JeffScape/"+s+" "+i+".png");
aMRUNodes_238.method223(sprite, l, (byte)2);
} catch(Exception exception) {
return null;
}
return sprite;
}
public static void addJeffScapeSprite2(int i, int j, int k, String s)
{
RSInterface rsinterface = interfaceCache[i] = new RSInterface();
rsinterface.id = i;
rsinterface.parentID = i;
rsinterface.type = 5;
rsinterface.atActionType = 1;
rsinterface.anInt214 = 0;
rsinterface.width = 1;
rsinterface.height = 1;
rsinterface.aByte254 = 0;
rsinterface.anInt230 = 52;
rsinterface.sprite1 = JeffScapeLoader(j, "CUSTOM");
rsinterface.sprite2 = JeffScapeLoader(k, "CUSTOM");
rsinterface.tooltip = s;
}
public static void addJeffScapeSprite(int i, int j, int k, int width, int height, String s)
{
RSInterface rsinterface = interfaceCache[i] = new RSInterface();
rsinterface.id = i;
rsinterface.parentID = i;
rsinterface.type = 5;
rsinterface.atActionType = 1;
rsinterface.anInt214 = 0;
rsinterface.width = width;
rsinterface.height = height;
rsinterface.aByte254 = 0;
rsinterface.anInt230 = 52;
rsinterface.sprite1 = JeffScapeLoader(j, "custom");
rsinterface.sprite2 = JeffScapeLoader(k, "custom");
rsinterface.tooltip = s;
}
Create a folder named JeffScape in your cache folder and put those sprite in it:
http://**********/8H2INT
Thanks to Avatarscape for renaming it.
Note: the renamed version won't allow you to add item on this interface since Avatarscape renamed it before
I add the code that allow you to add item.
Enjoy =)
Pic: [Only registered and activated users can see links. ]
Btw, mine is in french but dont worry urs wont be...
Credits:
Me
Ascheriit for the addInv method.
Jagex
Well was bored so i logged in RS and realized that there were new interface so i decided to made it for RSPS...pretty easy took about 15 min anyway here the code:
Nice job, and someone finally used the snippet i posted =D.
Edit: You should add text lines for each item slot + clicking items to add to the interface.