summaryrefslogtreecommitdiff
path: root/npc/functions/openbook.txt
diff options
context:
space:
mode:
authorgumi <mekolat@users.noreply.github.com>2017-01-15 12:11:40 -0500
committergumi <mekolat@users.noreply.github.com>2017-01-17 14:04:55 -0500
commitd20db213bb679b3daded777259144e48af0b23a4 (patch)
tree99a5322b67f1aeb4dd1227eb4e69fddbcbeaaaf6 /npc/functions/openbook.txt
parent1dfe4d358d88e1cbe87c3b5ef7e4467023db0544 (diff)
downloadserverdata-d20db213bb679b3daded777259144e48af0b23a4.tar.gz
serverdata-d20db213bb679b3daded777259144e48af0b23a4.tar.bz2
serverdata-d20db213bb679b3daded777259144e48af0b23a4.tar.xz
serverdata-d20db213bb679b3daded777259144e48af0b23a4.zip
make openbook inherit book name from calling npc
Diffstat (limited to 'npc/functions/openbook.txt')
-rw-r--r--npc/functions/openbook.txt12
1 files changed, 8 insertions, 4 deletions
diff --git a/npc/functions/openbook.txt b/npc/functions/openbook.txt
index 8e7be072..9153900e 100644
--- a/npc/functions/openbook.txt
+++ b/npc/functions/openbook.txt
@@ -7,21 +7,25 @@
// @book_name$ = The name of the book to read.
function script openbook {
- .@book_name$ = "\"" + l(getarg(0, @book_name$)) + "\"";
+ .@book_name$ = "\"" + l(getarg(0, getvariableofnpc(.book_name$, strnpcinfo(0)))) + "\"";
narrator 4,
- l("You open a book named @@.", .@book_name$),
+ l("You open a book named @@.", .@book_name$);
+
+ narrator 8,
l("Do you want to read it?");
return (select ("Yes.", "No.") == 1);
}
function script openbookshelf {
- .@book_name$ = "\"" + l(getarg(0, @book_name$)) + "\"";
+ .@book_name$ = "\"" + l(getarg(0, getvariableofnpc(.book_name$, strnpcinfo(0)))) + "\"";
narrator 4,
l("You see a dust covered book on the shelf..."),
- l("The name of the book is @@.", .@book_name$),
+ l("The name of the book is @@.", .@book_name$);
+
+ narrator 8,
l("Do you want to read it?");
return (select ("Yes.", "No.") == 1);