-
Notifications
You must be signed in to change notification settings - Fork 9
/
CONFIG
58 lines (40 loc) · 2.13 KB
/
CONFIG
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
53
54
55
56
57
The config file Interhack checks first is ~/.interhack/config. The config file is pure Perl, so these can get arbitrarily complex. Here are some helper functions you can use.
nick "NICK";
This sets your autologin nickname to NICK.
nick "Eidolos";
pass "PASS";
This sets your autologin pass to PASS. See below on setting passwords.
pass "foob3";
recolor qr/REGEX/ => "COLOR";
This colorizes any string matched by REGEX to COLOR. See below on what
valid colors are. Also, the config reader can parse NetHack-style MENUCOLOR
lines.
color red You are slowing down
remap "KEY" => "STRING";
This remaps KEY to send STRING instead of KEY. It's not very powerful right
now because you can't define ctrl-keys or anything fancy. So wait on this.
remap chr(5) => "E- Elbereth\n";
make_annotation qr/REGEX/ => "MESSAGE";
This sets up an annotation for strings matching REGEX. When a string matching REGEX is seen, then MESSAGE is displayed on the second line in dark gray.
make_annotation qr/You feel cool!/ => "You just got fire resistance!";
make_tab qr/REGEX/ => "STRING";
This sets up a "tab". When a string matching REGEX is seen, then a tab is
set up such that when the player presses tab, STRING is sent.
make_tab "\e[What do you want to name this gray stone?"
=> "the Heart of Ahriman\n";
Passwords:
While you can put your password in ~/.interhack/config, it's probably not a
good idea (since it makes sharing more difficult). So instead you can make
files such as ~/.interhack/passwords/Eidolos which would contain the password
to the account Eidolos. Make sure that these files are unreadable to others
('chmod 700 ~/.interhack/passwords' is probably your best bet).
Colors:
black bblack bold&black black&bold bblack darkgray darkgrey
red bred bold&red red&bold orange
green bgreen bold&green green&bold
brown bbrown bold&brown brown&bold yellow darkyellow
blue bblue bold&blue blue&bold
purple bpurple bold&purple purple&bold
magenta bmagenta bold&magenta magenta&bold
cyan bcyan bold&cyan cyan&bold
white bwhite gray grey bold&white white&bold