Well everything deleted so ill repost, btw ill add all the things i forgot this time
Go in player.java and add this:
Code:
/**
* Checks special amount and gets config.
*/
public void checkAmount(Player p) {
int amount = p.specialAmount;
if (amount >= 100){
getActionSender().sendConfig(300, 1000);
} else if (amount >= 75){
getActionSender().sendConfig(300, 750);
} else if (amount >= 50){
getActionSender().sendConfig(300, 500);
} else if (amount >= 25){
getActionSender().sendConfig(300, 250);
} else if (amount >= 0){
getActionSender().sendConfig(300, 0);
} else {
// nothing
}
}
Also add this with the rest of the timers:
Code:
if (specialAmountDelay > 0) {
specialAmountDelay--;
} else {
if (specialAmount < 100) {
specialAmount++;
specialAmountUpdateReq = true;
}
specialAmountDelay = 1;
}
if (specialAmountUpdateReq) {
checkAmount(this);
specialAmountUpdateReq = false;
}
Also add this with the rest:
Code:
public boolean specialAmountUpdateReq = false;
public int specialAmountDelay = 0;
Ok now go in actionbuttons and replace ur crappy messy spec method with this:
Code:
case 75:
case 76:
case 77:
case 78:
case 79:
case 80:
case 81:
case 82:
case 83:
case 84:
case 85:
case 86:
case 87:
case 88:
case 89:
case 91:
case 92:
case 93:
if (buttonId == 8 || buttonId == 10 || buttonId == 11) {
if(player.deathDelay > 0 || player.isDead == true || player.specDelay > 5) {
return;
}
if(player.specialAmount < player.getSpecialAmount()) {
player.sm("You don't have enough special attack amount left.");
return;
}
if(player.usingSpecial == false) {
player.usingSpecial = true;
player.getActionSender().sendConfig(301, 1);
return;
}
player.usingSpecial = false;
player.getActionSender().sendConfig(301, 0);
}
break;
Go in actionsender and add this to ur login method:
Code:
sendConfig(300, 1000);
Now this i forgot, this will make so when u att it will turn the highlight of spec att off
go in playercombat and search
and under
Code:
if(p.combatDelay == 0) {
add this:
Code:
p.getActionSender().sendConfig(301, 0);