Jump to content
  • 0

HP Bar


Yum

Question


  • Group:  Members
  • Topic Count:  13
  • Topics Per Day:  0.00
  • Content Count:  27
  • Reputation:   3
  • Joined:  02/17/12
  • Last Seen:  

How do I change the color of the bar hp? You know that greenish color, I wanted a different color there ...

void faction_show_hp(struct map_session_data *sd)
{
unsigned char buf[34];
const int cmd = 0x2e0;

nullpo_retv(sd);

WBUFW(buf,0) = cmd;
WBUFL(buf,2) = sd->status.account_id;
memcpy(WBUFP(buf,6), sd->status.name, NAME_LENGTH);

if( sd->battle_status.max_hp > INT16_MAX )
{
WBUFW(buf,30) = sd->battle_status.hp/(sd->battle_status.max_hp/100);
WBUFW(buf,32) = 100;
}
else
{
WBUFW(buf,30) = sd->battle_status.hp;
WBUFW(buf,32) = sd->battle_status.max_hp;
}

clif_send(buf, packet_len(cmd), &sd->bl, THIRDY_FACTION);
}

Where changes?

Link to comment
Share on other sites

3 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  81
  • Topics Per Day:  0.02
  • Content Count:  1654
  • Reputation:   583
  • Joined:  08/09/12
  • Last Seen:  

It's hardcoded in the client

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  13
  • Topics Per Day:  0.00
  • Content Count:  27
  • Reputation:   3
  • Joined:  02/17/12
  • Last Seen:  

Strange, a friend assured me have done it in src.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  81
  • Topics Per Day:  0.02
  • Content Count:  1654
  • Reputation:   583
  • Joined:  08/09/12
  • Last Seen:  

Server only provide the value for HP/SP bar.

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...