From a595cedb07e4306b3b44e5f8f05a0c26f3c4ad75 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Wed, 14 Mar 2018 14:09:36 -0300 Subject: New books --- npc/functions/openbook.txt | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) (limited to 'npc/functions/openbook.txt') 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); } -- cgit v1.2.3-60-g2f50