HTML Code:
function onPlayerHurt() {
if (player.hearts <= 0) {
this.doDeath();
}
}
function doDeath() {
while(player.hearts <= 0) {
waitfor("", "noevent", 0.05);
}
//Call your functions here [showstats, enablefeatures] [it's a public function here]
c.dStats();
c.dFeatures();
}
So, instead of constantly doing a timeout that removes the old graal stuff [the health yangs, mp, ap, arrows and darts] it'll only do a check when necessary. [Easier to create custom gui's on the old Graal system [playerhearts]]
in this case I did it for the old Graal features, could do alot more cool things !!