# Keybinds ###################################### # Remap , and . on level-map to do the same as < and > rather than goto selection bindkey = [,] CMD_MAP_FIND_UPSTAIR bindkey = [.] CMD_MAP_FIND_DOWNSTAIR # Make ; cycle exclusions rather than goto selection bindkey = [;] CMD_MAP_EXCLUDE_AREA # Remove goto selection from S bindkey = [S] CMD_MAP_HELP # Disable hjkl movement include = no_vi_command_keys.txt # Disable number-row movement (keep 5 for resting) bindkey = [1] CMD_NO_CMD_DEFAULT bindkey = [2] CMD_NO_CMD_DEFAULT bindkey = [3] CMD_NO_CMD_DEFAULT bindkey = [4] CMD_NO_CMD_DEFAULT bindkey = [6] CMD_NO_CMD_DEFAULT bindkey = [7] CMD_NO_CMD_DEFAULT bindkey = [8] CMD_NO_CMD_DEFAULT bindkey = [9] CMD_NO_CMD_DEFAULT # Numpad Move #bindkey = [NP4] CMD_MOVE_LEFT #bindkey = [NP2] CMD_MOVE_DOWN #bindkey = [NP8] CMD_MOVE_UP #bindkey = [NP6] CMD_MOVE_RIGHT #bindkey = [NP7] CMD_MOVE_UP_LEFT #bindkey = [NP9] CMD_MOVE_UP_RIGHT #bindkey = [NP1] CMD_MOVE_DOWN_LEFT #bindkey = [NP3] CMD_MOVE_DOWN_RIGHT #bindkey = [\{-1004}] CMD_MOVE_LEFT #bindkey = [\{-1002}] CMD_MOVE_DOWN #bindkey = [\{-1008}] CMD_MOVE_UP #bindkey = [\{-1006}] CMD_MOVE_RIGHT #bindkey = [\{-1007}] CMD_MOVE_UP_LEFT #bindkey = [\{-1009}] CMD_MOVE_UP_RIGHT #bindkey = [\{-1001}] CMD_MOVE_DOWN_LEFT #bindkey = [\{-1003}] CMD_MOVE_DOWN_RIGHT ## Shift Numpad Safe-Move (AHK-Disabled Numpad Hotkeys) bindkey = [\{-241}] CMD_SAFE_MOVE_LEFT bindkey = [\{-242}] CMD_SAFE_MOVE_DOWN bindkey = [\{-243}] CMD_SAFE_MOVE_UP bindkey = [\{-240}] CMD_SAFE_MOVE_RIGHT bindkey = [\{-238}] CMD_SAFE_MOVE_UP_LEFT bindkey = [\{-235}] CMD_SAFE_MOVE_UP_RIGHT bindkey = [\{-237}] CMD_SAFE_MOVE_DOWN_LEFT bindkey = [\{-234}] CMD_SAFE_MOVE_DOWN_RIGHT # Num5 and Shift-Num5 bindkey = [\{-1005}] CMD_TARGET_SELECT bindkey = [\{-1005}] CMD_WAIT bindkey = [\{-236}] CMD_SAFE_WAIT # Num. (Webtiles) bindkey = [\{-1019}] CMD_TARGET_SELECT_ENDPOINT bindkey = [\{-1019}] CMD_WAIT # Num. and Shift-Num. (Local) bindkey = [\{-255}] CMD_TARGET_SELECT_ENDPOINT bindkey = [\{-255}] CMD_WAIT bindkey = [\{1001}] CMD_WAIT ## Shift Numpad-Move (Numlock On) #bindkey = [\{-252}] CMD_SAFE_MOVE_LEFT #bindkey = [\{-253}] CMD_SAFE_MOVE_DOWN #bindkey = [\{-254}] CMD_SAFE_MOVE_UP #bindkey = [\{-251}] CMD_SAFE_MOVE_RIGHT #bindkey = [\{-249}] CMD_SAFE_MOVE_UP_LEFT #bindkey = [\{-246}] CMD_SAFE_MOVE_UP_RIGHT #bindkey = [\{-248}] CMD_SAFE_MOVE_DOWN_LEFT #bindkey = [\{-245}] CMD_SAFE_MOVE_DOWN_RIGHT ## Shift Numpad Safe-Move (Numlock Off) #bindkey = [\{-241}] CMD_SAFE_MOVE_LEFT #bindkey = [\{-242}] CMD_SAFE_MOVE_DOWN #bindkey = [\{-243}] CMD_SAFE_MOVE_UP #bindkey = [\{-240}] CMD_SAFE_MOVE_RIGHT #bindkey = [\{-238}] CMD_SAFE_MOVE_UP_LEFT #bindkey = [\{-235}] CMD_SAFE_MOVE_UP_RIGHT #bindkey = [\{-237}] CMD_SAFE_MOVE_DOWN_LEFT #bindkey = [\{-234}] CMD_SAFE_MOVE_DOWN_RIGHT # Quick exit from MAP screen with Y/N for faster prompt answers #bindkey = [Y] CMD_MAP_EXIT_MAP #bindkey = [N] CMD_MAP_EXIT_MAP ################################################# # Speed travel_delay = -1 explore_delay = -1 rest_delay = -1 show_travel_trail = true tile_key_repeat_delay = 80 # Aliases more := force_more_message flash := flash_screen_message stop := runrest_stop_message # Disable unnecessary *more* messages show_more = false # Don't hide UI elements in map mode tile_level_map_hide_messages = false tile_level_map_hide_sidebar = false # Disable pop-up dialog prompts #prompt_menu = false # Training default_manual_training = true # Autoexplore #travel_avoid_terrain = shallow water,deep water explore_stop = stairs,shops,altars,portals,branches,runed_doors explore_stop += greedy_pickup_smart,artefacts,runes #explore_wall_bias = 1 explore_auto_rest = true travel_open_doors = approach # Rest rest_wait_both = true rest_wait_percent = 90 # Combat autofight_warning = 80 autofight_stop = 75 fire_order = launcher, throwing, inscribed # Time always_show_gems = true more_gem_info = true ### AUTOPICKUP ################################################################ # Default Categories, Note: ( == missiles autopickup = $?!:"/}| # Inclusions autopickup_exceptions = useless_item autopickup_exceptions += >dangerous_item #autopickup_exceptions += >forbidden autopickup_exceptions += >staff of # Final Inclusions autopickup_exceptions += trying_safer_move_turn then post_safer_move_turn = you.turns() end trying_safer_move = false end end -- SAFE STAIRS SUCCESS DETECTION ------------------------------------ local trying_safer_stairs = false local trying_safer_stairs_turn = -1 local post_safer_stairs_turn = -1 local function begin_safer_stairs() trying_safer_stairs = true trying_safer_stairs_turn = you.turns() end local function end_safer_stairs() if trying_safer_stairs then if you.turns() > trying_safer_stairs_turn then post_safer_stairs_turn = you.turns() end trying_safer_stairs = false end end -- Force more on becoming unsafe unless safer movement used local was_safe = false local function handle_safety_changes() local safe = you.feel_safe() if safe ~= was_safe then local safer_move_used_last = post_safer_move_turn == you.turns() if not safe and not safer_move_used_last then crawl.mpr("Danger!", "prompt") crawl.more() end was_safe = safe end end -- SAFE STAIRS ------------------------------------------------------ -- Prompts if slowed/poisoned or on immediate reuse. local function safer_stairs(updown_command) local peek = true local feat = view.feature_at(0, 0) -- Validate input command local on_stairs = (feat:find("stair") or feat:find("enter") or feat:find("exit") or feat:find("transit") or feat:find("hatch")) and not feat:find("shop") if not on_stairs then -- Invalid movement. Go ahead and do the command to display the default error. crawl.do_commands({updown_command}) return false elseif (feat:find("stairs_down") or feat:find("enter") or feat:find("abyssal_stair") or feat:find("hatch_down")) and updown_command ~= "CMD_GO_DOWNSTAIRS" then crawl.mpr("You can't go up here!") return false elseif (feat:find("stairs_up") or feat:find("exit") or feat:find("hatch_up")) and updown_command ~= "CMD_GO_UPSTAIRS" then crawl.mpr("You can't go down here!") return false end -- Don't try to peek through abyss/pan portals if feat:find("enter_abyss") or feat:find("exit_abyss") or feat:find("abyssal_stair") or feat:find("enter_pan") or feat:find("exit_pan") or feat:find("transit") then peek = false end local warn_status = false local status_msg = "" -- Build status_msg for if slowed if you.slowed() and not you.hasted() then warn_status = true if you.poisoned() then status_msg = status_msg .. " ################### SLOWED ###################\n and" else status_msg = status_msg .. " ################### SLOWED ###################" end end -- Build status_msg for if poisoned if you.poisoned() then warn_status = true local poison_survival = you.poison_survival() if poison_survival <= 0 then status_msg = status_msg .. " ################### LETHALLY POISONED (HP: ".. you.hp() .." -> ".. poison_survival ..") ###################" else status_msg = status_msg .. " ################### POISONED (HP: ".. you.hp() .." -> ".. poison_survival ..") ###################" end end if warn_status then status_msg = "You are" .. status_msg .. ".\n" end -- Prompt about immediate reuse of stairs to prevent fat-fingering, including status effect warnings --if you.turns() == post_safer_stairs_turn then -- if crawl.yesno(status_msg .. "Are you sure you want to reuse the stairs right away?", false, "N") then -- begin_safer_move() -- begin_safer_stairs() -- crawl.do_commands({updown_command}) -- return true -- else -- return false -- end --end local prompt_msg = status_msg .. "Are you sure you want to take the stairs?" if peek then crawl.mpr("**** Peeking ****") end -- Print an early prompt question so that it shows during map-peek, including status effect warnings crawl.mpr(prompt_msg, "prompt") if peek then -- Peek into the next level using map if updown_command == "CMD_GO_UPSTAIRS" then crawl.do_commands({"CMD_DISPLAY_MAP", "CMD_MAP_PREV_LEVEL"}) elseif updown_command == "CMD_GO_DOWNSTAIRS" then crawl.do_commands({"CMD_DISPLAY_MAP", "CMD_MAP_NEXT_LEVEL"}) end end -- Present the real yes/no prompt if not crawl.yesno(prompt_msg, false, "N") then return false end -- Actually try the stairs begin_safer_move() begin_safer_stairs() crawl.do_commands({updown_command}) return true end -- SAFE MOVEMENT FUNCTIONS (MAP IN-GAME VIA MACROS) ----------------- function safer_go_upstairs() safer_stairs("CMD_GO_UPSTAIRS") end function safer_go_downstairs() safer_stairs("CMD_GO_DOWNSTAIRS") end function safer_move_left() begin_safer_move() crawl.do_commands({"CMD_SAFE_MOVE_LEFT"}) end function safer_move_down() begin_safer_move() crawl.do_commands({"CMD_SAFE_MOVE_DOWN"}) end function safer_move_up() begin_safer_move() crawl.do_commands({"CMD_SAFE_MOVE_UP"}) end function safer_move_right() begin_safer_move() crawl.do_commands({"CMD_SAFE_MOVE_RIGHT"}) end function safer_move_up_left() begin_safer_move() crawl.do_commands({"CMD_SAFE_MOVE_UP_LEFT"}) end function safer_move_down_left() begin_safer_move() crawl.do_commands({"CMD_SAFE_MOVE_DOWN_LEFT"}) end function safer_move_up_right() begin_safer_move() crawl.do_commands({"CMD_SAFE_MOVE_UP_RIGHT"}) end function safer_move_down_right() begin_safer_move() crawl.do_commands({"CMD_SAFE_MOVE_DOWN_RIGHT"}) end function safer_explore() begin_safer_move() crawl.do_commands({"CMD_EXPLORE"}) end -- HOOKS ------------------------------------------------------------ function ready() end_safer_stairs() end_safer_move() -- handle_safety_changes() exclude_runed_doors() --crawl.mpr(view.feature_at(0, 0)) end function ch_stop_running(kind) if kind ~= "" then exclude_runed_doors() end end function c_answer_prompt(prompt) if prompt:find("place you under penance") then return end -- if prompt:find("Really fire in your") and prompt:find("direction") then -- return true -- end -- if prompt:find("Really") and prompt:find("near your") then -- return true -- end -- if prompt:find("might hit your") and prompt:find("Cast it anyway?") then -- return true -- end -- if prompt:find("Really fire at your") then -- return true -- end end }