summaryrefslogtreecommitdiff
path: root/npc/functions/openbook.txt
diff options
context:
space:
mode:
Diffstat (limited to 'npc/functions/openbook.txt')
-rw-r--r--npc/functions/openbook.txt18
1 files changed, 8 insertions, 10 deletions
diff --git a/npc/functions/openbook.txt b/npc/functions/openbook.txt
index 0278415c..cb1a0b11 100644
--- a/npc/functions/openbook.txt
+++ b/npc/functions/openbook.txt
@@ -3,26 +3,24 @@
// Reid
// Description:
// Narrator dialogue to show the selected book.
-// Variables:
-// @book_name$ = The name of the book to read.
function script openbook {
- .@book_name$ = "\"" + l(getarg(0, getvariableofnpc(.book_name$, strnpcinfo(0)))) + "\"";
+ .@book_name$ = getarg(0, getvariableofnpc(.book_name$, strnpcinfo(0)));
- narrator S_LAST_NEXT,
- l("You open a book named @@.", .@book_name$),
- l("Do you want to read it?");
+ narrator(S_LAST_NEXT,
+ l("You open a book named \"%s\".", .@book_name$),
+ l("Do you want to read it?"));
return (select("Yes.", "No.") == 1);
}
function script openbookshelf {
- .@book_name$ = "\"" + l(getarg(0, getvariableofnpc(.book_name$, strnpcinfo(0)))) + "\"";
+ .@book_name$ = getarg(0, getvariableofnpc(.book_name$, strnpcinfo(0)));
- narrator S_LAST_NEXT,
+ narrator(S_LAST_NEXT,
l("You see a dust covered book on the shelf..."),
- l("The name of the book is @@.", .@book_name$),
- l("Do you want to read it?");
+ l("The name of the book is \"%s\".", .@book_name$),
+ l("Do you want to read it?"));
return (select("Yes.", "No.") == 1);
}