default_manual_training=true auto_eat_chunks=true auto_sacrifice=true ################################# ###### rest before explore ###### rest_wait_both = true < function should_rest() local hp, mhp = you.hp() local mp, mmp = you.mp() return ((5*hp < 4*mhp and you.race() ~= "Deep Dwarf") or 5*mp < 4*mmp or you.confused() or you.slowed() or you.berserk() or you.teleporting() or you.silencing()) end function rest_then_explore() if should_rest() then crawl.sendkeys('5') coroutine.yield(true) end if not should_rest() then crawl.sendkeys('o') coroutine.yield(true) end end > ################################# ########## autobutcher ########## < function can_eat_chunks() if you.race()=="Spriggan" then return end if you.gourmand() or you.race()=="Kobold" or you.race()=="Felid" or you.race()=="Ghoul" then return you.hunger()<6 end return you.hunger()<4 end function edible_corpse(item) if not can_eat_chunks() then return end --if food.rotting(item) and not you.saprovorous() then return end if food.dangerous(item) then return end return string.find(item.name(),"corpse") end function over_corpse() for item_under_you in iter.invent_iterator:new(you.floor_items()) do if string.find(item_under_you.name(),"corpse") then return true end end end function over_edible_corpse() for item_under_you in iter.invent_iterator:new(you.floor_items()) do if edible_corpse(item_under_you) then return true end end end function walk_over_edible_corpses(item) return edible_corpse(item) and not over_edible_corpse() end function ready() if not default_options then default_options=options.runrest_stop_message crawl.setopt("confirm_butcher=never") crawl.setopt("auto_eat_chunks=true") end if can_eat_chunks() then crawl.setopt("runrest_stop_message+=corpse") else crawl.setopt("runrest_stop_message="..default_options) end if you.feel_safe() and over_edible_corpse() then crawl.sendkeys("c") crawl.process_command() end end add_autopickup_func(walk_over_edible_corpses) > ################################# ######## fight or explore ####### < function fight_or_explore() if not you.feel_safe() then hit_closest() else rest_then_explore() end end