Jump to content
  • 0
Sign in to follow this  
anjasoleil0

monster hp bar, but only for mvps?

Question

3 answers to this question

Recommended Posts

  • 0

Try navigating to the function clif_monster_hp_bar in clif.c and add a condition for the mob to be a mvp. Something like md->state.boss

void clif_monster_hp_bar( struct mob_data* md, struct map_session_data *sd ) {
	struct packet_monster_hp p;
	
	nullpo_retv(md);
	nullpo_retv(sd);
        if(md->state.boss){
	   p.PacketType = monsterhpType;
	   p.GID = md->bl.id;
	   p.HP = md->status.hp;
	   p.MaxHP = md->status.max_hp;

	   clif->send(&p, sizeof(p), &sd->bl, SELF);
        }
}

PD: Don't forget to recompile.

Edited by Nardoth

Share this post


Link to post
Share on other sites
  • 0

Try navigating to the function clif_monster_hp_bar in clif.c and add a condition for the mob to be a mvp. Something like md->state.boss

void clif_monster_hp_bar( struct mob_data* md, struct map_session_data *sd ) {
	struct packet_monster_hp p;
	
	nullpo_retv(md);
	nullpo_retv(sd);
        if(md->state.boss){
	   p.PacketType = monsterhpType;
	   p.GID = md->bl.id;
	   p.HP = md->status.hp;
	   p.MaxHP = md->status.max_hp;

	   clif->send(&p, sizeof(p), &sd->bl, SELF);
        }
}

PD: Don't forget to recompile.

 

Where will i put 'md->state.boss'? I don't wanna mess things up. Thanks :D

Try navigating to the function clif_monster_hp_bar in clif.c and add a condition for the mob to be a mvp. Something like md->state.boss

void clif_monster_hp_bar( struct mob_data* md, struct map_session_data *sd ) {
	struct packet_monster_hp p;
	
	nullpo_retv(md);
	nullpo_retv(sd);
        if(md->state.boss){
	   p.PacketType = monsterhpType;
	   p.GID = md->bl.id;
	   p.HP = md->status.hp;
	   p.MaxHP = md->status.max_hp;

	   clif->send(&p, sizeof(p), &sd->bl, SELF);
        }
}

PD: Don't forget to recompile.

 

 

I assume it would look something like this? 

 

void clif_monster_hp_bar( struct mob_data* md, struct map_session_data *sd ) {
    if( md->state.boss ){
    struct packet_monster_hp p;
 
    nullpo_retv(md);
    nullpo_retv(sd);
    p.PacketType = monsterhpType;
    p.GID = md->bl.id;
    p.HP = md->status.hp;
    p.MaxHP = md->status.max_hp;
    clif->send(&p, sizeof(p), &sd->bl, 

 

I tried it, it still shows normal mob's HP

Share this post


Link to post
Share on other sites
  • 0

I actually writed it in the code, after the nullpo, you just need to copy and paste. Anyways I checked it, it doesn't work, The function is for older client versions. There are other functions too like clif_hp_meter and the like but I can't figure out how to do it, every mob still has the hp bar.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.