Author Topic: eventdisplaystatus  (Read 2337 times)

Offline capo

  • Friend
  • **
  • Posts: 70
    • View Profile
eventdisplaystatus
« on: February 16, 2008, 10:10:15 pm »

Hi!

I am attempting to get player.c and combat.c to display a player's stats each round of combat, however, I am failing.  This is what I have for eventdisplaystatus():

Code: [Select]
/* *****************  /lib/player.c events  *************** */

int eventDisplayStatus() {
    string str;
    int qp, xp, hp, mp, sp, max_hp, max_mp, max_sp;

    hp = GetHealthPoints();
    max_hp = GetMaxHealthPoints();
    mp = GetMagicPoints();
    max_mp = GetMaxMagicPoints();
    sp = GetStaminaPoints();
    max_sp = GetMaxStaminaPoints();


/*
   if( percent(hp, max_hp) < 10 )
        str = "     {HP: " + hp + "%^RESET%^/" + max_hp + " }";
    else str = "     {HP: " + hp + "%^RESET%^/" + max_hp + " }";
    if( percent(mp, max_mp) < 10.0 )
        str += "     {SP: " + mp + "/" + max_mp + " }";
    else str += "     {SP: " + mp + "/" + max_mp + " }";
    if( percent(sp, max_sp) < 10.0 )
        str += "     {EP: " + sp + "/" + max_sp + " }";
    else str += "     {EP: " + sp + "/" + max_sp + " }";
*/

    str = "     {HP: " + hp + "/" + max_hp + " }";
   str += "     {SP: " + mp + "/" + max_mp + " }";
   str += "     {EP: " + sp + "/" + max_sp + " }";

  message("status", str, this_object());
    return 1;
}

Anyone see, or know a reason it wont just display each round now?

Offline conan

  • Acquaintance
  • *
  • Posts: 14
    • View Profile
Re: eventdisplaystatus
« Reply #1 on: March 22, 2008, 06:22:07 pm »
Did you ever figure this out, Capo?

I think it is a great idea.

Offline capo_two

  • Acquaintance
  • *
  • Posts: 8
    • View Profile
Re: eventdisplaystatus
« Reply #2 on: March 26, 2008, 06:39:22 pm »
Still getting it to work correctly! It has a long path to get to the source of it, it appears.