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 09-18-2010, 09:43 PM
brasilboy109 brasilboy109 is offline
Exorian
Join Date: Aug 2010
Posts: 5
brasilboy109 is on a distinguished road
Health for HUD

everytime i get hurt nothing happenes but when i update the scripts it shows the correct ammount of hearts.... Idk how to update it

any ideas to make it better and or be able to update the health?


PHP Code:
// Scripted by *brasilboy109
//#CLIENTSIDE
function onCreated(){
timeout=0.05;

/* HEALTH SCRIPT V1.0 MADE BY BRASILBOY109 */
/* IMGAES MADE BY PAVILION75 */
}

function 
onTimeout(){
if(
player.hearts>=0.5){
  
showimg(500,"pavilion75-red-heart-half.png",1000,25);
  
changeimgzoom(500,1);
  
changeimgvis(500,4);
}

//health 1 image
if(player.hearts>=1){
  
showimg(501,"pavilion75-red-heart.png",1000,25);
  
changeimgzoom(501,1);
  
changeimgvis(501,4);
}


//health 1.5 image
if(player.hearts>=1.5){
  
//health 0.5 image
  
showimg(502,"pavilion75-red-heart-half.png",1050,25);
  
changeimgzoom(502,1);
  
changeimgvis(502,4);
}

//health 2 image
if(player.hearts>=2){
  
//health 0.5 image
  
showimg(503,"pavilion75-red-heart.png",1050,25);
  
changeimgzoom(503,1);
  
changeimgvis(503,4);
}
if(
player.hearts>=2.5){
  
//health 0.5 image
  
showimg(504,"pavilion75-red-heart-half.png",1100,25);
  
changeimgzoom(504,1);
  
changeimgvis(504,4);
}
if(
player.hearts>=3){
  
//health 0.5 image
  
showimg(505,"pavilion75-red-heart.png",1100,25);
  
changeimgzoom(505,1);
  
changeimgvis(505,4);

}if(
player.hearts>=3.5){
  
//health 0.5 image
  
showimg(506,"pavilion75-red-heart-half.png",1150,25);
  
changeimgzoom(506,1);
  
changeimgvis(506,4);
}if(
player.hearts>=4){
  
//health 0.5 image
  
showimg(507,"pavilion75-red-heart.png",1150,25);
  
changeimgzoom(507,1);
  
changeimgvis(507,4);
}if(
player.hearts>=4.5){
  
//health 0.5 image
  
showimg(508,"pavilion75-red-heart-half.png",1200,25);
  
changeimgzoom(508,1);
  
changeimgvis(508,4);
}if(
player.hearts>=5){
  
//health 0.5 image
  
showimg(509,"pavilion75-red-heart.png",1200,25);
  
changeimgzoom(5009,1);
  
changeimgvis(509,4);
}if(
player.hearts>=5.5){
  
//health 0.5 image
  
showimg(510,"pavilion75-red-heart-half.png",1250,25);
  
changeimgzoom(510,1);
  
changeimgvis(510,4);
}if(
player.hearts>=6){
  
//health 0.5 image
  
showimg(511,"pavilion75-red-heart.png",1250,25);
  
changeimgzoom(511,1);
  
changeimgvis(511,4);
  }
  
timeout=0.05;
  } 
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 01:10 AM.


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