----------------------------------------------------------------------------------------------webtiles
--WIP rc file, no promises
function utf8char(unicode)
-- mostly cited from https://github.com/Stepets/utf8.lua/blob/master/utf8.lua
if unicode <= 0x7F then return string.char(unicode) end
if (unicode <= 0x7FF) then
local Byte0 = 0xC0 + math.floor(unicode / 0x40);
local Byte1 = 0x80 + (unicode % 0x40);
return string.char(Byte0, Byte1);
end;
if (unicode <= 0xFFFF) then
local Byte0 = 0xE0 + math.floor(unicode / 0x1000);
local Byte1 = 0x80 + (math.floor(unicode / 0x40) % 0x40);
local Byte2 = 0x80 + (unicode % 0x40);
return string.char(Byte0, Byte1, Byte2);
end;
if (unicode <= 0x10FFFF) then
local code = unicode
local Byte3= 0x80 + (code % 0x40);
code = math.floor(code / 0x40)
local Byte2= 0x80 + (code % 0x40);
code = math.floor(code / 0x40)
local Byte1= 0x80 + (code % 0x40);
code = math.floor(code / 0x40)
local Byte0= 0xF0 + code;
return string.char(Byte0, Byte1, Byte2, Byte3);
end;
error 'Unicode cannot be greater than U+10FFFF!'
end
--echoall(crawl.getch())
--crawl.more()
local dummy_keys_made=0
function get_command(cmd)
--returns key combo of cmd, ready to be plugged into sendkeys
--makes dummy keys from U+10FFFF downward if it can't get the keycode, or that keycode can't be send with sendkeys
--because sendkeys is less buggy than do_commands
local ok=true
local result=crawl.get_command(cmd)
result=result:gsub("Space",' ')
--theoretical To-Do: Reverse all special cases of keycode_to_name in https://github.com/crawl/crawl/blob/master/crawl-ref/source/macro.cc
--just add special cases in that line above as needed. Or accept adding dummy keys!
local modifier=""..(result:match("Ctrl.") and "\*" or "")..(result:match("Shift.") and "\/" or "")
if modifier=="\*\/" or modifier=="\/\*" then ok=false else
result=result:gsub("Ctrl.",""):gsub(".ppercase.",""):gsub("Shift.","")
--if result=="0" then
----crawl.setopt("bindkey [
--error 'error in rc function get_command, no bound key'
--end
--if result:match("Numpad") then result=result:gsub("Numpad ","100") end
if not(result==result:match("[%w%s%p]"))
and not pcall(function()
if #result==1 then
--pcall(function() result=utf8char(string.byte(result)) end)
result=utf8char(string.byte(result))
elseif result:match("%d") and not(result:match("F")) and not(result:match("%-")) then
result=utf8char(tonumber(result:match("%d+")))
else
ok=false
end
end)
then ok=false end
end
if not ok then --make a dummy key instead
local number=1114111-dummy_keys_made
dummy_keys_made=dummy_keys_made+1
crawl.setopt("bindkey=[\\{"..tostring(number).."}] "..cmd)
return utf8char(number)
else
return modifier..result
end
end
----------------------------------------------------------------------------------------------------------------
local r_td={}
--table of functions to call in ready()
--table.insert(r_td,functionname) to run functionname() once in ready
--r_td[functionname]=1 to run only once at most
--functionname may add itself to r_td to be run next time again
--r_td is empty by the time the function is run
function r_run_r_td()
if next(r_td) then
local td={}
for k in pairs(r_td) do
td[k]=r_td[k]
r_td[k]=nil
end
for k in pairs(td) do
if td[k]==1 then
k()
else
td[k]()
end
td[k]=nil
end
end
end
----------------------------------------------------------------------------------------------------------------
local cmsg_funcs={}
function cmsg_run_cmsg_funcs(msg, ch)
for k in pairs(cmsg_funcs) do
cmsg_funcs[k](msg, ch)
end
end
----------------------------------------------------------------------------------------------------------------
local move_careful = false --mostly you.feel_safe, true if manual exploring is expected and enforced to be "careful" with --more--
local reset_more_message_options = false
--initialised by c_persist
local autopickup_is_on = true
local td_start_deactivate_autopickup=true
local auto_wmm=true
local wmm_on = false
local monster_warning = false
function r_meta_move_careful()
--the only function actually called in ready(), to see the order here
--old functions
--r_tell_time()
--r_autopickup_is_on()
r_warnings()
r_is_autopickup_on()
r_chk_vis_invis()
r_move_careful()
r_warn_more_monsters()
r_monster_warning()
--r_reset_cmsg_sending()
end
function toggle_move_careful_on()
if auto_wmm and wmm_on then toggle_warn_more_monsters(true) end
move_careful = true
--crawl.setopt("force_more_message -= into view")
--crawl.setopt("force_more_message += You are feeling hungry")
crawl.setopt("bindkey = [j] CMD_SAFE_MOVE_LEFT")
crawl.setopt("bindkey = [,] CMD_SAFE_MOVE_DOWN")
crawl.setopt("bindkey = [i] CMD_SAFE_MOVE_UP")
crawl.setopt("bindkey = [l] CMD_SAFE_MOVE_RIGHT")
crawl.setopt("bindkey = [u] CMD_SAFE_MOVE_UP_LEFT")
crawl.setopt("bindkey = [o] CMD_SAFE_MOVE_UP_RIGHT")
crawl.setopt("bindkey = [m] CMD_SAFE_MOVE_DOWN_LEFT")
crawl.setopt("bindkey = [.] CMD_SAFE_MOVE_DOWN_RIGHT")
crawl.mpr("No danger in sight...")
end
function toggle_move_careful_off()
crawl.flush_input()
--if not(wmm_on) then crawl.more() end
if not(monster_warning) then
monster_warning = true
crawl.mpr("!")
crawl.more()
end
--if auto_wmm and wmm_on==false then toggle_warn_more_monsters(true) end --already done in next line
toggle_move_careful_off_noprompt()
end
function toggle_move_careful_off_noprompt()
if auto_wmm and wmm_on==false then toggle_warn_more_monsters(true) end
move_careful = false
--reset_more_message_options = true
crawl.setopt("bindkey = [j] CMD_MOVE_LEFT")
crawl.setopt("bindkey = [,] CMD_MOVE_DOWN")
crawl.setopt("bindkey = [i] CMD_MOVE_UP")
crawl.setopt("bindkey = [l] CMD_MOVE_RIGHT")
crawl.setopt("bindkey = [u] CMD_MOVE_UP_LEFT")
crawl.setopt("bindkey = [o] CMD_MOVE_UP_RIGHT")
crawl.setopt("bindkey = [m] CMD_MOVE_DOWN_LEFT")
crawl.setopt("bindkey = [.] CMD_MOVE_DOWN_RIGHT")
end
function r_move_careful()
--force more if danger starts
--move careful, aka explore manually. Also used to decide whether it is safe to equip things
if move_careful then
if (not(you.feel_safe()) or you.silenced()) then
toggle_move_careful_off() --this also sends a --more--
else
if not(autopickup_is_on) then
toggle_move_careful_off()
end
end
else
if (you.feel_safe() and not(you.silenced())) then
if autopickup_is_on then
toggle_move_careful_on()
else
crawl.mpr("AP is off.",4)
end
end
end
--
--if not(move_careful) and reset_more_message_options then --reset to default: Here used when there is danger
--reset_more_message_options = false
--if not(auto_wmm) then crawl.setopt("force_more_message += into view") end
--crawl.setopt("force_more_message -= You are feeling hungry")
--end
end
local td_deactivate_autopickup=0
function r_chk_vis_invis()
--react to "indirectly" visible invisible monster
if autopickup_is_on then
local detected=false
local LOS=you.los()
for x = -LOS,LOS do
for y = -LOS,LOS do
if view.invisible_monster(x,y) and view.cell_see_cell(0,0,x,y) then
crawl.mpr("There is something invisible around!")
deactivate_autopickup()
detected=true; break
end
end
if detected then break end
end
end
end
-------------------------------------------------------------------------------------------------------------
local td_check_deactivate_autopickup_successful=false
function deactivate_autopickup()
crawl.mpr("lua detected that AP should be OFF:")
--crawl.do_commands({"CMD_TOGGLE_AUTOPICKUP"})
crawl.sendkeys( get_command("CMD_TOGGLE_AUTOPICKUP") )
td_check_deactivate_autopickup_successful=true --let c_message check if you actually turned it off instead of on. Shouldn't happen, though.
td_deactivate_autopickup=0
if autopickup_is_on then autopickup_turns_off() end --c_message should get it anyway, this is precaution for bugs. Also, this happens sooner.
end
function r_is_autopickup_on()
if crawl.messages(1):match("Deactivating autopickup. reactivate with Ctrl.A") and autopickup_is_on then
autopickup_turns_off()
end --neccessary, because c_message can't get it if that was the most recent line
if td_deactivate_autopickup>1 then
td_deactivate_autopickup=td_deactivate_autopickup-1
else
if td_deactivate_autopickup==1 then
if autopickup_is_on then
deactivate_autopickup()
if not(move_careful) then
crawl.mpr("There is something invisible around!!")
crawl.more()
end
end
td_deactivate_autopickup=0
end end
end
local cmsg_sending = false
function cmsg_is_autopickup_on(msg) --goes in c_message(msg, ch)
--if not(msg:match("---")) then crawl.mpr("---"..msg) end
if crawl.messages(2):match("Deactivating autopickup. reactivate with Ctrl.A") then--doesn't call c_message
if autopickup_is_on then
autopickup_turns_off()
end
end
if msg:match(".utopickup is now off") then
if autopickup_is_on then
autopickup_turns_off()
end
if td_check_deactivate_autopickup_successful then
td_check_deactivate_autopickup_successful=false
end
elseif
msg:match(".utopickup is now on") or
msg:match("Reactivating autopickup") --does call c_message
then
if not(autopickup_is_on) then
autopickup_turns_on()
end
if td_check_deactivate_autopickup_successful then
if not(cmsg_sending) then
cmsg_sending=true
td_check_deactivate_autopickup_successful=false
crawl.mpr("Lua didn't get that autopickup is already on.")
deactivate_autopickup()
cmsg_sending = false
end
end
elseif
msg:match(".omething.?.?.?.?.?.?.?.?.?.?.?.?.?.?.?.? misses you%p") or
msg:match(".omething enters a") or
msg:match(".omething sets off the alarm") or
msg:match(".omething launches a net") or
msg:match("web moves frantically as something is caught in it") or
msg:match("ou feel you are being watched by something")
then
if autopickup_is_on then
--deactivate_autopickup() --cmsg shouldn't send commands if you can avoid it, let ready() handle it
td_deactivate_autopickup=1
--if not(move_careful) then
--crawl.mpr("There is something invisible around!!")
--crawl.more()
--end
end
end
end
--function r_reset_cmsg_sending()
--cmsg pauses and calls itself if it sends a message
--always check cmsg_sending and set cmsg_sending=true before sending something in cmsg
--actually, because it pauses you can just reset it immediately
--unused, this can be deleted
--cmsg_sending = false
--end
local wmm_noap_on = false
function autopickup_turns_off()--called in cmsg, stay silent
autopickup_is_on=false
if wmm_on==false then
toggle_warn_more_monsters(true)
else
toggle_warn_more_monsters(true)
toggle_warn_more_monsters(true)
end
--crawl.setopt("force_more_message -= into view")
end
function autopickup_turns_on()--called in cmsg, stay silent
autopickup_is_on=true
if not(auto_wmm) and wmm_on then toggle_warn_more_monsters(true) end
--if not(move_careful) and not(auto_wmm) then crawl.setopt("force_more_message += into view") end
end
-------------------------------------------------------------------------------------------------------------
local wmm_just_on = false
local wmm_count = 0
local wmm_list = {}
local r_wmm_list = {}
function toggle_warn_more_monsters(silent) --silent means called by ap turning off, or auto_wmm. state of silent is noted in wmm_noap_on, but that is unused otherwise.
--must be silent if called from cmsg!
if wmm_on then
wmm_on = false
for n, k in pairs(wmm_list) do
wmm_list[n] = nil
end
if not(silent) then crawl.mpr("warn_more_monsters off") end
wmm_noap_on=false
else
wmm_on = true
wmm_just_on = true
if not(silent) then
crawl.mpr("warn_more_monsters on")
else
wmm_noap_on=true
end
end
end
crawl.setopt("runrest_ignore_monster ^= fire vortex:2")
crawl.setopt("runrest_ignore_monster ^= spatial vortex:2")
function r_warn_more_monsters()
--crawl.mpr("ready"..tostring(wmm_on)..tostring(wmm_noap_on))
if wmm_on then
local w_monster = nil
local new_monsters = ""
local element
local LOS=you.los()
for x = -LOS,LOS do
for y = -LOS,LOS do
local w_monster_obj = monster.get_monster_at(x, y)
if
not( w_monster_obj==nil )
and not( ( w_monster_obj:is_safe()
--and w_monster_obj:is_stationary() ) )
) )
and not(w_monster_obj:attitude()>1)
and not(w_monster_obj:status():match("summoned"))
--and not(w_monster_obj:name():match("fire vortex"))
--and not(w_monster_obj:name():match("spatial vortex"))
and view.cell_see_cell(0,0,x,y)
then
w_monster = w_monster_obj:name()
wmm_count = 1
while is_in_wlist(w_monster,wmm_count,r_wmm_list) do
wmm_count = wmm_count + 1
--crawl.mpr(tostring(wmm_count))
end
r_wmm_list[w_monster] = wmm_count
--crawl.mpr(w_monster.."w"..tostring(wmm_count))
if not(is_in_wlist(w_monster,wmm_count,wmm_list)) then
wmm_list[w_monster] = wmm_count
--crawl.mpr(w_monster.." "..tostring(wmm_count))
--new_monsters = true
if not(new_monsters=="") then new_monsters = new_monsters..", " end
new_monsters = new_monsters..w_monster.." "..tostring(wmm_count)
end
end
end
end
if not(new_monsters=="") and not(wmm_just_on) then
crawl.mpr(new_monsters)
if not(monster_warning) then
monster_warning = true
crawl.more()
end
end
wmm_just_on = false
for n, k in pairs(r_wmm_list) do
r_wmm_list[n] = nil
end
end
end
function is_in_wlist(name,id,wlist)
if not(wlist[name]==nil) and wlist[name]>=id then
return true
else
return false
end
end
------------------------------------------------------------------------------------------------------------
function start_deactivate_autopickup()
if c_persist.ap==nil then
c_persist.ap={}
c_persist.ap[you.name()]=true
else
if c_persist.ap[you.name()]==nil then
c_persist.ap[you.name()]=true
end end
--autopickup_is_on = c_persist.ap[you.name()]
td_start_deactivate_autopickup=not(c_persist.ap[you.name()])
c_persist.ap[you.name()]=nil
--if csave_is_autopickup_off then autopickup_is_on=false td_start_deactivate_autopickup=true end
--if not(autopickup_is_on) then autopickup_turns_off() end
if td_start_deactivate_autopickup then
if not(you.turns()==0) then
crawl.mpr("Autopickup was off when saving.")
deactivate_autopickup()
end
if not(autopickup_is_on) then td_start_deactivate_autopickup=false end
end
end
function csave_is_autopickup_on()--file) --supposed to be called before saving
--c_persist.thing=tostring(file.write)
--dump(file,"")
if autopickup_is_on then
c_persist.ap[you.name()]=true
return ""
else
c_persist.ap[you.name()]=false
--return 'crawl.mpr("lua detected that AP should be OFF:") crawl.do_commands({"CMD_TOGGLE_AUTOPICKUP"}) if crawl.messages(1):find(".utopickup is now on") then crawl.mpr("lua corrects itself:") crawl.do_commands({"CMD_TOGGLE_AUTOPICKUP"}) end'
--return "deactivate_autopickup"
return ""
end
--echoall(autopickup_is_on)
end
-------------------------------------------------------------------------------------------------------------
--crawl.setopt("message_color += yellow:out of view")
local last_msg, last_ch = "", ""
function cmsg_warnings(msg, ch)
--if not(msg:match("---")) then
--crawl.mpr("---"..msg.."-"..last_msg)
--if last_ch=="monster_warning" and not(msg:match("out of view")) then
--if false and monster_warning=="skip" then
--monster_warning = "skipchk"
--else
--monster_warning=true
--crawl.more()
--end
--elseif
if last_msg:match("ou are slowing down") and you.status("petrifying") then
if not(cmsg_sending)then
cmsg_sending=true
--crawl.mpr("You are petrifying soon!")
while not(crawl.yesno("-- Do you realize you are petrifying? --",true,"n",true)) do end
crawl.mpr("...",2)
cmsg_sending = false
end
elseif last_msg:match("ou feel yourself slow down") then
if not(cmsg_sending)then
cmsg_sending=true
if you.slowed() then
while not(crawl.yesno("-- Do you realize you are slowed? --",true,"n",true)) do end
else
while not(crawl.yesno("-- Do you realize your haste has expired? --",true,"n",true)) do end
end
crawl.mpr("...",2)
cmsg_sending = false
end
elseif last_msg:match("finished your manual") then
if not(cmsg_sending)then
cmsg_sending=true
while not(crawl.yesno("-- press y --",true,"n",true)) do end
crawl.mpr("...",2)
cmsg_sending = false
end
end
--alternative to the last_ch handling, sometimes one less more, but sometimes slower at interrupting input, doent catch all out of view with the more
if ch=="monster_warning" then
mark_positions()
--crawl.more(); monster_warning=true --like last_ch handling, shows more stuff, but not the message
if not(monster_warning) then
monster_warning = "td"
elseif monster_warning=="skip" then
monster_warning = "skipchk"
end
end
--if msg:match("out of view") and not(msg:match("ortex")) then
--if not(cmsg_sending)then
--cmsg_sending=true
----crawl.mpr(msg:gsub("moves out of view.","is about to move out of view!"):gsub("lightgrey","yellow"),2)
--crawl.mpr(msg:gsub("moves out of view.","is about to move out of view!"):gsub("%a+>","yellow>"),2)
--monster_warning=true
--crawl.more()
--cmsg_sending = false
--end
--end
last_msg, last_ch = msg, ch
--end
end
local deltable={}
if tonumber(crawl.version("major"))>=.28 then deltable=nil end
function mark_positions()
local LOS=you.los()
for x = -LOS,LOS do
for y = -LOS,LOS do
if
not( monster.get_monster_at(x, y)==nil )
and not( ( monster.get_monster_at(x, y):is_safe()
and monster.get_monster_at(x, y):is_stationary() ) )
and not(monster.get_monster_at(x, y):attitude()>1)
and view.cell_see_cell(0,0,x,y)
then
if tonumber(crawl.version("major"))<.28 then
if not(you.branch()=="Abyss") then --no exclusions in Abyss
travel.set_exclude(x,y,0)
table.insert(deltable, { x, y })
end
else
--table.insert(deltable, { x, y })
--table.insert(deltable, true)
travel.set_travel_trail( x+( y==0 and (x==0 and 0 or math.abs(x)/x) or 0) , y+(y==0 and 0 or math.abs(y)/y) )
travel.set_travel_trail(x,y)
end
--table.insert(r_td, rtd_mark_positions)
r_td[rtd_mark_positions]=1
end
end
end
end
function rtd_mark_positions()
if tonumber(crawl.version("major"))<.28 then
for k in pairs(deltable) do
travel.del_exclude(deltable[k][1],deltable[k][2])
end
deltable={}
else
--if false and next(deltable) then --TD delete
----for k in pairs(deltable) do
----travel.set_travel_trail(deltable[k][1],deltable[k][2])
----end
--deltable={}
--table.insert(r_td, rtd_mark_positions)
--else
travel.clear_travel_trail()
--end
end
end
function r_warnings()
cmsg_warnings("","")
if monster_warning=="td" then
crawl.more()
end
end
function r_monster_warning()
if monster_warning then
--if monster_warning=="td" then
--crawl.more()
--else
if monster_warning=="skipchk" and you.feel_safe() then --something went into view, and out of view. would work with "out of view" handling above, but that's not needed since mark_positions is used
crawl.mpr("you immediately lose sight...")
crawl.more()
end
monster_warning=false
end
end
------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------
local path
function show_enemy_beam_path()
crawl.mpr("Select enemy:",2)
local x, y = crawl.get_target()
local x0=0
local y0=0
--echoall(x)
--echoall(y)
if x==nil and y==nil then return
--elseif x==0 and y==0 then
--crawl.mpr("Select start:",2)
--x0, y0 = crawl.get_target()
--crawl.mpr("Select enemy:",2)
--x, y = crawl.get_target()
elseif monster.get_monster_at(x, y)==nil then
x0, y0 = x, y
crawl.mpr("Selected Start. Select enemy:",2)
x, y = crawl.get_target()
end
path=spells.path("Magic Dart",x0,y0,x,y)
--path=spells.path("Lightning Bolt",x0,y0,x,y)
--dump(path)
if tonumber(crawl.version("major"))<.28 then
if not(you.branch()=="Abyss") then --no exclusions in Abyss
for k in pairs(path) do
travel.set_exclude(path[k][1],path[k][2],0)
end
end
table.insert(r_td, rtd_show_enemy_beam_path)
else
for k in pairs(path) do
travel.set_travel_trail(path[k][1],path[k][2])
end
end
end
function rtd_show_enemy_beam_path()
if not(you.branch()=="Abyss") then
for k in pairs(path) do
travel.del_exclude(path[k][1],path[k][2])
end
else
local found=false
crawl.mpr("Select tile:",2)
local x, y = crawl.get_target()
while x do
for k in pairs(path) do
if x==path[k][1] and y==path[k][2] then
crawl.mpr("Tile is in beam path.",2)
found=true
break;
end
end
if found then break end
crawl.mpr("Tile is not in beam path.",6)
x, y = crawl.get_target()
end
end
end
------------------------------------------------------------------------------------------------------------
local reminding = false
local remind_start=0
function remindMe()
reminding=true
remind_start=you.time()
crawl.mpr("reminder set!")
table.insert(r_td,rtd_remindMe)
end
function rtd_remindMe()
if reminding then
--if you.time()>remind_start+1500 then
if you.time()+10>remind_start+230 then
--crawl.mpr("time to eat!")
crawl.mpr("Reminder reminding you to do the thing!",4)
reminding = false
crawl.more()
else
table.insert(r_td,rtd_remindMe)
end
end
end
-------------------------------------------------------------------------------------------------------------
function rested()
return ( (({you.hp()})[1]==({you.hp()})[2] or you.status("non-regenerating"))
and ({you.mp()})[1]==({you.mp()})[2]
and you.contaminated()==0 and you.swift()==0
and (you.corrosion()==0 or (you.branch()=="Dis" and you.corrosion()<=2))
and not( you.slowed() or you.confused() or you.breath_timeout() or you.on_fire() or you.poisoned()
or you.petrifying() or you.teleporting() or you.silencing() or you.exhausted()
or you.status("can't hop") or you.status("doom-hounded") or you.status("frozen")
or you.status("weak-willed") or you.status("no potions") --only the killer clown effect
or you.status("sap magic")
or you.status("barbed spikes")
or you.transform()=="pig" or you.transform()=="fungus" or you.transform()=="wisp"
or you.status():match("vulnerable") --only fire vulnerable atm, I think
or you.status("berserk cooldown") or you.status("berserking")
--or you.status():match("weak") --needs testing
--or (you.status("glowing") and TD:notalwaysglowing)
--not implementable(?): -Recite, -Vortex
))
end
-------------------------------------------------------------------------------------------------------------
local restingf = false
local restingf_start=0
local restingf_end=0
local restingf_till_reminding=false
local restingf_useless_anyway=false
function rest_for(n)
restingf = true
restingf_start=you.time()
restingf_end=restingf_start+n
if reminding then restingf_till_reminding=true end
crawl.mpr("You start waiting...")
end
function r_rest_for()
local hp, mhp = you.hp()
local mp, mmp = you.mp()
if restingf then
if
not(move_careful) or (not(restingf_till_reminding) and you.time()+1>restingf_end)
--or rested() or you.hunger()<1 or (restingf_till_reminding and not(reminding)) then--HUNGER
or (rested() and not(restingf_useless_anyway)) or (restingf_till_reminding and not(reminding))
--or rested()
then
restingf = false
restingf_till_reminding=false
restingf_useless_anyway=false
crawl.mpr("You stop resting.")
if you.time()==restingf_start then
if crawl.yesno("Really wait?",true,"N") then
restingf_useless_anyway=true
restingf = true
rest_for_turn()
else
--crawl.mpr("Actually, you don't start resting.")
crawl.mpr("You don't start waiting.")
end
else
if (wait_x_equip_off and move_careful) then
rest_for_turn()
end
--wait_x_last="" --toggle for reset
end
else
rest_for_turn()
end
end
end
function rest_for_turn()
if wait_x_last=="" then
crawl.mpr("You wait.")
crawl.do_commands({"CMD_WAIT"})
else
_G[wait_x_last]()
end
end
function k_rest_for()
--rest_for(230)
rest_for(100)
end
-------------------------------------------------------------------------------------------------------------
function you_wait()
crawl.mpr("You wait.")
crawl.do_commands({"CMD_WAIT"})
wait_x_last=""
end
-------------------------------------------------------------------------------------------------------------
function rest_with_prompt()
if autopickup_is_on then
if
rested()
then
if crawl.yesno("Really wait for up to 100 decaAut?",true,"N") then
--crawl.do_commands({"CMD_REST"})
crawl.sendkeys(get_command("CMD_REST"))
else
crawl.mpr("You don't start waiting.")
end
else
--crawl.do_commands({"CMD_REST"}) --leads to a bug in an older version when you use the repeating command
crawl.sendkeys(get_command("CMD_REST"))
end
else
crawl.mpr("You don't start waiting.")
end
end
------------------------------------------------------------------------------------------------------------
local rest_wait_percent = 100
function toggle_rest_wait_percent()
if rest_wait_percent == 100 then
rest_wait_percent = 98
crawl.setopt("rest_wait_percent = 98")
crawl.mpr("rest_wait_percent = 98")
else
rest_wait_percent = 100
crawl.setopt("rest_wait_percent = 100")
crawl.mpr("rest_wait_percent = 100")
end
end
function start_rest_wait_percent()
--if you.xl()<14 then
if true then
rest_wait_percent = 98
end
toggle_rest_wait_percent()
end
-------------------------------------------------------------------------------------------------------------
--local super_resting = false
function super_rest()
--super_resting=true
--crawl.setopt("rest_wait_both = true")
--crawl.setopt("runrest_ignore_message += magic, HP, contam")
crawl.setopt("rest_wait_percent = 100")
--crawl.do_commands({"CMD_REST"})
rest_with_prompt()
table.insert(r_td,rtd_super_rest)
end
function rtd_super_rest()
--super resting
--if super_resting then
--crawl.setopt("rest_wait_both = false")
--crawl.setopt("runrest_ignore_message -= magic, HP, contam")
--crawl.setopt("rest_wait_percent = 98")
crawl.setopt("rest_wait_percent = "..tostring(rest_wait_percent))
--super_resting = false
--end
end
------------------------------------------------------------------------------------------------------------
local togglable_rest_is="normal"
function toggle_togglable_rest()
if togglable_rest_is=="normal" then
togglable_rest_is="until"
crawl.mpr("using equip rest")
else
togglable_rest_is="normal"
crawl.mpr("using regular rest")
end
end
function togglable_rest()
if togglable_rest_is=="normal" then
rest_with_prompt()
else
rest_until()
end
end
-------------------------------------------------------------------------------------------------------------
local avoidapproach="approach"
local travel_open_doors = avoidapproach
crawl.setopt("travel_open_doors = open") --it's only set to travel_open_doors in explore_simpler
function toggle_travel_open_doors()
if travel_open_doors == avoidapproach then
travel_open_doors = "open"
--crawl.setopt("travel_open_doors = open") --commeted out bc explore function sets it.
crawl.mpr("travel_open_doors = open")
else
travel_open_doors = avoidapproach
--crawl.setopt("travel_open_doors = "..avoidapproach)
crawl.mpr("travel_open_doors = "..avoidapproach)
end
end
function toggle_avoidapproach()
if avoidapproach == "avoid" then
avoidapproach = "approach"
if travel_open_doors == "avoid" then
travel_open_doors=avoidapproach
end
else
avoidapproach = "avoid"
if travel_open_doors == "approach" then
travel_open_doors=avoidapproach
end
end
crawl.mpr("travel_open_doors = "..(((travel_open_doors:match("open") or "")..", would be "):match("open, would be ") or "")..avoidapproach)
end
-------------------------------------------------------------------------------------------------------------
local just_exploring = false
local exploring = false
function r_meta_explore()
r_just_explore()
r_explore_simpler()
end
function just_explore()
just_exploring=true
crawl.setopt("explore_auto_rest = false")
explore_simpler()
end
function r_just_explore()
if just_exploring then
crawl.setopt("explore_auto_rest = true")
just_exploring=false
end
end
function explore_simpler()
exploring=true
monster_warning="skip" --skip it during next round, but only if monsters are in view
--toggle_move_careful_off_noprompt()
if travel_open_doors == avoidapproach then crawl.setopt("travel_open_doors = "..avoidapproach) end
if not(you.branch()=="Shoals" and you.flying()) or crawl.yesno("Really autoexplore?",true,"N") then crawl.sendkeys( get_command("CMD_EXPLORE") ) end
end
function r_explore_simpler()
if exploring then
crawl.setopt("travel_open_doors = open")
exploring=false
end
end
function explore_summon()
if move_careful then
crawl.sendkeys("yk")
togglable_explore()
end
end
------------------------------------------------------------------------------------------------------------
local ctrl_exploring=false
local ctrl_explore_timestamp=0
function ctrl_explore()
ctrl_exploring=true
table.insert(r_td,rtd_ctrl_explore)
ctrl_explore_timestamp=-1
--toggle_move_careful_off_noprompt()
crawl.setopt("message_color += mute:ove the cursor to view the level map")
crawl.setopt("message_color += mute:eturning to the game...")
end
function rtd_ctrl_explore()
if ctrl_exploring and move_careful and ctrl_explore_timestamp(mmp-mp_buff-2)) then
rest_with_prompt()
end
else
crawl.mpr("equipped something")
rest_until_normal_mp.a=true
end
end
end
end
function r_rest_until() --this runs in ready()
local hp, mhp = you.hp()
local mp, mmp = you.mp()
if rest_until_normal_mp.a then
rest_until_normal_mp.a=false
if move_careful then
rest_until()
end
else
if rest_until_normal_mp.z and ( mp>(mmp-mp_buff-2) or not(you.feel_safe()) or not(move_careful) ) then
--crawl.mpr("test2")
crawl.setopt("rest_wait_percent = "..rest_wait_percent)
if not(you.feel_safe()) or not(move_careful) then
rest_until_normal_mp.z=false
if
not(original_equip.weapon==nil)
and not(original_equip.lring==nil)
and not(original_equip.rring==nil)
then
old_original_equip=original_equip
original_equip={}
else
crawl.mpr("original_equip=={}")
end
crawl.mpr("Danger! Your equip may be inadequate!")
else
if not(original_equip.weapon==nil) then
crawl.process_keys("w"..original_equip.weapon)
original_equip.weapon=nil
elseif not(original_equip.lring==nil) then
crawl.process_keys("RYP"..original_equip.lring)
original_equip.lring=nil
elseif not(original_equip.rring==nil) then
crawl.process_keys("RZP"..original_equip.rring)
original_equip.rring=nil
rest_until_normal_mp.z=false
end
if original_equip.weapon==nil and original_equip.lring==nil and original_equip.rring==nil then
rest_until_normal_mp.z=false
end
end
end
end
end
function rest_until_restore_equip()
original_equip=old_original_equip
rest_until_normal_mp.z=true
if not(original_equip.weapon==nil) then
crawl.process_keys("w"..original_equip.weapon)
original_equip.weapon=nil
else
if not(original_equip.lring==nil) then
crawl.process_keys("RYP"..original_equip.lring)
original_equip.lring=nil
else
if not(original_equip.rring==nil) then
crawl.process_keys("RZP"..original_equip.rring)
original_equip.rring=nil
rest_until_normal_mp.z=false
end
end
end
if original_equip.weapon==nil and original_equip.lring==nil and original_equip.rring==nil then rest_until_normal_mp.z=false end
end
-------------------------------------------------------------------------------------------------------------
local crystal_ball_notified = false
function r_crystal_ball_notify()
if (not(items.inslot(items.letter_to_index("c"))==nil)) and items.inslot(items.letter_to_index("c")):name()=="crystal ball of energy" then
local mp, mmp = you.mp()
local evo = you.skill("evocations")
if ( (mp-9)/mmp<(76-2*math.floor(evo))/100 ) then
if not(crystal_ball_notified) then
crawl.mpr("You need to stay over "..tostring(math.floor(mmp*(76-2*math.floor(evo))/100)+1).." MP to use the crystal ball!",7)
crawl.more()
crystal_ball_notified = true
end
else
crystal_ball_notified = false
end
end
end
---------------------------------------------------
function use_ball()
if you.status("vitalised") or crawl.yesno("Really use the crystal ball?",true) then
crawl.process_keys("Vc")
else
crawl.mpr("ok then.",2)
end
end
-------------------------------------------------------------------------------------------------------------
wait_x_last=""--just for info, used in rest_for
wait_x_equip_off=false
wait_weapon_equip=""
function wait_weapon()
wait_x_last="wait_weapon"
r_move_careful()
if not(items.equipped_at(0)==nil) then
wait_weapon_equip=items.index_to_letter(items.equipped_at(0).slot)
crawl.sendkeys("w-")
wait_x_equip_off=true
else
crawl.sendkeys("w*"..wait_weapon_equip)
wait_x_equip_off=false
end
end
wait_ring_equip=""
function wait_ring()
wait_x_last="wait_ring"
r_move_careful()
if not(items.equipped_at(7)==nil) then
wait_ring_equip=items.index_to_letter(items.equipped_at(7).slot)
if (items.equipped_at(8)==nil) then
crawl.sendkeys("R")
else
crawl.sendkeys("R"..wait_ring_equip)
wait_x_equip_off=true
end
else
crawl.sendkeys("P"..wait_ring_equip)
wait_x_equip_off=false
end
end
wait_ring_equip2=""
function wait_ring2()
wait_x_last="wait_ring2"
r_move_careful()
if not(items.equipped_at(8)==nil) then
wait_ring_equip2=items.index_to_letter(items.equipped_at(8).slot)
if (items.equipped_at(7)==nil) then
crawl.sendkeys("R")
else
crawl.sendkeys("R"..wait_ring_equip2)
wait_x_equip_off=true
end
else
crawl.sendkeys("P"..wait_ring_equip2)
wait_x_equip_off=false
end
end
-------------------------------------------------------------------------------------------------------------
function bad_key()
crawl.mpr("this key doesn't do anything right now!")
crawl.more()
end
-------------------------------------------------------------------------------------------------------------
gourm_reminded=true
function r_chk_gourm_fullness()
if you.gourmand() then
if you.hunger()==6 and not(gourm_reminded) then
crawl.mpr("You are no longer engorged.")
crawl.more()
gourm_reminded=true
elseif you.hunger()==7 and gourm_reminded then
gourm_reminded=false
end
end
end
-------------------------------------------------------------------------------------------------------------
function wiz_spell_costs()
crawl.mpr("spc="..you.skill_cost("spellcasting").." spc*2="..(2*you.skill_cost("spellcasting")).." conj*3="..3*you.skill_cost("conjurations").." air="..you.skill_cost("air magic").." fire="..you.skill_cost("fire magic").." tl="..you.skill_cost("translocations").." hx="..you.skill_cost("hexes"))
--crawl.mpr("spc*4="..(4*you.skill_cost("spellcasting")).." conj*3="..(3*you.skill_cost("conjurations")).." air*3+fire*2="..(3*you.skill_cost("air magic")+2*you.skill_cost("fire magic")).. " 4*spc-tl-hx="..(4*you.skill_cost("spellcasting")-you.skill_cost("translocations")-you.skill_cost("hexes")))
crawl.mpr("spc*4="..(4*you.skill_cost("spellcasting")).." conj*2="..(2*you.skill_cost("conjurations")).." 2*tl="..(2*you.skill_cost("translocations")).." 2*hx="..(2*you.skill_cost("hexes")).." 2(tl+hx)="..(2*you.skill_cost("translocations")+2*you.skill_cost("hexes")))
end
-------------------------------------------------------------------------------------------------------------
local sstnum=0
local sstspls = {"Apportation",
"Confusing Touch",
"Magic Dart",
"Foxfire",
"Blink",
"Passwall",
"Slow",
"Swiftness",
"Ozocubu's Armour",
"Mephitic Cloud",
"Gell's Gravitas",
"Cause Fear",
"Leda's Liquefaction",
"Enfeeble",
"Fulminant Prism",
"Iskenderun's Mystic Blast",
"Fireball",
"Iskenderun's Battlesphere",
"Yara's Violent Unravelling",
"Deflect Missiles",
"Dispersal",
"Orb of Destruction",
"Discord",
"Disjunction",
"Fire Storm",
"Polar Vortex",
"Shatter",
"Chain Lightning",
"Lehudib's Crystal Spear",
"Summon Lightning Spire",
"Teleport Other",
"Airstrike",
"Spellforged Servitor",
"Summon Guardian Golem",
"Vile Clutch",
"Death's Door",
"Necromutation",
"Borgnjor's Revivification",
"Iron Shot",
"Ignition",
"Passage of Golubria",
"Summon Butterflies",
"Regeneration",
"Confuse",
"Force Lance",
"Agony",
"Aura of Abjuration",
"Bolt of Cold",
"Bolt of Fire",
"Ring of Flames",
"Glaciate",
"Tornado",
"Controlled Blink",
"Invisibility",
"Darkness",}
local sst_responses={}
function sif_spells_test()
sstnum=1
end
function r_sif_spells_test()
if sstnum>0 then --sstnum==0 means nothing should be done
if sstnum<=table.maxn(sstspls) then
if sstnum>1 then
table.insert(sst_responses,crawl.messages(1))
end
crawl.sendkeys("Ä\6")
crawl.sendkeys(sstspls[sstnum])
crawl.sendkeys("\13a")
sstnum=sstnum+1
else
table.insert(sst_responses,crawl.messages(1))
sstnum=0
local maxn=table.maxn(sstspls)
for i=1,maxn,1 do
if sst_responses[i]:match("Okay, then.")=="Okay, then." and not(spells.memorised(sstspls[i])) then
crawl.mpr(sstspls[i])
else if sst_responses[i]=="Memorise" then
table.remove(sst_responses,i+1)
end
end
end
sst_responses={}
end
end
end
function ans_sif_spells_test() --called in c_answer_prompt()
if sstnum>0 then
table.insert(sst_responses,"Memorise")
crawl.sendkeys("N")
end
end
-------------------------------------------------------------------------------------------------------------
function prompt_orb()
local mo=nil
local orb_near=false
for x=-1,1 do
for y=-1,1 do
mo=monster.get_monster_at(x,y)
if not(mo==nil) and mo:name()=="orb of destruction" then
orb_near=true
break
end
if not(mo==nil) and mo:name()=="battlesphere" and prompt_orb_battlesphere(x,y) then
orb_near=true
break
end
end
end
if not(orb_near) or crawl.yesno("Really cast Orb of Destruction?",true,"n") then
crawl.sendkeys("YM")
else
crawl.mpr("ok then.",2)
end
end
function prompt_orb_battlesphere(x0,y0)
local mo=nil
local orb_near=false
for x=-1,1 do
for y=-1,1 do
mo=monster.get_monster_at(x0+x,y0+y)
if not(mo==nil) and mo:name()=="orb of destruction" then
orb_near=true
break
end
end
end
return orb_near
end
----------------------------------------------------------------------------------------------------------------
--local last_spell_key="f"
--function Yh()
--last_spell_key="h"
--crawl.process_keys("Yh")
--end
--function Yj()
--last_spell_key="j"
--crawl.process_keys("Yj")
--end
--function Yk()
--last_spell_key="k"
----crawl.process_keys("Yk")
--prompt_orb()
--end
--function Yl()
--last_spell_key="l"
--crawl.process_keys("Yl")
--end
--function Yn()
--last_spell_key="n"
--crawl.process_keys("Yn")
--end
--function Ym()
--last_spell_key="m"
--crawl.process_keys("Ym")
--end
----td
----currently unneeded
----------------------------------------------------------------------------------------------------------------
--unused, delete?
local autopickup_gold=true
crawl.setopt("autopickup = $?!+\"/")
--crawl.setopt("autopickup_exceptions += gold piece")
--crawl.setopt("autopickup_exceptions -= 1 then
--crawl.sendkeys("V"..items.index_to_letter(items.equipped_at(0).slot))
--crawl.do_commands({"CMD_EVOKE_WIELDED"})
--crawl.do_commands({"CMD_PRIMARY_ATTACK"})
attack_ignore_inscription()
elseif false then
--elseif items.fired_item() and items.fired_item().is_throwable then
crawl.sendkeys("F\13")
--crawl.do_commands({"CMD_EVOKE_WIELDED"})
--crawl.do_commands({"CMD_PRIMARY_ATTACK"})
else
attack_ignore_inscription()
end
end
end
local attack_ignore_inscription_undo = 0
function attack_ignore_inscription()
local direction = ""
if target_delta_to_cmd(d.x, d.y) then
direction=get_command(target_delta_to_cmd(d.x, d.y))
--echoall(direction)
end
local insc = get_command("CMD_INSCRIBE_ITEM")
local v = get_command("CMD_PRIMARY_ATTACK")
crawl.setopt("message_color += mute:inscri")
crawl.setopt('message_color += mute:'..util.trim(items.index_to_letter(items.equipped_at(0).slot))..'.-.')
if items.equipped_at(0).inscription:match("!a") then
if items.equipped_at(0).inscription:match("!a!a") then
crawl.sendkeys(insc..items.index_to_letter(items.equipped_at(0).slot).."\8\8\8\8\13"..v..direction..firemaybe)
else
crawl.sendkeys(insc..items.index_to_letter(items.equipped_at(0).slot).."\8\8\13"..v..direction..firemaybe)
end
else
crawl.sendkeys(v..direction..firemaybe)
end
attack_ignore_inscription_undo = 2
end
function r_attack_ignore_inscription()
if attack_ignore_inscription_undo==2 then
local insc = get_command("CMD_INSCRIBE_ITEM")
crawl.sendkeys(insc..items.index_to_letter(items.equipped_at(0).slot).."!a\13")
attack_ignore_inscription_undo = 3
elseif attack_ignore_inscription_undo==3 then
attack_ignore_inscription_undo = 0
crawl.setopt("message_color -= mute:inscri")
crawl.setopt('message_color -= mute:'..util.trim(items.index_to_letter(items.equipped_at(0).slot))..'.-.')
end
end
----------------------------------------------------------------------------------------------------------------
local last_thrown_letter --in the next function, is actually next thrown
function throw()
used_spell=false
used_throw=true
--crawl.sendkeys("F")
local last_thrown_exists=false
--echoall(last_thrown_letter)
for k,v in ipairs(items.inventory()) do
if items.inventory()[k].is_throwable then
--echoall(items.index_to_letter(items.inventory()[k].slot))
if items.index_to_letter(items.inventory()[k].slot)==last_thrown_letter then
crawl.mpr("+"..items.index_to_letter(items.inventory()[k].slot).."-"..items.inventory()[k]:name_coloured())
last_thrown_exists=true
else
crawl.mpr("-"..items.index_to_letter(items.inventory()[k].slot).."-"..items.inventory()[k]:name_coloured())
end
end
end
crawl.mpr("throw what?",2)
--local input=crawl.c_input_line()
local input=crawl.getch()
input=utf8char(input)
--if input and #input==1 and ( input:match("%l") or input:match("%u") ) then
if input:match("%l") or input:match("%u") then
last_thrown_letter=input
last_thrown_exists=true
--elseif input==nil or #input>0 or last_thrown_letter==nil then
elseif not(input=="\13") or last_thrown_letter==nil then
crawl.mpr("...",2)
return
end
if last_thrown_exists then
crawl.sendkeys("F"..last_thrown_letter)
else
crawl.mpr("ammunition not found.",2)
end
end
----------------------------------------------------------------------------------------------------------------
--Y.\{216}
local repeat_spellvar = {}
repeat_spellvar.a=false
function repeat_spell()
if used_spell then
crawl.setopt("message_colour -= mute:Casting:")
crawl.setopt("message_colour += mute:know that spell")
crawl.setopt("message_colour += mute:kay. then")
repeat_spellvar.a=true
--repeat_spellvar.m=crawl.messages(1)
crawl.sendkeys("Y\27")
elseif used_throw then
--crawl.sendkeys("F\13f")
if
last_thrown_letter
and items.inslot(items.letter_to_index(last_thrown_letter))
and items.inslot(items.letter_to_index(last_thrown_letter)).is_throwable
then
crawl.sendkeys("F"..last_thrown_letter.."f")
else
crawl.mpr("ammunition not found.",2)
crawl.more()
end
else
evoke_prompt()
crawl.sendkeys("f")
--crawl.process_keys("f")
end
end
function r_repeat_spell()
if repeat_spellvar.a then
local msg=crawl.messages(1)
--crawl.mpr("f"..msg)
--crawl.mpr("R"..crawl.trim(repeat_spellvar.m))
crawl.setopt("message_colour += mute:Casting:")
crawl.setopt("message_colour -= mute:know that spell")
crawl.setopt("message_colour -= mute:kay. then")
if msg:match("Casting:")=="Casting:" then
msg=msg:gsub("Casting: ","")
msg=msg:gsub(" %(.+","")
if spells.dir_or_target(msg) then
--crawl.mpr("f")
--if msg=="Searing Ray" then
--crawl.sendkeys(get_command("CMD_WAIT"))
--else
crawl.sendkeys("Y.!")
--end
else
--if utf8char(crawl.getch())=="d" then
if
msg=="Shatter"
or msg=="Foxfire"
or msg=="Starburst"
or utf8char(crawl.getch())=="f"
then
crawl.sendkeys("Y\13")
end
end
end
repeat_spellvar.a=false
end
end
----------------------------------------------------------------------------------------------------------------
function cmsg_attack_noprompt(msg, ch)
if
msg:match("eally attack near your battlesphere%?")
or msg:match("eally attack near your spellforged servitor%?")
or msg:match("eally attack near your spellforged servitor and battlesphere%?")
or msg:match("eally attack near your battlesphere and spellforged servitor%?")
then
if not(cmsg_sending) then
cmsg_sending=true
crawl.sendkeys("Y")
cmsg_sending=false
end
end
end
----------------------------------------------------------------------------------------------------------------
--if c_persist.branches==nil then
--c_persist.branches={}
--c_persist.branches[you.name()]={}
--else
--if c_persist.branches[you.name()]==nil then
--c_persist.branches[you.name()]={}
--end end
--local branches = c_persist.branches[you.name()]
local branches = {}
function r_annotate_branchend()
--except branches with just 2 floors
if
not(branches[you.branch()])
and you.depth()==travel.find_deepest_explored(you.branch())
then
if you.depth()==1 then
branches[you.branch()]=0 --just entered new branch
else
branches[you.branch()]=-1
--this value means, first time visiting the latest branch level since reload
--otherwise, it will be deepest explored depth of the branch before this turn
--or nil, if you haven't reached the latest branch level since reload
--if you reloaded while still on first lvl of branch, it will think you just entered it
--to fix that, you would need to assign branches[x]=deepest for all branches when loading, or use c_persist, or maybe just you.turns_on_level()
--not needed atm
end
end
if branches[you.branch()] and you.depth()>branches[you.branch()] then
--you just went down further than before
if you.depth()>1 and not(branches[you.branch()]==-1) then
--skip depth=1 because you cant calculate the branchend
--dont change annotations if you just reloaded
local branchend=(you.depth()-1)/you.depth_fraction()+1 --nan if you.depth()==1
if (you.depth()>branchend-1.5 and you.depth()!\13")--annotate next level
elseif you.depth()>branchend-0.5 then
crawl.sendkeys("!.\8\8\8\8\8\8\8\8\8\8\13")--delete annotation of this lvl
end
end
branches[you.branch()]=math.max(travel.find_deepest_explored(you.branch()), you.depth())--c_persist.branches[you.name()][you.branch()]=
end
end
----------------------------------------------------------------------------------------------------------------
function krepeat()
--crawl.sendkeys("`") --just repeats the macro instead of the previous action, looping forever
end
----------------------------------------------------------------------------------------------------------------
local safety_on = 0
local safety_time = 0
function r_safety_precaution()
local hp, mhp = you.hp()
if hpsafety_time then
crawl.mpr("calling crawl.delay for 15 seconds.")
if crawl.messages(1):match("crawl.delay") then
crawl.delay(15000)
crawl.mpr("...")
end
safety_time=you.time()
end
else
safety_on=0
end
end
---------------------------------------------------------------------------------------------------------------------------------------------------------
-- globals.lua
-- show all global variables
local seen={}
function dump(t,i,dontclear,start,limit)
seen[t]=true
local s={}
local n=0
for k in pairs(t) do
n=n+1 s[n]=k
end
table.sort(s)
for k,v in ipairs(s) do
if ( not(start) or k>=start ) and ( not(limit) or k
################################################################################################################
#############
#to do list:
#remove all usage of more+=into view if things work
#transfer most r_ functions to use r_td instead
#ß\{223} ^H\{8} ^Ö \{150}\{246} ^J\{10} ^L\{12} ^K\{11} ^Ä \{132}\{228}error ^Ü \{156} ^s 19
macros += M \{19} ===macro_save_now
macros += M S ===macro_save
#macros += M \{11} ===toggle_move_careful_on
macros += M \{11} ===show_enemy_beam_path
#macros += M H ===rest_until
#macros += M \{8} ===rest_until_restore_equip
macros += M \{8} ===toggle_togglable_rest
macros += M H ===rest_until_restore_equip
macros += M \{246} ===explore_simpler
#macros += M \{246} ===togglable_explore
#just_explore
macros += M \{10} ===k_rest_for
#macros += M q ===debuggg
macros += M \{12} ===remindMe
macros += M \{223} ===wiz_spell_costs
macros += M ] ===sif_spells_test
macros += M v ===evoke_prompt
macros += M \{248} ===toggle_warn_more_monsters
#^B\{2}
macros += M B ===throw
#macros += M ¹
#^8
macros += M \{-40} ===wait_ring
#^9
macros += M \{-39} ===wait_ring2
#^7
macros += M \{-41} ===wait_weapon
#^8
macros += M 8 ===wait_ring
#^9
macros += M 9 ===wait_ring2
#^7
macros += M 7 ===wait_weapon
#macros += M 9 ===super_rest
#macros += M 8 ===super_rest
#"K:" default,
#"K1:" level-map,
#"K2:" targeting or
#"K3:" confirmation.
#ö 246 =x-61-74 => x-61=320
#ä 228 =x-61-92 => x-61=320
#ü x-61-68=252
#Ö 214
#Ä 196
#Ü 220
#W 23
#esc 27
#tab 9
#F8 - F9
macros += K \{-1073741889} =
macros += K \{-1073741890} =
macros += K \{-272} =
macros += K \{-273} =
macros += K - <
macros += K _ >
#macros += K - -
#macros += K _ _
#bindkey = [-] CMD_GO_UPSTAIRS
#bindkey = [_] CMD_GO_DOWNSTAIRS
#macros += K < -
#macros += K > _
#f11,12
macros += K \{-1073741892} -
macros += K \{-1073741893} _
macros += K \{-275} -
macros += K \{-276} _
#shaltgr-,altgr-
macros += K \{8212} -
macros += K \{8211} _
macros += K1 - <
macros += K1 _ >
#macros += K1 < -
#macros += K1 > _
macros += K1 < <
macros += K1 > >
macros += K1 n ]
macros += K1 y [
macros += K1 \{246} v
macros += K1 q \{23}
#why was this vvv commented out?
macros += K2 f !
#! dont't stop at target, @ stop, both ignore range
macros += K2 t @
#space as esc in targeting
macros += K2 \{32} \{27}
macros += K2 \{228} \{27}
macros += K2 \{246} +
macros += K2 x !\{1000}
#hopefully not actually a key at 1000
macros += M \{1000} ===remindMe
macros += K3 y Y
#doesnt seem to work -.-
macros += M # '
macros += M ' #
macros += M + =s!
#macros += M H 5
#macros += M H ===rest_with_prompt
#enter \{13}
#happens to be ^M as well
macros += M \{13} p
#macros += M p ===rest_with_prompt
macros += M p ===togglable_rest
#ä
#macros += M \{228} N!
macros += K \{228} `
macros += M z Y*!
macros += M a YH
macros += M s YJ
macros += M d YK
macros += M f YL
#macros += M x YX now M
macros += M x ===prompt_orb
macros += M A yh
macros += M S yj
macros += M D yk
macros += M F yl
macros += M X ym
#altgrF
macros += M \{273} F
macros += M E EA
#macros += M y Y*
#macros += M N D
macros += M y n
macros += M n Y*
macros += M Y D
macros += M N ===bad_key
#macros += M B A
#for nagas?^B\{2}, used to be B
macros += M \{2} ag
#macros += M Y a
#macros += M Y Vc
#place crystal ball at c
#no more ball
#macros += M Y ===use_ball
#macros += M b v
macros += M b a
#Ü
macros += M \{220} =i
#tab
#macros += M \{9} *
#no more hunger
#macros += M D e
#macros += M D n #see spellmacros
macros += M k k!
macros += M * N
#mouse
#ctrl u to altgr u
macros += M \{21} \{8595}
macros += M \{8595} ===rest_for_turn
#ctrl p to altgr p
macros += M \{16} \{254}
macros += M \{254} ===k_rest_for
#fixing mouse clearing more() not
#macros += M \{-9992} ===bad_key
#macros += K \{-9999} ==bad_key
#tab to shift-tab
#macros += M \{9} \{-233}
#macros += M \{-233} \{9}
macros += M \{9} h
macros += M \{-233} ===rest_for_turn
#macros += M e ===just_explore
#macros += M e ===explore_simpler
macros += M e ===togglable_explore
########left numbers p ü+ ä enter uoÖ 789ß
# 2 1 345
# F 4 3 12 5
# " Z §
#^1 ü
macros += M 1 \{252}
#macros += M \{-15} \{252}
macros += M 2 ===togglable_rest
macros += M " ===rest_until_restore_equip
#local
##^2
macros += M \{-46} ===rest_with_prompt
##^3
#macros += M \{-45} ===toggle_togglable_rest
macros += M \{-45} ===toggle_togglable_explore
##^4
macros += M \{-44} ===toggle_rest_wait_percent
##^5
macros += M \{-43} ===toggle_travel_open_doors
##^6
macros += M \{-42} ===toggle_avoidapproach
#tiles
#^2
macros += M \{-14} ===rest_with_prompt
#^3
#macros += M \{-13} ===toggle_togglable_rest
macros += M \{-13} ===toggle_togglable_explore
#^4
macros += M \{-12} ===toggle_rest_wait_percent
#^5
macros += M \{-11} ===toggle_travel_open_doors
#^6
macros += M \{-10} ===toggle_avoidapproach
#macros += M 3 ===wait_weapon
#macros += M 4 ===wait_ring
#macros += M 5 ===wait_ring2
macros += M 3 ===explore_summon
macros += M 4 tr
macros += M 5 tt
#§ to Ö
macros += M \{167} \{214}
macros += M Z =s
#^Z
macros += M \{26} N
#^v to Ö
macros += M \{22} '
#F1-7
macros += M \{-1073741882} \{8595}
macros += M \{-1073741883} \{15}
macros += M \{-1073741884} ===rest_for_turn
macros += M \{-1073741885} ===k_rest_for
macros += M \{-1073741886} p
macros += M \{-1073741887} \\
macros += M \{-1073741888} \\-
macros += M \{-265} \{8595}
macros += M \{-266} \{15}
macros += M \{-267} ===rest_for_turn
macros += M \{-268} ===k_rest_for
macros += M \{-269} p
macros += M \{-270} \\
macros += M \{-271} \\-
##^o
#macros += M 1 \{15}
##^u 21
#macros += M 2 \{21}
#macros += M " ===switch_autopickup_gold
#macros += M 3 ===toggle_rest_wait_percent
#macros += M § ===toggle_rest_wait_percent
#macros += M 4 ===rest_until_restore_equip
#macros += M 5 ===rest_with_prompt
#12345 F1234 "§%
#æ 230
#bindkey = [æ] CMD_QUAFF
#macros += M 1 \{230}
#macros += M 1 \{-233}
#macros += M x ===rest_until
#` repeat
#bindkey = [q] CMD_PREV_CMD_AGAIN
#recast last used spell
#macros += M z ===repeat_spell
#macros += M x ===repeat_spell
macros += M c ===repeat_spell
#macros += M x ===bad_key
#macros += M q
#ü inventory
#macros += M w \{252}
#exploreenter
#rest
#macros += M r ===rest_with_prompt
#macros += M t ===super_rest
########
#` repeat
#bindkey = [\{9}] CMD_PREV_CMD_AGAIN
##shifttab
#macros += M 1 \{-233}
##ü inventory
#macros += M 2 \{252}
##explore
#macros += M 3 ===just_explore
##rest
#macros += M 4 ===rest_with_prompt
#macros += M 5 ===super_rest
###########
bindkey = [Ø] CMD_TARGET_SELECT_FORCE
bindkey = [ł] CMD_MAP_ANNOTATE_LEVEL
bindkey = [n] CMD_TARGET_CANCEL
#https://github.com/crawl/crawl/blob/master/crawl-ref/source/command-type.h
bindkey = [h] CMD_WAIT
bindkey = [j] CMD_MOVE_LEFT
bindkey = [,] CMD_MOVE_DOWN
bindkey = [i] CMD_MOVE_UP
bindkey = [l] CMD_MOVE_RIGHT
bindkey = [u] CMD_MOVE_UP_LEFT
bindkey = [o] CMD_MOVE_UP_RIGHT
bindkey = [m] CMD_MOVE_DOWN_LEFT
bindkey = [.] CMD_MOVE_DOWN_RIGHT
bindkey = [J] CMD_RUN_LEFT
bindkey = [;] CMD_RUN_DOWN
bindkey = [I] CMD_RUN_UP
bindkey = [L] CMD_RUN_RIGHT
bindkey = [U] CMD_RUN_UP_LEFT
bindkey = [O] CMD_RUN_UP_RIGHT
bindkey = [M] CMD_RUN_DOWN_LEFT
bindkey = [:] CMD_RUN_DOWN_RIGHT
bindkey = [j] CMD_TARGET_LEFT
bindkey = [,] CMD_TARGET_DOWN
bindkey = [i] CMD_TARGET_UP
bindkey = [l] CMD_TARGET_RIGHT
bindkey = [u] CMD_TARGET_UP_LEFT
bindkey = [o] CMD_TARGET_UP_RIGHT
bindkey = [m] CMD_TARGET_DOWN_LEFT
bindkey = [.] CMD_TARGET_DOWN_RIGHT
bindkey = [J] CMD_TARGET_DIR_LEFT
bindkey = [;] CMD_TARGET_DIR_DOWN
bindkey = [I] CMD_TARGET_DIR_UP
bindkey = [L] CMD_TARGET_DIR_RIGHT
bindkey = [U] CMD_TARGET_DIR_UP_LEFT
bindkey = [O] CMD_TARGET_DIR_UP_RIGHT
bindkey = [M] CMD_TARGET_DIR_DOWN_LEFT
bindkey = [:] CMD_TARGET_DIR_DOWN_RIGHT
bindkey = [j] CMD_MAP_MOVE_LEFT
bindkey = [,] CMD_MAP_MOVE_DOWN
bindkey = [i] CMD_MAP_MOVE_UP
bindkey = [l] CMD_MAP_MOVE_RIGHT
bindkey = [u] CMD_MAP_MOVE_UP_LEFT
bindkey = [o] CMD_MAP_MOVE_UP_RIGHT
bindkey = [m] CMD_MAP_MOVE_DOWN_LEFT
bindkey = [.] CMD_MAP_MOVE_DOWN_RIGHT
bindkey = [J] CMD_MAP_JUMP_LEFT
bindkey = [;] CMD_MAP_JUMP_DOWN
bindkey = [I] CMD_MAP_JUMP_UP
bindkey = [L] CMD_MAP_JUMP_RIGHT
bindkey = [U] CMD_MAP_JUMP_UP_LEFT
bindkey = [O] CMD_MAP_JUMP_UP_RIGHT
bindkey = [M] CMD_MAP_JUMP_DOWN_LEFT
bindkey = [:] CMD_MAP_JUMP_DOWN_RIGHT
bindkey = [p] CMD_MAP_ADD_WAYPOINT
bindkey = [a] CMD_MAP_EXPLORE
bindkey = [k] CMD_MAP_FIND_YOU
bindkey = [s] CMD_MAP_FIND_YOU
bindkey = [w] CMD_MAP_GOTO_TARGET
bindkey = [3] CMD_MAP_GOTO_TARGET
macros += K1 3 w
bindkey = [q] CMD_MAP_EXIT_MAP
#bindkey = [b] CMD_EXPLORE
#bindkey = [B] CMD_OPEN_DOOR
#bindkey = [h] CMD_DISPLAY_INVENTORY
#bindkey = [h] CMD_MAP_FIND_STASH
#bindkey = [H] CMD_DISPLAY_SPELLS
#bindkey = [y] CMD_DISPLAY_RELIGION
#bindkey = [Y] CMD_MAKE_NOTE
#bindkey = [n] CMD_DISPLAY_SKILLS
#bindkey = [N] CMD_MEMORISE_SPELL
bindkey = [b] CMD_EXPLORE
bindkey = [B] CMD_OPEN_DOOR
bindkey = [ü] CMD_DISPLAY_INVENTORY
bindkey = [ü] CMD_MAP_FIND_STASH
bindkey = [N] CMD_DISPLAY_SPELLS
bindkey = [þ] CMD_DISPLAY_RELIGION
bindkey = [Ö] CMD_REPLAY_MESSAGES
bindkey = [^N] CMD_MAKE_NOTE
bindkey = [p] CMD_DISPLAY_SKILLS
bindkey = [Ä] CMD_MEMORISE_SPELL
bindkey = [^X] CMD_LOOK_AROUND
bindkey = [K] CMD_DISPLAY_MAP
#bindkey = [] CMD_INTERLEVEL_TRAVEL
bindkey = [g] CMD_PICKUP
bindkey = [n] CMD_DROP
#bindkey = [N] CMD_NO_CMD_DEFAULT to spells for makro
bindkey = [z] CMD_NO_CMD_DEFAULT
bindkey = [Z] CMD_NO_CMD_DEFAULT
bindkey = [y] CMD_CAST_SPELL
bindkey = [Y] CMD_FORCE_CAST_SPELL
#altgr u
bindkey = [↓] CMD_RESISTS_SCREEN
bindkey = [k] CMD_FULL_VIEW
bindkey = [^B] CMD_FIRE
#CMD_FIRE_ITEM_NO_QUIVER
bindkey = [k] CMD_TARGET_TOGGLE_BEAM
bindkey = [ł] CMD_LUA_CONSOLE
#disabling swing-only keys when not overwritten by bindkey
bindkey = [^H] CMD_NO_CMD_DEFAULT
bindkey = [^J] CMD_NO_CMD_DEFAULT
#bindkey = [^K] CMD_NO_CMD_DEFAULT
bindkey = [^L] CMD_NO_CMD_DEFAULT
bindkey = [^Y] CMD_NO_CMD_DEFAULT
bindkey = [^U] CMD_NO_CMD_DEFAULT
#bindkey = [^B] CMD_NO_CMD_DEFAULT
#bindkey = [^N] CMD_NO_CMD_DEFAULT
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
#small_more = true
more := force_more_message
#disables lvl up messages and ???
#force_more_message =
confirm_action += [Ss]ilence
force_spell_targeter += silence
force_more_message += eally cast .ilence
force_more_message += You hear a loud .Zot.
force_more_message += lose your buoyancy, life at own hands, running out
#done by lua now:
#force_more_message += into view, too close, being watched by
#force_more_message += into view, being watched by
#force_more_message += being watched by
#force_more_message += into view
#force_more_message += out of view
#force_more_message += deactivating autopickup
#force_more_message+=autopickup is now off
force_more_message += a sentinel.s mark forms upon you
force_more_message += Your divine stamina fades away.
#force_more_message += magical contamination has completely faded away
#force_more_message += contaminate
force_more_message += wrath finds you
force_more_message += Your ring of flames is guttering out
force_more_message += You cannot blink
force_more_message += Your stasis prevents you from teleporting
force_more_message += You become entangled
more += You are held in a net
force_more_message += Your surroundings suddenly seem different.
#more += dispelling energy hits you
more += Your transformation is almost over.
more += You feel yourself coming back to life
more += You feel less protected from missiles
force_more_message += Your magical effects are unravelling
more += calcifying dust hits you
more += finish channelling
more += interdimensional caravan
more += distant snort
more += roar of battle
more += wave of frost
more += hiss of flowing sand
more += sound of rushing water
more += oppressive heat about you
more += crackle of arcane power
more += You feel a terrible weight on your shoulders
more += .* resides here
#force_more_message += increases to level, levels and is now at level
#flash_screen_message += increases to level, levels and is now at level
#done by c_msg now
#force_more_message += finished your manual
#flash_screen_message += finished your manual
flash_screen_message += carrying a wand of
flash_screen_message += wielding .* of distortion
#force_more_message += (?!.*(Here|Aim):)^.*wielding.*of distortion
# Dangerous weapons
flash_screen_message += is wielding.*distortion
# dancing weapons require special handling...
flash_screen_message += there is a.*distortion
flash_screen_message += of distortion comes into view
more += don.t have enough magic
more += you miscast
more += fail to use your ability
more += magic feels tainted
more += lose accesss to your magic
#for vampire
runrest_ignore_message += very thirsty, almost devoid of blood, You feel devoid of blood, blood rots away, blood rot away
rest_wait_both = true
runrest_ignore_message += HP
#runrest_ignore_message += magical contamination|(magic)
#runrest_ignore_message += magic(?!al contamination)
runrest_ignore_message += magic
#flash_screen_message += (?!foo)^.*bar
#contam
runrest_stop_message += magical contamination
flash_screen_message += There is something invisible around
message_colour += yellow:There is something invisible around
#done by c_msg
#more += You feel yourself slow down
#flash_screen_message += You feel yourself slow down
message_colour += magenta:You feel yourself slow down
flash_screen_message +=you feeling lethargic
message_colour += magenta:you feeling lethargic
runrest_stop_message += gateway leading out appears
runrest_stop_message += ound a gateway leading out
runrest_stop_message += pressed. stopping travel
message_colour += mute:Cast which spell
message_colour += mute:Press: . . help. Shift.Dir
message_colour += mute:Press: . . help. Dir . move target cursor
message_colour += mute:Casting:
message_colour += mute:Confirm with . or Enter. or press . or . to list all spells
message_colour += mute:Your battlesphere fires
message_colour += mute:prism comes into view
message_colour += mute:Press: . . help. Dir . move target
message_colour += mute:^Aiming\:
message_colour += mute:^Reach\:
message_colour += mute:^Shoot\:
message_colour += mute:^Attack\:
message_colour += mute:^Hit\:
message_color += mute:t...Shout
message_color += mute:.rders for allies
message_color += mute:r...Retreat.*s...Stop.attacking
message_color += mute:g...Guard the area.*f...Follow.me
message_color += mute:(a|A)nything.else...Cancel
channel.sound = lightgreen
message_colour += lightgreen:You feel a bit more experienced
message_colour += cyan:battlesphere wa, cyan:battlesphere expends
#tile_lava_col = #552211
tile_lava_col = #440000
#tile_trap_col = #aa6644
tile_trap_col = #aacc00
#tile_explore_horizon_col = #6b301b
#tile_explore_horizon_col = #6b301b
feature += explore horizon {,,red,red,red,red,red}
#tile_display_mode=hybrid
#rest_wait_percent = 98
#set by lua
cloud_status = true
#confirm_action += ^Blink,
#auto_butcher = true
#confirm_butcher = never
#auto_eat_chunks = true
explore_auto_rest = true
default_manual_training = true
#clear_messages = true
show_more = false
dump_message_count = 100
note_all_skill_levels = true
#online defaults
travel_delay = -1
rest_delay = -1
show_travel_trail = true
#travel_delay = 1
#show_travel_trail = false
runrest_stop_message ^= .omething.?.?.?.?.?.?.?.?.?.?.?.?.?.?.?.? misses you\.
runrest_stop_message ^= .omething enters a
runrest_stop_message ^= .omething sets off the alarm
runrest_stop_message ^= .omething launches a net
runrest_stop_message ^= You feel you are being watched by something
runrest_stop_message ^= reminder
runrest_stop_message ^= your.* disappears in a puff of smoke
message_colour ^= cyan:your.* disappears in a puff of smoke
runrest_stop_message ^= battlesphere wavers
#tile_layout_priority = abilities, commands, inventory, memorisation, minimap, monsters, navigation, skills, spells, system commands
tile_layout_priority = monsters, minimap
#item_slot ^= (weapon|staff|ring|missle):-abcdefghijklmnopqrstuvwxyz
#item_slot += (weapon|staff|ring):-abcdefghijklmnopqrstuvwxyz
item_slot += potions? of lig:t
item_slot += potions? of cur:C
item_slot += potions? of magic:G
item_slot += potions? of ambros:A
item_slot += potions? of brill:B
item_slot += potions? of cancel:X
item_slot += potions? of hast:Q
item_slot += potions? of heal w:W
item_slot += potions? of invis:V
item_slot += potions? of resis:R
item_slot += scrolls? of blinking:K
item_slot += scrolls? of fear:J
item_slot += scrolls? of fog:O
item_slot += scrolls? of id:y
item_slot += scrolls? of pois:P
item_slot += scrolls? of torm:H
item_slot += scrolls? of magic map:M
item_slot += scrolls? of sil:I
item_slot += scrolls? of sum:U
item_slot += scrolls? of butter:U
item_slot += scrolls? of tel:N
#defglstyz
#abcdefghijklmnopqrsuvwxz
item_slot += wand of acid:j
item_slot += wand of quicks:j
item_slot += wand of light:j
item_slot += wand of charm:s
item_slot += wand of para:s
item_slot += wand of dig:d
item_slot += wand of flame:p
item_slot += wand of mindb:w
item_slot += wand of poly:r
item_slot += wand of iceb:o
#defstyz
#abquv
item_slot += scrolls? of vuln:L
#item_slot += scrolls? of amn:x
#item_slot += scrolls? of enchant arm:e
#item_slot += scrolls? of acqu:c
#item_slot += scrolls? of brand:g
#item_slot += scrolls? of enchant weap:z
item_slot += scrolls? of immo:f
#item_slot += scrolls? of noise:s
#item_slot += potions? of degen:d
item_slot += potions? of att:i
item_slot += potions? of flight:l
item_slot += potions? of enl:l
item_slot += potions? of might:m
item_slot += potions? of beserk:k
#item_slot += potions? of mut:n
#item_slot += potions? of exp:h
item_slot += ((?potions? of might
#autopickup_exceptions ^= >potions? of degeneration
#autopickup_exceptions ^= >useless
autoinscribe += datura:!f
#autoinscribe += magical power:!R
autoinscribe += MP\+:!R!T!w
autoinscribe += potions? of resis:rElec rC+ rF+ rCorr rPois
autoinscribe += weapon:!a
tile_tooltip_ms = 0
## Pickup aux armour you haven't found yet.
## Also picks up ego/artefact aux armour if you can wear it.
## Doesn't pick up shields or body armour.
{
local function autopickup(it, name)
local class = it.class(true)
if it.is_useless then return false end
if class == "armour" then
local good_slots = {cloak="Cloak", helmet="Helmet",
gloves="Gloves", boots="Boots"}
st, _ = it.subtype()
if good_slots[st] ~= nil and items.equipped_at(good_slots[st]) == nil then
return true
--elseif st ~= "body" and st ~= "shield" and (it.artefact or it.branded) then return true
end
end
--crawl.sendkeys( get_command("CMD_FULL_VIEW").."!" )
--crawl.mpr(it:class().." "..(it:subtype() or ""))
--crawl.mpr("<"..it:name_coloured())
return nil
end
add_autopickup_func(autopickup)
}
force_more_message -= You have reached level
force_more_message += You have reached level 26
#tile_full_screen = true
#buggy?
tile_window_width = -90
tile_window_height = -90
tile_full_screen = false
tile_skip_title = true
#msg_min_height = 6
#https://github.com/crawl/crawl/blob/master/crawl-ref/source/rltiles/dc-mon.txt
#tile_player_tile = tile:MONS_SALAMANDER_MYSTIC
#tile_shield_offsets = 0,-8
#tile_player_tile = playermons
tile_player_tile = tile:MONS_SERVANT_OF_WHISPERS
#tile_player_tile = tile:MONS_WIZARD
#tile_player_tile = tile:MONS_SPRIGGAN_DEFENDER
#=(10*(20-V14)*(V12-0.99)/8-10)/V13
#=ROUNDUP(V16,1)
monster_item_view_coordinates = true
action_panel_filter -= attraction
explore_greedy_visit = artefacts
#,glowing_items
#explore_greedy_visit = asdf
#explore_greedy_visit -= asdf
#explore_greedy_visit -= glowing_items
explore_greedy_visit -= stacks
explore_stop += greedy_pickup
explore_stop -= greedy_pickup_smart
#explore_greedy=false
#show_more = true
:if tonumber(crawl.version("major"))>.26 then
#default 3
#fail_severity_to_confirm = 3
:crawl.setopt("fail_severity_to_confirm = 4")
:end
tile_viewport_scale = 1.0
#tile_map_scale = 0.5
tile_map_scale = 0.75
tile_level_map_hide_messages = false
tile_level_map_hide_sidebar = false
#explore_wall_bias = -1000
{
local turn_of_last_climb=0
function climbprompt(cmd)
if
turn_of_last_climb=({you.hp()})[2]*.5 )
and ( cmd=="<" or rested() or you.status("disjoining") )
or crawl.yesno("really climb?",true)
then
crawl.sendkeys(cmd)
turn_of_last_climb=you.turns()+2 --processed before sendkeys, which takes 2 turns
else
crawl.mpr("ok, then.",2)
turn_of_last_climb=0
end
end
function climbup()
climbprompt("<")
end
function climbdown()
climbprompt(">")
end
}
macros += M < ===climbup
macros += M > ===climbdown