# TEAMCAPTAIN LAKREN
# this rc is based off of simm's!! thank you
# color.DARKGRAY = BLUE
{
local dmg_old_hp = 0
function DmgTrack()
local bot_hp, bot_mhp = you.hp()
local dmg_inturn = 0
local huge_int = 0
local percent_hp = 0
local percent_old_hp = 0
local percent_hp_txt = "--%"
if dmg_old_hp > 0 then
if bot_hp < dmg_old_hp then
dmg_inturn = dmg_old_hp - bot_hp
percent_old_hp = math.ceil((dmg_old_hp*100)/bot_mhp)
percent_hp = math.ceil((bot_hp*100)/bot_mhp)
percent_hp_txt = percent_hp .. "%"
if percent_hp < 30 then
percent_hp_txt = "" .. percent_hp_txt .. ""
elseif percent_hp < 55 then
percent_hp_txt = "" .. percent_hp_txt .. ""
elseif percent_hp < 75 then
percent_hp_txt = "" .. percent_hp_txt .. ""
end
percent_hp_txt = percent_hp_txt .. "(" .. bot_hp
.. "hp)"
if dmg_inturn > (bot_hp*0.25) then
huge_dmg_note(dmg_inturn)
crawl.mpr("Huge Dmg: -" ..
(percent_old_hp-percent_hp) .. "%(-" .. dmg_inturn ..
"hp)" .. " hp: " .. percent_hp_txt)
dmg_old_hp = bot_hp
crawl.flush_prev_message()
crawl.more()
crawl.more_autoclear(true)
else
if dmg_inturn > (bot_hp*0.15) then
crawl.mpr("Damage: -" ..
(percent_old_hp-percent_hp).."%(-" .. dmg_inturn ..
"hp)" .. " hp: " .. percent_hp_txt)
else
crawl.mpr("Damage: -".. (percent_old_hp-percent_hp)
.. "%(-" .. dmg_inturn .. "hp)" ..
" hp: " .. percent_hp_txt)
end
end
crawl.flush_prev_message()
end
end
dmg_old_hp = bot_hp
end
function huge_dmg_note(x)
crawl.take_note("Huge Dmg: " .. x .. " dmg")
end
function paranoid_rest() -- macro '5' to this
local hp, mhp = you.hp()
local mp, mmp = you.mp()
local can_heal = hp < mhp and you.race() ~= 'Deep Dwarf'
if can_heal or mp < mmp or you.confused() or you.slowed() or you.exhausted()
or you.teleporting() or you.anchored() or you.rooted() or you.poisoned()
or you.on_fire() or you.petrifying() or you.silencing() or
you.breath_timeout() or you.contaminated() > 0 or not you.feel_safe()
or crawl.yesno('Really rest?', false, 'n') then
crawl.sendkeys('5')
end
end
function search() -- macro '\{6}' (Ctrl-F) to this
local ctrlf = string.char(6)
local enter = string.char(13)
local esc = string.char(27)
local shortcuts = {
'armour', 'book', 'manual', 'altar', 'ego', 'dropped',
'blowgun|needle', 'cure mut|res.*abil', 'scroll.*ench',
'@corpse$&&!!rot|skel', 'artifact',
'short bl', 'long bl', 'axe', 'mace', 'polearm', 'stave',
'\\bbow', 'crossbow', 'throwable',
'rF\\+|ring.*fire', 'rC\\+|ring.*(cold|ice)',
'rPois|poison res', 'MR\\+|from magic',
'rCorr|resist corr', 'rMut|resist mut'
}--
local function print_header()
local function hilite(line)
return '' ..
line:gsub('(%w)=', '%1=') .. ''
end
crawl.clear_messages(true)
local line = ''
local sep = ' '
for i = 1, 26 do
local k = string.char(64 + i)