Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 07-20-2008, 06:22 AM
GULTHEX GULTHEX is offline
Registered User
Join Date: Jul 2008
Posts: 148
GULTHEX can only hope to improve
Unhappy [health script help] <read

ok when i press s to punch it turns my char invis but only if they have this script
and the punch script works fine allso
but this only happens if they have this script
so whats the prob with the script

PHP Code:
//#CLIENTSIDE
function onCreated(){

setTimer(.05);
}
function 
onTimeout(){
hideimgs(0,200);
  for (
i=0this.hps.size(); i++) {
    
showtext(i,this.hps[i][1],this.hps[i][2],"Arial","cb",this.hps[i][0]);
    if (
this.hps[i][0] < 0changeimgcolors(i,1,0,0,1);
     else 
changeimgcolors(i,0,1,0,1);
    
changeimgzoom(i,.8);
    
this.hps[i][2]-=.1;
    
this.hps[i][3]--;
    if (
this.hps[i][3] == 0) {
      
this.hps.delete(i);
    }
  }
  
  if (
client.hp clientr.hpmaxclient.hp clientr.hpmax;
  if (
player.hearts 0this.dead 1;
  if (
this.dead) {
    if (
player.hearts != 0) {
      
this.dead 0;
      
client.hp clientr.hpmax;
      
player.hearts 3;
    }
  }else if (
client.hp <= 0) {
    
player.hearts 0;
    
this.dead 1;
  }else if (
player.fullhearts == 20) {
    if (
player.hearts != 3) {
      
this.php = (player.hearts 3) * 2;
      
client.hp += int(this.php);
      
player.hearts 3;
      
this.hps.add({this.php,player.x+1.5,player.y-1,80});
    }
  }else 
serverwarp("login1");
  
  
setTimer(.05);
}
function 
onPlayerenters(){
this.hps NULL;

Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 04:24 PM.


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