summaryrefslogtreecommitdiff
path: root/npc/functions/openbook.txt
blob: c35fbf2726b8ee5dbd9da86009d1e61894ff9a11 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
// Evol functions.
// Author:
//    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)))) + "\"";

    mesc l("You open a book named @@. Do you want to read it?", .@book_name$);
    next;

    return (askyesno() == ASK_YES);
}

function	script	openbookshelf	{
    .@book_name$ = "\"" + l(getarg(0, getvariableofnpc(.book_name$, strnpcinfo(0)))) + "\"";

    narrator S_LAST_NEXT,
        l("You see a dust covered book on the shelf... The name of the book is @@.", .@book_name$),
        l("Do you want to read it?");

    return (askyesno() == ASK_YES);
}