Echoing Changes in Prompt

Post Reply
imany
Posts: 12
Joined: Mon May 16, 2011 7:32 pm

Echoing Changes in Prompt

Post by imany »

I capture all my prompt echoes to the bottom of my screen, which works fine. What I'd like to do is print changes in HP to the buffer as they come in per line. How would I do this?

If it helps, this is my current HP script snippet:

Code: Select all

function convertHP(currentHP, maxHP)
  if currentHP and maxHP then
      currentHP = tonumber(currentHP)
      maxHP = tonumber(maxHP)
      percHP = math.floor(currentHP*100/maxHP)
  end
  if percHP >= 81 then
      HPcolor = "green"
      elseif percHP >= 61 and percHP <=80 then
      HPcolor = "yellow"
      elseif percHP >= 41 and percHP <= 60 then
      HPcolor = "orange"
      elseif percHP <= 40 then
      HPcolor = "red"
  end
HP2:echo(currentHP, HPcolor, "c")
HP4:echo(maxHP, "green", "c")
HP5:echo(percHP, HPcolor, "c")
end

Post Reply