Jump to content

Photo

Hitpoints


  • Please log in to reply
3 replies to this topic

#1 judasrising

judasrising

    I play guitar

  • Members
  • Gender:Male
  • Location:Sweden but born in Finland

Posted 26 December 2016 - 08:03 PM

Hi

 

Does anyone have a script that shows enemies hitpoints on screen?



#2 ZoriaRPG

ZoriaRPG

    ZC Contributor & Wiki Editor

  • Members
  • Gender:Unspecified
  • Location:Prydon Academy

Posted 27 December 2016 - 12:11 AM

Hi
 
Does anyone have a script that shows enemies hitpoints on screen?


I have at least two, so I'll dig out the better of the pair. I also have one to display how much damage they take when hit.
  • judasrising likes this

#3 judasrising

judasrising

    I play guitar

  • Members
  • Gender:Male
  • Location:Sweden but born in Finland

Posted 27 December 2016 - 04:23 AM

I have at least two, so I'll dig out the better of the pair. I also have one to display how much damage they take when hit.


The one that shows how much damage they take when hit sounds fine.You can notice me on skype when you found one.

#4 ZoriaRPG

ZoriaRPG

    ZC Contributor & Wiki Editor

  • Members
  • Gender:Unspecified
  • Location:Prydon Academy

Posted 29 December 2016 - 12:31 AM

Oh, well, here's the one that shows their present hit points:

const int NPC_DRAW_HP_LAYER = 2;
const int NPC_DRAW_HP_X_OFFSET = -4;
const int NPC_DRAW_HP_Y_OFFSET = -4;
const int NPC_DRAW_HP_SHADOW_OFFSET = 1;
const int NPC_DRAW_HP_FONT = 2; //z3 small
const int NPC_DRAW_HP_FONT_SIZE = 16; 
const int NPC_DRAW_HP_BG_COLOUR = 0x0F;
const int NPC_DRAW_HP_FG_COLOUR = 0x01;
const int NPC_DRAW_HP_OPACITY = 128;

//Call in the global active script, while loop, prior to Waitdraw();
void DrawEnemyHP(){
	for ( int q = Screen->NumNPCs(); q > 0; q-- ) {
		npc n = Screen->LoadNPC(q);
		if ( n->Type != NPCT_GUY && n->Type != NPCT_FAIRY && n->Type != NPCT_LANMOLA
			&& n->Type != NPCT_MOLDORM && n->Type != NPCT_GLEEOK && n->Type != NPCT_PATRA
			&& n->Type != NPCT_DODONGO && n->Type != NPCT_ROCK && n->ID != NPC_GANON )
		{
			Screen->DrawInteger(NPC_DRAW_HP_LAYER, n->X+NPC_DRAW_HP_X_OFFSET+NPC_DRAW_HP_SHADOW_OFFSET,
				n->Y+,NPC_DRAW_HP_Y_OFFSET+NPC_DRAW_HP_SHADOW_OFFSET, NPC_DRAW_HP_FONT, NPC_DRAW_HP_BG_COLOUR,
				-1, NPC_DRAW_HP_FONT_SIZE, NPC_DRAW_HP_FONT_SIZE, n->HP, 0, NPC_DRAW_HP_OPACITY);
				Screen->DrawInteger(NPC_DRAW_HP_LAYER, n->X+NPC_DRAW_HP_X_OFFSET,
				n->Y+,NPC_DRAW_HP_Y_OFFSET, NPC_DRAW_HP_FONT, NPC_DRAW_HP_FG_COLOUR,
				-1, NPC_DRAW_HP_FONT_SIZE, NPC_DRAW_HP_FONT_SIZE, n->HP, 0, NPC_DRAW_HP_OPACITY);
		}
	}
}



0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users