Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   Code Gallery (https://forums.graalonline.com/forums/forumdisplay.php?f=179)
-   -   re-writing death [classic graal] (https://forums.graalonline.com/forums/showthread.php?t=77134)

xAndrewx 10-11-2007 05:26 PM

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 !!


All times are GMT +2. The time now is 11:23 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.