essential in locating the Amulet of Yendor."]],
},
quest_portal = {
+ output = "pline",
text = [[You receive a faint telepathic message from %l:
Your help is urgently needed at %H!
Look for a ...ic transporter.
},
firsttime = {
synopsis = "[You arrive at %H, but all is not well.]",
- output = "menu",
+ output = "text",
text = [[You are suddenly in familiar surroundings. The buildings in the distance
seem to be those of your old alma mater, but something is wrong. It feels
as if there has been a riot recently, or %H has
},
firsttime = {
synopsis = "[You reach the vicinity of %H, but sense evil magic nearby.]",
- output = "menu",
+ output = "text",
text = [[Warily you scan your surroundings, all of your senses alert for signs
of possible danger. Off in the distance, you can %x the familiar shapes
of %H.
},
firsttime = {
synopsis = "[You arrive back at %H, but something is wrong here.]",
- output = "menu",
+ output = "text",
text = [[You descend through a barely familiar stairwell that you remember
%l showing you when you embarked upon your vision quest.
},
firsttime = {
synopsis = "[You arrive back at %H and must find %l.]",
- output = "menu",
+ output = "text",
text = [[What sorcery has brought you back to %H? The smell
of fresh funeral pyres tells you that something is amiss with the healing
powers that used to practice here.
},
firsttime = {
synopsis = "[Signs of battle include long gouges in the walls of %H.]",
- output = "menu",
+ output = "text",
text = [[You materialize in the shadows of %H. Immediately, you notice
that something is wrong. The fields around the castle are trampled and
withered, as if some great battle has been recently fought.
},
firsttime = {
synopsis = "[You have reached %H but something is wrong. %lC needs your aid.]",
- output = "menu",
+ output = "text",
text = [[You find yourself standing in sight of %H.
Something is obviously wrong here. Strange shapes lumber around
outside %H!
},
firsttime = {
synopsis = "[You are at %H; the doors are closed. %lC needs your help!]",
- output = "menu",
+ output = "text",
text = [[You find yourself standing in sight of %H. Something
is obviously wrong here. The doors to %H, which usually
stand open, are closed. Strange human shapes shamble around
},
firsttime = {
synopsis = "[The ancient forest grove is surrounded by centaurs.]",
- output = "menu",
+ output = "text",
text = [[You arrive in familiar surroundings. In the distance, you %x the
ancient forest grove, the place of worship to %d.
},
firsttime = {
synopsis = "[You are in Ransmannsby, where you trained. Find %l.]",
- output = "menu",
+ output = "text",
text = [[Unexpectedly, you find yourself back in Ransmannsby, where you trained to
be a thief. Quickly you make the guild sign, hoping that you AND word
of your arrival reach %ls den.]],
},
firsttime = {
synopsis = "[The banner of %n flies above town. What has happened to %l?]",
- output = "menu",
+ output = "text",
text = [[Even before your senses adjust, you recognize the kami of
%H.
},
firsttime = {
synopsis = "[You find yourself back at %H, but the quiet is ominous.]",
- output = "menu",
+ output = "text",
text = [[You breathe a sigh of relief as you find yourself back in the familiar
surroundings of %H.
},
firsttime = {
synopsis = "[You arrive below %H. Something is wrong; there is lava present.]",
- output = "menu",
+ output = "text",
text = [[You materialize at the base of a snowy hill. Atop the hill sits
a place you know well, %H. You immediately realize
that something here is very wrong!
},
firsttime = {
synopsis = "[You have arrived at %ls tower but something is very wrong.]",
- output = "menu",
+ output = "text",
text = [[You are suddenly in familiar surroundings. You notice what appears to
be a large, squat stone structure nearby. Wait! That looks like the
tower of your former teacher, %l.
deliver_by_pline(str)
const char *str;
{
+ const char *msgp = str;
+ const char *msgend = eos((char *)str);
char in_line[BUFSZ], out_line[BUFSZ];
- Strcpy(in_line, str);
- convert_line(in_line, out_line);
- pline("%s", out_line);
+ while (msgp && msgp != msgend) {
+ int i = 0;
+ while (*msgp != '\0' && *msgp != '\n' && (i < BUFSZ-2)) {
+ in_line[i] = *msgp;
+ i++;
+ msgp++;
+ }
+ if (*msgp == '\n')
+ msgp++;
+ in_line[i] = '\0';
+ convert_line(in_line, out_line);
+ pline("%s", out_line);
+ }
}
static void
const char *section;
const char *msgid;
{
- const char *const howtoput[] = { "pline", "window", "menu", NULL };
- const int howtoput2i[] = { 1, 2, 3, 0 };
+ const char *const howtoput[] = { "pline", "window", "text", "menu", "default", NULL };
+ const int howtoput2i[] = { 1, 2, 2, 3, 0, 0 };
int output;
lua_State *L;
char *synopsis;
synopsis = get_table_str_opt(L, "synopsis", NULL);
text = get_table_str_opt(L, "text", NULL);
- output = howtoput2i[get_table_option(L, "output", "pline", howtoput)];
+ output = howtoput2i[get_table_option(L, "output", "default", howtoput)];
if (!synopsis && !text) {
int nelems;
text = dupstr(luaL_checkstring(L, -1));
}
- if ((index(text, '\n') || (strlen(text) >= (BUFSZ - 1))) && output == 1)
+ if (output == 0 && (index(text, '\n') || (strlen(text) >= (BUFSZ - 1))))
output = 2;
- if (output == 1)
+ if (output == 0 || output == 1)
deliver_by_pline(text);
else if (output == 3)
deliver_by_window(text, NHW_MENU);