Jump to content

choiboy

Members
  • Posts

    1
  • Joined

  • Last visited

Everything posted by choiboy

  1. Hi guys, I'm quite new here. How are you today? I'm writing this post as I seem to be having some trouble getting bonus2 bRegenPercentHP,n,t; Gain n% of max HP every t milliseconds to work. It seems like it's not doing anything at all. I put the following on Knife (id 1201) under the script column in item_db_re table and it doesn't seem to do anything. bonus2 bRegenPercentHP,20,3000; I can confirm that I am using the correct table and etc since other bonuses seem to work fine. I haven't looked deep into it but what I can see in pc.c is: case SP_REGEN_PERCENT_HP: // bonus2 bRegenPercentHP,n,t; if (sd->state.lr_flag != 2) { sd->percent_hp_regen.value = type2; sd->percent_hp_regen.rate = val; } break; and within the pc_regen function, if (sd->percent_hp_regen.value) { sd->percent_hp_regen.tick += diff_tick; while (sd->percent_hp_regen.tick >= sd->percent_hp_regen.rate) { hp += (sd->percent_hp_regen.value* sd->status.max_hp); sd->percent_hp_regen.tick -= sd->percent_hp_regen.rate; } } It seems like sd->percent_hp_regen.value is a short, and it's doing hp += percent hp val * max hp. Should this percent_hp_regen.value be turned into a percentage first and then multiplied? Also I tried hardcoding the hp+= value and it doesn't seem to do anything either. Is anyone else having the same problem/know how to fix this? Thanks in advance,
×
×
  • Create New...