default_manual_training = true travel_open_doors = false { if you.god()=="Jiyva" or you.god()=="Yredelemnul" then explore_auto_rest = false else explore_auto_rest = true end } autofight_stop = 70 rest_wait_percent = 100 travel_delay = -1 explore_delay = 1 dump_order += action_counts,turns_by_place dump_message_count = 100 show_more = false --Ignorable things msc := message_colour --General Adventuring msc += mute:There is an open door here msc += mute:You (open|reach down and open) the door. msc += mute:You feel sick --Combat msc += mute:You headbutt.* msc ^= mute:your headbutt misses .* msc += mute:you block .* msc += blue:You riposte. msc += mute:You furiously retaliate. msc += mute:You kick the .* msc += mute:You bite the .* msc += mute:Lightning courses through the.* --Boring Gods msc += blue:Cheibriados appreciates the change of pace. msc += blue:Cheibriados thoroughly appreciates the change of pace. msc ^= blue:Okawaru is honoured by your kill msc += mute:accepts your kill --Spells with too much info msc += mute:The zombie hands constrict .* msc += mute:Zombie hands grab the .* msc += mute:Decaying hands burst forth from the earth. msc += mute:Your fire vortex resists. --Equipment no one wants msc += mute:(You see here|Found) .* stone(|s). msc += mute:(You see here|Found) .* arrow(|s). msc += mute:(You see here|Found) .* bolt(|s). msc += mute:(You see here|Found) a club. --Things that should make you pause more := force_more_message more += distortion --more += holy wrath more += suddenly seem different more += Your body becomes as fragile more += strangely unstable more += ((floating|shining) eye|dream sheep|death drake).*into view more += (wretched star|apocalypse crab|death drake).*into view more += (entropy weaver|torpor snail|spriggan druid).*into view more += (vault (warden|sentinel)|merfolk (avatar|siren)).*into view more += (guardian serpent|draconian shifter|convoker|death cob).*into view more += (phantasmal warrior|air elemental).*into view more += (cacodemon|neqoxec).*into view more += (orc sorcerer|(?" .. msg .. "") end end function swap_for_autoexplore() local w = items.equipped_at("Weapon") if w and string.find(w.inscription, "auto") then return nil elseif w and string.find(w.inscription, "manual") then for i, j in ipairs(items.inventory()) do if string.find(j.inscription, "autoexplore") then return items.index_to_letter(j.slot) end end return nil end return nil end function custom_autoexplore() if not you.feel_safe() then crawl.mpr("But you're not safe!") return end if string.find(you.status(), "On berserk cooldown") then crawl.mpr("Cooling down") crawl.sendkeys("5") return end if you.slowed() then crawl.mpr("Speeding up") crawl.sendkeys("5") return end local action = "" local swap = swap_for_autoexplore() if swap then action = "w" .. swap end crawl.sendkeys(action .. "o") end function custom_rest() if not you.feel_safe() then crawl.mpr("But you're not safe!") return end local swap = swap_for_autoexplore() if swap then action = "w" .. swap end crawl.sendkeys(action) crawl.sendkeys("5") end } macros += M o ===custom_autoexplore macros += M 5 ===custom_rest { function table_has(table, match) for index, value in ipairs(table) do if value == match then return true end end return false end local is_gnoll = table_has({"Gnoll"}, you.race()) local need_skills_opened = not is_gnoll local function start_open_skills() if you.turns() == 0 and need_skills_opened then need_skills_opened = false crawl.sendkeys("m") end end start_open_skills() local want_weapon = false local want_axe = false local want_bow = false local want_polearm = false local want_shield = false local want_body = false local function pickup_equipment(it, name) if it.is_useless then return end if it.god_gift then return true end local class = it.class(true) local name = it.name() if class == "armour" then local good_slots = {cloak="Cloak", helmet="Helmet", gloves="Gloves", boots="Boots"} st, _ = it.subtype() if good_slots[st] ~= nil then if good_slots[st] == "Gloves" and you.has_claws() > 2 then return end if it.artefact then return true end local cur = items.equipped_at(good_slots[st]) if cur == nil then return true end if name:find("scarf") and you.xl()<20 then return true end if cur.branded or cur.artefact then return end if it.branded then return true end elseif st == "body" and want_body then local cur = items.equipped_at("armour") if cur == nil then return end if have_gds == false and name:find("gold dragon scales") then have_gds = true return true end if you.xl() > 10 then if not it.artefact and not possible_brand(name) then return end end local aValue = cur.ac * 20 if cur.plus then aValue = aValue + cur.plus * 10 end local bValue = it.ac * 20 if it.plus then bValue = bValue + it.plus * 10 end if it.artefact then bValue = bValue + 120 end if possible_brand(name) then bValue = bValue + 20 end if bValue > aValue then return true end elseif st == "shield" and want_shield then if you.base_skill("Shields") > 14 and it.ac < 5 then return end if it.artefact then return true end local cur = items.equipped_at("Shield") if cur == nil then if you.xl()<14 then return true else return end end if it.ac >= cur.ac then if it.branded or possible_brand(name) then return true end end end elseif class == "weapon" and want_weapon then local cur = items.equipped_at("Weapon") if cur == nil then return end local aValue = cur.damage * 10 if cur.plus then aValue = aValue + cur.plus * 5 end if cur.hands == 2 and want_shield then aValue = aValue - 40 end if cur.ego() == "vampirism" then aValue = aValue + 75 end if cur.ego() == "flaming" or cur.ego() == "freezing" or cur.ego() == "electrocution" or cur.ego() == "chopping" then aValue = aValue + 35 end if cur.ego() == "venom" or cur.ego() == "draining" or cur.ego() == "protection" then aValue = aValue + 20 end local bValue = it.damage * 10 if it.plus then bValue = bValue + it.plus * 5 end if it.ego() == "vampirism" then bValue = bValue + 50 end if it.hands == 2 and want_shield then bValue = bValue - 40 end if it.ego() == "flaming" or it.ego() == "freezing" or it.ego() == "electrocution" or it.ego() == "chopping" then bValue = bValue + 35 end if it.ego() == "venom" or it.ego() == "draining" or it.ego() == "protection" then bValue = bValue + 20 end if it.artefact and not it.fully_identified then bValue = bValue + 100 end if possible_brand(name) then bValue = bValue + 75 end if name:find("enchant") then bValue = bValue + 15 end if it.weap_skill == "Axes" and want_axe then if you.xl() < 18 then if possible_brand(name) or it.ego() == "flaming" then return true end end if bValue > aValue then return true end elseif it.weap_skill == "Polearms" and want_polearm then if bValue > aValue then return true end elseif it.weap_skill == "Bows" and want_bow then if you.xl() < 18 then if name:find("runed") or name:find("glowing") or name:find("shiny") then return true end end local bValue = it.damage * 10 if it.plus then bValue = bValue + it.plus * 3 end if it.ego() == "flaming" or it.ego() == "freezing" then bValue = bValue + 20 end if it.artefact and not it.fully_identified then bValue = bValue + 100 end if name:find("runed") or name:find("glowing") or name:find("shiny") then bValue = bValue + 50 end if bValue > aValue then return true end end end return end add_autopickup_func(pickup_equipment) function possible_brand(name) if name:find("runed") or name:find("glowing") or name:find("dyed") or name:find("embroidered") or name:find("shiny") then return true end return end } ae := autopickup_exceptions ae +=