Congratulations, you just advanced an attack level! You can now wear ...
Description: To tell your players what they can wear when they reach a certain level
Difficulty: -10/10
Assumed Knowledge: Copy and paste
Tested Server: None but it should work on all
Files/Classes Modified: Client.java
Procedure
Declare this in UpdateNPCChat() or whatever
Code:
case 1:
sendFrame164(6247);
stillgfx(199, absX, absY);
sendFrame126("@[email protected], you just advanced an attack level!", 6248);
sendFrame126("@[email protected] attack level is now " + getLevelForXP(playerXP[0]) + " .", 6249);
NpcDialogueSend = true;
break;
case 2:
switch (playerLevel[0]) {
case 5:
sendFrame164(6206);
sendFrame246(6210, 290, 1325);
sendFrame126("", 6207);
sendFrame126("You can now equip Steel weapons!", 6208);
NpcDialogueSend = true;
break;
case 10:
sendFrame164(6206);
sendFrame246(6210, 290, 1327);
sendFrame126("", 6207);
sendFrame126("@[email protected] can now equip Black weapons!", 6208);
NpcDialogueSend = true;
break;
case 20:
sendFrame164(6206);
sendFrame246(6210, 290, 1329);
sendFrame126("", 6207);
sendFrame126("@[email protected] can now equip Mithril weapons!", 6208);
NpcDialogueSend = true;
break;
case 30:
sendFrame164(6206);
sendFrame246(6210, 290, 1331);
sendFrame126("", 6207);
sendFrame126("@[email protected] can now equip Adamant weapons!", 6208);
NpcDialogueSend = true;
break;
case 40:
sendFrame164(6206);
sendFrame246(6210, 290, 1333);
sendFrame126("", 6207);
sendFrame126("@[email protected] can now equip Runite weapons!", 6208);
NpcDialogueSend = true;
break;
case 50:
sendFrame164(6206);
sendFrame246(6210, 290, 4153);
sendFrame126("", 6207);
sendFrame126("@[email protected] can now equip Granite weapons with 50 strength!", 6208);
NpcDialogueSend = true;
break;
case 60:
sendFrame164(6206);
sendFrame246(6210, 290, 4587);
sendFrame126("", 6207);
sendFrame126("@[email protected] can now equip Dragon weapons!", 6208);
NpcDialogueSend = true;
break;
case 99:
sendFrame164(6206);
sendFrame246(6210, 290, 0000);//CHANGE 0000 TO THE SKILL CAPE ID
sendFrame126("You can now buy and wear an Attack skillcape!", 6207);
sendFrame126("@[email protected] can buy a skill cape from ------!", 6208);
NpcDialogueSend = true;
break;
default:
NpcDialogue = 0;
NpcDialogueSend = false;
RemoveAllWindows();
break;
}
break;
Add this in your Levelup method..
Code:
case 0: // Attack levelup
NpcDialogue = 1;
sendMessage("Congratulations, you just advanced an attack level.");
break;
And declare this method if you don't have it..
Code:
public void sendFrame246(int MainFrame, int SubFrame, int SubFrame2) {
outStream.createFrame(246);
outStream.writeWordBigEndian(MainFrame);
outStream.writeWord(SubFrame);
outStream.writeWord(SubFrame2);
flushOutStream();
}
And add this to packet 40
Code:
|| NpcDialogue == 1
I believe that is it.. I haven't tested this or anything but this is all you should have to do ;P
If you want to add it for defense or strength you only really need to edit it a tiny bit..
I KNOW THIS IS NOT THE BEST WAY TO DO THIS BUT I WANTED TO DO IT QUICK SO JDASWVFSKLRHBVKSHBKSFJH
Credits: I wrote this tutorial but I'm sure it has been posted before
Thank you Surfer25 for reminding me to use a switch