Instance.getServer().getLoginConnector().getActionSender()
.playerLogin(this);
final Player p = this;
Instance.getDelayedEventHandler().add(
new DelayedEvent(this, 60000) {
private void checkStat(int statIndex) {
if (statIndex != 3
&& owner.getCurStat(statIndex) == owner
.getMaxStat(statIndex)) {
owner.getActionSender()
.sendMessage(
"Your "
+ Formulae.statArray[statIndex]
+ " ability has returned to normal.");
}
}
public void run() {
if (p == null || p.isDestroy()) {
this.stop();
}
for (int statIndex = 0; statIndex < 18; statIndex++) {
if (statIndex == 5) {
continue;
}// addByte(-1
int curStat = getCurStat(statIndex);
int maxStat = getMaxStat(statIndex);
if (curStat > maxStat) {
setCurStat(statIndex, curStat - 1);
getActionSender().sendStat(statIndex);
checkStat(statIndex);
}// sendAppear
else if (curStat < maxStat) {
setCurStat(statIndex, curStat + 1);
getActionSender().sendStat(statIndex);
checkStat(statIndex);
}
}
}
});
drainer = new DelayedEvent(this, Integer.MAX_VALUE) {
public void run() {
if (p == null || p.isDestroy()) {
this.stop();
}