function prompt() --Draws the prompt in all its prettiness.
local time_ms = GetInfo(232)
local powerfract = ( tonumber(core.power)/ tonumber(GetVariable("vitals_maxpow")) )
local flagcolour = "yellow" --Just colours the flags based on balance status.
if not (balances.onbal) or (affs.prone) then
flagcolour = "silver"
end
ColourTell("silver", "", "[")
Hyperlink("time_stamp_difference "..time_ms, string.format("%0.2f", time_ms), "Click to get difference.", "lightslategray", "", 0)
ColourTell("silver", "", "|")
if not affs.get("recklessness") then
ColourTell(colourfract(core.hpfract), "", string.format("%d", (core.hpfract * 100)).."%h")
ColourTell("silver", "", "|")
ColourTell(colourfract(core.mpfract), "", string.format("%d", (core.mpfract * 100)).."%m")
ColourTell("silver", "", "|")
ColourTell(colourfract(core.epfract), "", string.format("%d", (core.epfract * 100)).."%e")
ColourTell("silver", "", "|")
ColourTell(colourfract(powerfract), "", core.power.."p")
else
ColourTell("chartreuse", "", "Reckless")
end
ColourTell("silver", "", "|")
ColourTell(colourfract(core.enfract), "", string.format("%d", (core.enfract * 100)).."%en")
ColourTell("silver", "", "|")
ColourTell(colourfract(core.wpfract), "", string.format("%d", (core.wpfract * 100)).."%w")
ColourTell("silver", "", "] ")
ColourTell(flagcolour, "", events.prompt_flags.."- ")
if core.is_paused() then
ColourTell("darkred", "", "(", "crimson", "", "psd", "darkred", "", ")" )
end
if affs.get("stunned") then
ColourTell("goldenrod", "", "(", "gold", "", "stn", "goldenrod", "", ")" )
end
if affs.get("asleep") then
ColourTell("royalblue", "", "(", "cornflowerblue", "", "slp", "royalblue", "", ")" )
end
if affs.slow() then
local c = "slateblue"
if events.tvars["slow_block"] then
c = "plum"
end
ColourTell("darkslateblue", "", "(", c, "", "slow", "darkslateblue", "", ")" )
end
if affs.get("jinx") then
ColourTell("darkorange", "", "(", "orange", "", "jinx", "darkorange", "", ")" )
end
if #mapper.autowalking > 0 then
ColourTell("darkgray", "", "(", "silver", "", "moving - "..mapper.autowalking[1], "darkgray", "", ")" )
elseif events.tvars["autowalk_arrived"] then
events.tvar_clear("autowalk_arrived")
ColourTell("darkgray", "", "(", "silver", "", "arrived", "darkgray", "", ")" )
end
point_changes()
end