For what it's worth, here is my script to reprocess and echo the prompt in Lusternia
function prompt (name,output,wildcard)
hp.prev = hp.cur -- Set Previous values for
mp.prev = mp.cur -- Computing differences
ep.prev = ep.cur
pp.prev = pp.cur
hp.cur = tonumber(wc[1])
mp.cur = tonumber(wc[2])
ep.cur = tonumber(wc[3])
pp.cur = tonumber(wc[4])
local defs = wc[5]
aff.prone = (string.find (defs, "p") ~= nil)
bal.bal = (string.find (defs, "x") ~= nil)
bal.eq = (string.find (defs, "e") ~= nil)
bal.la = (string.find (defs, "l") ~= nil)
bal.ra = (string.find (defs, "r") ~= nil)
sipqueue()
-- What color to echo health/mana/ego values as, the %'s
-- aren't exact to lusty, lusty used 33%, 66% i think
-- instead of 25%, 75%
if hp.cur > .70 * hp.max then
hp.col = "green"
elseif hp.cur > .25 * hp.max then
hp.col = "gold"
elseif hp.cur > 0 * hp.max then
hp.col = "red"
else
hp.col = "silver"
end
if mp.cur > .70 * mp.max then
mp.col = "green"
elseif mp.cur > .25 * mp.max then
mp.col = "gold"
elseif mp.cur > 0 * mp.max then
mp.col = "red"
else
mp.col = "silver"
end
if ep.cur > .70 * ep.max then
ep.col = "green"
elseif ep.cur > .25 * ep.max then
ep.col = "gold"
elseif ep.cur > 0 * ep.max then
ep.col = "red"
else
ep.col = "silver"
end
if pp.cur > 7 then
pp.col = "green"
elseif pp.cur > 2 then
pp.col = "gold"
elseif pp.cur > 0 then
pp.col = "red"
else
pp.col = "silver"
end
hp.per = math.floor (100 * ( hp.cur / hp.max ))
mp.per = math.floor (100 * ( mp.cur / mp.max ))
ep.per = math.floor (100 * ( ep.cur / ep.max ))
ColourTell (hp.col, color.bg, hp.cur)
ColourTell ("silver", color.bg, "(")
ColourTell (hp.col, color.bg, hp.per)
ColourTell ("silver", color.bg, ")")
ColourTell (hp.col, color.bg, "h, ")
ColourTell (mp.col, color.bg, mp.cur)
ColourTell ("silver", color.bg, "(")
ColourTell (mp.col, color.bg, mp.per)
ColourTell ("silver", color.bg, ")")
ColourTell (mp.col, color.bg, "m, ")
ColourTell (ep.col, color.bg, ep.cur)
ColourTell ("silver", color.bg, "(")
ColourTell (ep.col, color.bg, ep.per)
ColourTell ("silver", color.bg, ")")
ColourTell (ep.col, color.bg, "e, ")
ColourTell (pp.col, color.bg, pp.cur .. "p ")
ColourTell ("silver", color.bg, defs .. "-")
-- Computing differences and echoing based on whether it's
-- gain or loss
if hp.cur ~= hp.prev then
hp.diff = hp.cur - hp.prev
if hp.diff > 0 then
ColourTell ("coral", color.bg, "[")
ColourTell ("limegreen", color.bg, "+" .. hp.diff .. "h")
ColourTell ("coral", color.bg, "]")
elseif hp.diff < 0 then
ColourTell ("coral", color.bg, "[")
ColourTell ("red", color.bg, hp.diff .. "h")
ColourTell ("coral", color.bg, "]")
end
end
if mp.cur ~= mp.prev then
mp.diff = mp.cur - mp.prev
if mp.diff > 0 then
ColourTell ("steelblue", color.bg, "[")
ColourTell ("limegreen", color.bg, "+" .. mp.diff .. "m")
ColourTell ("steelblue", color.bg, "]")
elseif mp.diff < 0 then
ColourTell ("steelblue", color.bg, "[")
ColourTell ("red", color.bg, mp.diff .. "m")
ColourTell ("steelblue", color.bg, "]")
end
end
if ep.cur ~= ep.prev then
ep.diff = ep.cur - ep.prev
if ep.diff > 0 then
ColourTell ("lightgreen", color.bg, "[")
ColourTell ("limegreen", color.bg, "+" .. ep.diff .. "e")
ColourTell ("lightgreen", color.bg, "]")
elseif ep.diff < 0 then
ColourTell ("lightgreen", color.bg, "[")
ColourTell ("red", color.bg, ep.diff .. "e")
ColourTell ("lightgreen", color.bg, "]")
end
end
if pp.cur ~= pp.prev then
pp.diff = pp.cur - pp.prev
if pp.diff > 0 then
ColourTell ("violet", color.bg, "[")
ColourTell ("limegreen", color.bg, "+" .. pp.diff .. "p")
ColourTell ("violet", color.bg, "]")
elseif pp.diff < 0 then
ColourTell ("violet", color.bg, "[")
ColourTell ("red", color.bg, pp.diff .. "p")
ColourTell ("violet", color.bg, "]")
end
end
Note ("")
-- Hp: Coral
-- Mp: Steelblue
-- Ep: lightgreen
-- Pp: violet
end
Quote: Luciden raises a palm which glows with a tiny pinpoint of light. The light turns into a sparkling
current of energy that slams into you, dissolving your flesh.
2426(64)h, 3537(97)m, 3396(106)e, 10p elrx-[-707h]
You take a drink from a beryl vial.
The potion heals and soothes you.
3058(81)h, 3537(97)m, 3396(106)e, 10p elrx-[+632h]
On my achaean system, I use a timestamp, but it's just a second counter that I use for timing things. [16.05t] etc, it goes up to 60 then resets to 0
Sorry if this doesn't help at all |