Jump to content
  • 0

R> MVP HP bar source code


Meister

Question


  • Group:  Members
  • Topic Count:  280
  • Topics Per Day:  0.06
  • Content Count:  841
  • Reputation:   17
  • Joined:  04/16/12
  • Last Seen:  

As the title says, how to edit the source so that MVP HP bar is visible. For now monster that are not MVP are only shown on the client.

Thanks!

Link to comment
Share on other sites

11 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  3
  • Topics Per Day:  0.00
  • Content Count:  68
  • Reputation:   12
  • Joined:  09/05/12
  • Last Seen:  

Have you checked your conf/battle/monster.conf?

// Display some mob info next to their name? (add as needed)
// (does not works on guardian or emperium)
// 1: Display mob HP (Hp/MaxHp format)
// 2: Display mob HP (Percent of full life format)
// 4: Display mob's level
show_mob_info: 0

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  118
  • Topics Per Day:  0.03
  • Content Count:  1942
  • Reputation:   197
  • Joined:  01/08/12
  • Last Seen:  

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10015
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  

try this...

trunk/src/map/mob.c

#if PACKETVER >= 20120404
     if( src->type == BL_PC && !(md->status.mode&MD_BOSS) )
		    clif_monster_hp_bar(md, ((TBL_PC*)src)->fd);
#endif

change this

if( src->type == BL_PC && !(md->status.mode&MD_BOSS) )

to this

if( src->type == BL_PC )

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  280
  • Topics Per Day:  0.06
  • Content Count:  841
  • Reputation:   17
  • Joined:  04/16/12
  • Last Seen:  

thanks for this. I've tracked where I should edit the line.

try this...

trunk/src/map/mob.c

#if PACKETVER >= 20120404
  if( src->type == BL_PC && !(md->status.mode&MD_BOSS) )
			clif_monster_hp_bar(md, ((TBL_PC*)src)->fd);
#endif

change this

if( src->type == BL_PC && !(md->status.mode&MD_BOSS) )

to this

if( src->type == BL_PC )

great help!

Thanks all!

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  30
  • Topics Per Day:  0.01
  • Content Count:  782
  • Reputation:   82
  • Joined:  01/01/12
  • Last Seen:  

My mob.c doesnt' have line like that. Instead:

#if PACKETVER >= 20120404
if( !(md->status.mode&MD_BOSS) ){
int i;
for(i = 0; i < DAMAGELOG_SIZE; i++){ // must show hp bar to all char who already hit the mob.
struct map_session_data *sd = map_charid2sd(md->dmglog[i].id);
if( sd && check_distance_bl(&md->bl, &sd->bl, AREA_SIZE) ) // check if in range
clif_monster_hp_bar(md, sd->fd);
}
}

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  118
  • Topics Per Day:  0.03
  • Content Count:  1942
  • Reputation:   197
  • Joined:  01/08/12
  • Last Seen:  

My mob.c doesnt' have line like that. Instead:

#if PACKETVER >= 20120404
if( !(md->status.mode&MD_BOSS) ){
int i;
for(i = 0; i < DAMAGELOG_SIZE; i++){ // must show hp bar to all char who already hit the mob.
struct map_session_data *sd = map_charid2sd(md->dmglog[i].id);
if( sd && check_distance_bl(&md->bl, &sd->bl, AREA_SIZE) ) // check if in range
clif_monster_hp_bar(md, sd->fd);
}
}

are you using the latest revision?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  30
  • Topics Per Day:  0.01
  • Content Count:  782
  • Reputation:   82
  • Joined:  01/01/12
  • Last Seen:  

Yes, you can check here I got the exactly same mob.c.

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10015
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  

try this...

#if PACKETVER >= 20120404
int i;
for(i = 0; i < DAMAGELOG_SIZE; i++){ // must show hp bar to all char who already hit the mob.
struct map_session_data *sd = map_charid2sd(md->dmglog[i].id);
if( sd && check_distance_bl(&md->bl, &sd->bl, AREA_SIZE) ) // check if in range
clif_monster_hp_bar(md, sd->fd);
}

just remove the boss monster checking only...

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  30
  • Topics Per Day:  0.01
  • Content Count:  782
  • Reputation:   82
  • Joined:  01/01/12
  • Last Seen:  

Failed. Undeclared function int i;

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  280
  • Topics Per Day:  0.06
  • Content Count:  841
  • Reputation:   17
  • Joined:  04/16/12
  • Last Seen:  

My mob.c doesnt' have line like that. Instead:

#if PACKETVER >= 20120404
if( !(md->status.mode&MD_BOSS) ){
int i;
for(i = 0; i < DAMAGELOG_SIZE; i++){ // must show hp bar to all char who already hit the mob.
struct map_session_data *sd = map_charid2sd(md->dmglog[i].id);
if( sd && check_distance_bl(&md->bl, &sd->bl, AREA_SIZE) ) // check if in range
clif_monster_hp_bar(md, sd->fd);
}
}

change to this..

My mob.c doesnt' have line like that. Instead:

#if PACKETVER >= 20120404
if( src->type == BL_PC ){
int i;
for(i = 0; i < DAMAGELOG_SIZE; i++){ // must show hp bar to all char who already hit the mob.
struct map_session_data *sd = map_charid2sd(md->dmglog[i].id);
if( sd && check_distance_bl(&md->bl, &sd->bl, AREA_SIZE) ) // check if in range
clif_monster_hp_bar(md, sd->fd);
}
}

  • Upvote 1
Link to comment
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.   Paste as plain text instead

  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.

×
×
  • Create New...