blob: c66d458ce7c299c40215dc9265437605535128b9 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
# For players who are prone to leave labyrinths without picking up the
# loot, here is a way to avoid that: put the following snippet in your
# options file (init.txt or .crawlrc) and then macro the '<' key to
# ===safe_upstairs (do it in-game by pressing '~' or Ctrl-D).
{
function safe_upstairs()
if you.branch() == "Lab" then
crawl.formatted_mpr("Really leave this labyrinth?", "prompt")
local res = crawl.getch()
if string.lower(string.char(res)) == "y" then
crawl.sendkeys("<")
end
else
crawl.sendkeys("<")
end
end
}
######################################################################
# Add the following to your options file to automatically pick up
# armour for non-body armour slots (gloves, boots, etc.), if you don't
# already have an item equipped there.
{
add_autopickup_func(function(it, name)
if it.class(true) == "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
end
end
return false
end)
}
######################################################################
# To automatically open the skill menu when starting a new game, add
# the following to your options file.
{
local need_skills_opened = true
function ready()
if you.turns() == 0 and need_skills_opened then
need_skills_opened = false
crawl.sendkeys("m")
end
end
}
######################################################################
|