# 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 ################################################# # 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 # 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 # Rest rest_wait_both = true rest_wait_percent = 90 # Combat autofight_warning = 80 autofight_stop = 75 fire_order = launcher, throwing, inscribed ### 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 feat = view.feature_at(0, 0) local on_stairs = feat:find("stair") or feat:find("enter") or feat:find("exit") or feat:find("transit") if not on_stairs then if updown_command == "CMD_GO_UPSTAIRS" then crawl.process_keys("<") elseif updown_command == "CMD_GO_DOWNSTAIRS" then crawl.process_keys(">") end return false end -- Prompt about immediate reuse of stairs to prevent fat-fingering if you.turns() == post_safer_stairs_turn then if not crawl.yesno("Are you sure you want to reuse the stairs right away?", false, "N") then return false end end local warn = false local prompt = "You are" -- Build prompt for if slowed if you.slowed() and not you.hasted() then warn = true if you.poisoned() then prompt = prompt .. " SLOWED and" else prompt = prompt .. " SLOWED" end end -- Build prompt for if poisoned if you.poisoned() then warn = true local poison_survival = you.poison_survival() if poison_survival <= 0 then prompt = prompt .. " LETHALLY POISONED (HP: ".. you.hp() .." -> ".. poison_survival ..")" else prompt = prompt .. " POISONED (HP: ".. you.hp() .." -> ".. poison_survival ..")" end end -- Present slowed/poisoned prompt if warn then crawl.mpr(prompt ..".", "prompt") if not crawl.yesno("Continue to take the stairs anyway?", false, "N") then return false end end -- Actually try the stairs begin_safer_move() begin_safer_stairs() crawl.do_commands({updown_command}) 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() 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 }