View Single Post
  #1  
Old 10-11-2007, 05:26 PM
xAndrewx xAndrewx is offline
Registered User
xAndrewx's Avatar
Join Date: Sep 2004
Posts: 5,260
xAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud of
re-writing death [classic graal]

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 !!
__________________
Reply With Quote