Re: JS Commission?
By: Android8675 to echicken on Wed Jul 15 2020 09:40:17
I would probably do this:
const fg = ['green', 'white', 'white', 'yellow'];
const bg = ['black', 'black', 'blue', 'black'];
const colors = console.getnum(4, 1) - 1;
bbs.exec(
'frotz '
...
+ '-f ' + fg[colors]
+ '-b ' + bg[colors]
...
);
Where 'fg' and 'bg' are arrays of strings. If the user hits '4', fg[3] and bg[3] would be used, so the user would get yellow-on-black, and so on. (If I'm understanding your goal properly.)
console.putmsg(" 3.\1h\14 White on Blue\1n");
Not sure. Try \x014 instead of \14 and see if it helps.
ERROR: Unknown terminal: ansi-bbs
Check the TERM environment variable.
Also make s
ure that the terminal is defined in the terminfo database.
Alternatively, set the
TERMCAP environment variable to the desired
termcap entry
Sysop: | Aerosly |
---|---|
Location: | Orlando, FL |
Users: | 2 |
Nodes: | 10 (0 / 10) |
Uptime: | 31:51:25 |
Calls: | 320 |
Messages: | 38996 |