Obviously not the most efficient way. You should use an array to determine if more than one lvl is achieved. This code will support 2 levels at a time only.
You should also use the cache packed sprites for skill icons. I could not find the index so I gave up, please feel free to post if you have it.
[Only registered and activated users can see links. ]
As I received help with this I feel stupid for not releasing.
Now players won't get spammed up in chatbox. yey
Sprites + psd [Only registered and activated users can see links. ]
Code:
for(int i = 0; i < 5; i++)
levelup[i] = new Sprite("Level/STAGE "+i);
for(int i = 0; i < 23; i++)
skillIcon[i] = new Sprite("Level/ICON "+i);
Code:
levelup = new Sprite[5]; //for different backgrounds example when stat 99 is achieved etc etc
skillIcon = new Sprite[23];
Code:
public static String[] skillName = {"Attack", "Defence", "Strength", "Hitpoints", "Ranging", "Prayer", "Magic", "Cooking", "Woodcutting", "Fletching", "Fishing", "Firemaking", "Crafting", "Smithing", "Mining", "Herblore", "Agility", "Thieving", "Slayer", "Farming", "Runecrafting","Construction","Hunter"};
Sprite[] levelup;
Sprite[] skillIcon;
public int movlng = 0;
public int movlng2 = 0;
public int stage = 0;
public int stage2 = 0;
public int skillToLvi = -1;
public int skiilLevel = -1;
public int skiliToLvl1 = -1;
public int siklllevel1 = -1;
public int levelUpInstances = 0;
public boolean didLeveIUp = false;
public boolean didLevelUp2 = false;
public void runLevelInterface(){
int x = -200;
int y = 290;
if(clientSize != 0){
y = clientHeight - 215;
}
if(stage == 250){
stage = 0;
moving = 0;
didLevelUp = false;
skillToLvl = -1;
skillLevel = -1;
return;
}
moving += 3;
if(moving > 200) {
moving = 200;
}
stage++;
String text = "You advanced to level "+skillLevel+" "+skillName[skillToLvl]+".";
levelup[4].drawSprite1(x+moving,y, moving);
skillIcon[skillToLvl].drawSprite1(x+11+moving,y+10, moving);
smallText.drawText(0x000000, text, y+26, x+135+moving);
}
public void runLevelInterface2(){
int x = -200;
int y = 243;
if(clientSize != 0){
y = clientHeight - 262;
}
if(stage2 == 250){
stage2 = 0;
moving2 = 0;
didLevelUp2 = false;
skillToLvl1 = -1;
skillLevel1 = -1;
return;
}
moving2 += 3;
if(moving2 > 200) {
moving2 = 200;
}
stage2++;
String text = "You advanced to level "+skillLevel1+" "+skillName[skillToLvl1]+".";
levelup[3].drawSprite1(x+moving2,y, moving2);
skillIcon[skillToLvl1].drawSprite1(x+11+moving2,y+10, moving2);
smallText.drawText(0x000000, text, y+26, x+135+moving2);
}
This is pretty cool idea, it sure was annoying getting your chatbox spammed before. The background of it looks like something off the 2006 clients instead of the 2007 client, which isn't hard to edit and isn't that big of a deal anyways.
Spoiler for Come under my wing:
Spoiler for sb lol!:
Oldschool Runescape progress thread is[Only registered and activated users can see links. ]!