# TEAMCAPTAIN zkyp rest_wait_both = true sort_menus = true : equipped, identified, basename, qualname, curse, qty default_manual_training = true show_more = false allow_self_target = no tile_map_pixels = 3 view_delay = 0 autofight_stop = 50 automagic_enable = true automagic_slot = x autofight_throw_nomove = false confirm_butcher = never easy_eat_chunks = true auto_eat_chunks = true auto_drop_chunks = true auto_sacrifice = before_explore autopickup = $?!+"/%|\} autopickup_exceptions += estimate_ac(current) then return true end elseif is_special(item) and not inscription_no_ego(current) then return true end end elseif subtype == "shield" then if current ~= nil and base_ac(item) >= base_ac(current) then if base_ac(item) > base_ac(current) then if inscription_no_upgrade(item) then return false end if same_ego(item, current) then return true elseif is_special(item) and not inscription_no_ego(current) then return true end else if same_ego(item, current) then if estimate_ac(item) > estimate_ac(current) then return true end elseif is_special(item) and not inscription_no_ego(current) then return true end end end else if estimate_ac(item) >= 0 or is_special(item) then if current == nil then return true end if same_ego(item, current) then if estimate_ac(item) > estimate_ac(current) then return true end if estimate_ac(item) == estimate_ac(current) and base_ac(item) > base_ac(current) then return true end elseif is_special(item) and not inscription_no_ego(current) then return true end end end end if class == "weapon" then local match_found = false local upgrade_found = false local no_upgrade = false local upgrade_from, upgrade_to = upgrade_list_for_weapon(name) for inv in inventory() do if class == inv.class(true) then if name == basename(inv) then match_found = true no_upgrade = true if inscription_no_ego(inv) then return false end if is_special(item) then if same_ego(item, inv) and plus_or_0(inv) >= plus_or_0(item) then return false end elseif is_special(inv) or plus_or_0(inv) >= plus_or_0(item) then return false end elseif upgrade_to[basename(inv)] then no_upgrade = true elseif upgrade_from[basename(inv)] and (not is_twohanded(item) or is_twohanded(inv)) then upgrade_found = true if not is_upgradable(inv) then no_upgrade = true end end end end return match_found or (upgrade_found and not no_upgrade) end end add_autopickup_func(autopickup) function c_assign_invletter() need_inventory_check = true end function ready() if not initialized then crawl.more_autoclear(true) initialize() crawl.more_autoclear(false) initialized = true else if need_inventory_check then check_inventory() end end end chk_lua_option.autopickup_artefacts = set_artefacts chk_lua_option.autopickup_blowgun = set_blowgun chk_lua_option.autopickup_buckler = set_buckler chk_lua_option.autopickup_upgrade_weapon = set_upgrade_weapon if options.autopickup_artefacts ~= nil then set_artefacts(nil, options.autopickup_artefacts, nil); end if options.autopickup_blowgun ~= nil then set_blowgun(nil, options.autopickup_blowgun, nil); end if options.autopickup_buckler ~= nil then set_buckler(nil, options.autopickup_buckler, nil); end if options.autopickup_upgrade_weapon ~= nil then set_upgrade_weapon(nil, options.autopickup_upgrade_weapon, nil); end twohanded_weapon_list = Set(twohanded_weapon_list) spriggan_onehanded_weapon_list = Set(spriggan_onehanded_weapon_list) body_armour_data = parse_body_armour_data() function write_bool_table(table, aname) local res = aname .. " = { " for k, v in pairs(table) do res = res .. k .. '=' .. tostring(v) .. ", " end return res .. "}\n" end function autopickup_save() return write_bool_table(autopickup_found, "autopickup_found") end table.insert(chk_lua_save, autopickup_save) }