[PI] Custom Slayer Shop Interface by DiamondX
Hey rune-server, This is just an interface for a slayer shop iv been working on. Ill explain now what goes on and how it works.
It will load up the interface. if you add the clickingbuttons codes i will provide you. you will need to change them to your clickingbuttons case. now if you do add that. you will first open the interface on weapons section.. the red will highlight the weapon title on the button to tell you that your on it. if you click to any other tabs. long as you have them setup they will change to red when you click on it and any previous tab will go back to its normal color.
So here we go.
========================
Pictures of what your adding:
[Only registered and activated users can see links. Click Here To Register...]
[Only registered and activated users can see links. Click Here To Register...]
[Only registered and activated users can see links. Click Here To Register...]
Now remember this is just the interface. I am not making it a full shop. that would actually make this go in the server sided section. Here we go.
===========
First, go to your RSInterface.java and search for:
Code:
aclass44 = archive;
Below that add:
Code:
slayerShop(rsFonts);
slayerShop1(rsFonts);
slayerShop2(rsFonts);
Now, search for your other interface codes. For example search for:
Code:
public static void optiontab
Or somthing like that.
Under the last bracket add:
Code:
public static void slayerShop(RSFont[] TDA) {
RSInterface Interface = addInterface(32000);
addSprite(32001, 0, "Interfaces/slayershop/BACKGROUND");
addHoverButton(32002, "Interfaces/slayershop/CLOSE", 0, 16, 16, "Close", -1, 32003, 3);
addHoveredButton(32003, "Interfaces/slayershop/CLOSE", 1, 16, 16, 32004);
addText(32005, "Slayer Shop", 0xFF9800, true, true, 52, TDA, 2);
addText(32006, "Weapons", 0xFF9800, true, true, 52, TDA, 2);
addText(32007, "Slayer Points: 0", 0xFF9800, true, true, 52, TDA, 2);
AddInterfaceButton(32008, 0, "Interfaces/slayerShop/CLICK", 164, 26, "", 1);
AddInterfaceButton(32009, 0, "Interfaces/slayerShop/CLICK", 164, 26, "View Armour", 1);
AddInterfaceButton(32010, 0, "Interfaces/slayerShop/CLICK", 164, 26, "View Misc", 1);
addText(32011, "Weapons", 0xFF0000, true, true, 52, TDA, 2);
addText(32012, "Armour", 0xFF9800, true, true, 52, TDA, 2);
addText(32013, "Misc.", 0xFF9800, true, true, 52, TDA, 2);
setChildren(12, Interface);
setBounds(32001, 4, 6, 0, Interface);//BackGround
setBounds(32002, 478, 12, 1, Interface);//Close Button
setBounds(32003, 478, 12, 2, Interface);//Close Hovered Button
setBounds(32005, 255, 15, 3, Interface);//Slayer Shop Text
setBounds(32006, 47, 44, 4, Interface);//Weapons Text
setBounds(32007, 395, 43, 5, Interface);//Slayer Points Text
setBounds(32008, 340, 75, 6, Interface);//Weapons Bar
setBounds(32009, 340, 120, 7, Interface);//Armour Bar
setBounds(32010, 340, 165, 8, Interface);//Misc Bar
setBounds(32011, 410, 80, 9, Interface);//Weapons Bar Text
setBounds(32012, 410, 125, 10, Interface);//Armour Bar Text
setBounds(32013, 410, 170, 11, Interface);//Misc. Bar Text
}
public static void slayerShop1(RSFont[] TDA) {
RSInterface Interface = addInterface(32200);
addSprite(32201, 0, "Interfaces/slayershop/BACKGROUND");
addHoverButton(32202, "Interfaces/slayershop/CLOSE", 0, 16, 16, "Close", -1, 32203, 3);
addHoveredButton(32203, "Interfaces/slayershop/CLOSE", 1, 16, 16, 32204);
addText(32205, "Slayer Shop", 0xFF9800, true, true, 52, TDA, 2);
addText(32206, "Armour", 0xFF9800, true, true, 52, TDA, 2);
addText(32207, "Slayer Points: 0", 0xFF9800, true, true, 52, TDA, 2);
AddInterfaceButton(32208, 0, "Interfaces/slayerShop/CLICK", 164, 26, "View Weapons", 1);
AddInterfaceButton(32209, 0, "Interfaces/slayerShop/CLICK", 164, 26, "", 1);
AddInterfaceButton(32210, 0, "Interfaces/slayerShop/CLICK", 164, 26, "View Misc", 1);
addText(32211, "Weapons", 0xFF9800, true, true, 52, TDA, 2);
addText(32212, "Armour", 0xFF0000, true, true, 52, TDA, 2);
addText(32213, "Misc.", 0xFF9800, true, true, 52, TDA, 2);
setChildren(12, Interface);
setBounds(32201, 4, 6, 0, Interface);//BackGround
setBounds(32202, 478, 12, 1, Interface);//Close Button
setBounds(32203, 478, 12, 2, Interface);//Close Hovered Button
setBounds(32205, 255, 15, 3, Interface);//Slayer Shop Text
setBounds(32206, 47, 44, 4, Interface);//Weapons Text
setBounds(32207, 395, 43, 5, Interface);//Slayer Points Text
setBounds(32208, 340, 75, 6, Interface);//Weapons Bar
setBounds(32209, 340, 120, 7, Interface);//Armour Bar
setBounds(32210, 340, 165, 8, Interface);//Misc Bar
setBounds(32211, 410, 80, 9, Interface);//Weapons Bar Text
setBounds(32212, 410, 125, 10, Interface);//Armour Bar Text
setBounds(32213, 410, 170, 11, Interface);//Misc. Bar Text
}
public static void slayerShop2(RSFont[] TDA) {
RSInterface Interface = addInterface(32300);
addSprite(32301, 0, "Interfaces/slayershop/BACKGROUND");
addHoverButton(32302, "Interfaces/slayershop/CLOSE", 0, 16, 16, "Close", -1, 32303, 3);
addHoveredButton(32303, "Interfaces/slayershop/CLOSE", 1, 16, 16, 32304);
addText(32305, "Slayer Shop", 0xFF9800, true, true, 52, TDA, 2);
addText(32306, "Misc.", 0xFF9800, true, true, 52, TDA, 2);
addText(32307, "Slayer Points: 0", 0xFF9800, true, true, 52, TDA, 2);
AddInterfaceButton(32308, 0, "Interfaces/slayerShop/CLICK", 164, 26, "View Weapons", 1);
AddInterfaceButton(32309, 0, "Interfaces/slayerShop/CLICK", 164, 26, "View Armour", 1);
AddInterfaceButton(32310, 0, "Interfaces/slayerShop/CLICK", 164, 26, "", 1);
addText(32311, "Weapons", 0xFF9800, true, true, 52, TDA, 2);
addText(32312, "Armour", 0xFF9800, true, true, 52, TDA, 2);
addText(32313, "Misc.", 0xFF0000, true, true, 52, TDA, 2);
setChildren(12, Interface);
setBounds(32301, 4, 6, 0, Interface);//BackGround
setBounds(32302, 478, 12, 1, Interface);//Close Button
setBounds(32303, 478, 12, 2, Interface);//Close Hovered Button
setBounds(32305, 255, 15, 3, Interface);//Slayer Shop Text
setBounds(32306, 39, 44, 4, Interface);//Weapons Text
setBounds(32307, 395, 43, 5, Interface);//Slayer Points Text
setBounds(32308, 340, 75, 6, Interface);//Weapons Bar
setBounds(32309, 340, 120, 7, Interface);//Armour Bar
setBounds(32310, 340, 165, 8, Interface);//Misc Bar
setBounds(32311, 410, 80, 9, Interface);//Weapons Bar Text
setBounds(32312, 410, 125, 10, Interface);//Armour Bar Text
setBounds(32313, 410, 170, 11, Interface);//Misc. Bar Text
}
Now Compile. Download the sprites i am providing you with below.
[Only registered and activated users can see links. Click Here To Register...] <----- put the folder inside "c:/yourcache/sprites/interfaces"
That will be going into your interfaces folder in your cache.
there you go! :D You know have a cool slayer shop interface. I would recommend using buttons to click with the picture of the item in it for this interface. or just load items as regular.
======
CAUSE I LOVE THE RUNE-SERVER COMMUNITY HERES THE CLICKINGBUTTONS.JAVA CODES.
Add this into your clickingbuttons.java
Code:
case 126052:
c.getPA().showInterface(32000);
break;
case 126053:
c.getPA().showInterface(32200);
break;
case 125208:
c.getPA().showInterface(32000);
break;
case 125210:
c.getPA().showInterface(32300);
break;
case 125009:
c.getPA().showInterface(32200);
break;
case 125010:
c.getPA().showInterface(32300);
break;
You now have an interface that switches between pages now. Very nice.
You might have to change the case numbers to match yours..
Enjoy.
- DiamondX