diff options
Diffstat (limited to 'npc/items/books.txt')
-rw-r--r-- | npc/items/books.txt | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/npc/items/books.txt b/npc/items/books.txt index 5d68ac7e2..18f27ad7e 100644 --- a/npc/items/books.txt +++ b/npc/items/books.txt @@ -163,6 +163,7 @@ OnInit: end; function myself { + .@all = getarg(0, true); mes ".:: " + strcharinfo(0) + " ::."; if (getcharid(1)) mesc l("Party Name: @@", strcharinfo(1)); @@ -214,7 +215,8 @@ function myself { .@pos=getguildrole(.@gid, getcharid(3)); mesc l("Current Guild: %s", getguildname(.@gid)); mesc l("Guild Master: @@", getguildmaster(.@gid)); - mesc l("You are the guild's \"%s\", and you contribute with %02d%% EXP.", + if (.@all) + mesc l("You are the guild's \"%s\", and you contribute with %02d%% EXP.", getguildpostitle(.@gid, .@pos), getguildpostax(.@gid, .@pos)); } @@ -246,6 +248,28 @@ function myself { return; } +OnScry: + if (!countitem(JesusalvaGrimorium) && !is_staff()) + end; + .@w$ = implode(.@atcmd_parameters$, " "); + if (.@w$ == "") + .@w$ = strcharinfo(0); + .@me = getcharid(3); + .@id = getcharid(3, .@w$); + if (!.@id) { + mesc l("The requested char is not online or does not exist."), 1; + close; + } + setnpcdialogtitle sprintf("@scry %s", .@w$); + attachrid(.@id); + if (!GSET_NOSCRY) + myself(false); + else + mesc l("%s has protected themselves from prying eyes. Your scry attempt failed.", strcharinfo(0)), 1; + detachrid(); + attachrid(.@me); + close; + function read_book { setnpcdialogtitle l(.book_name$); @@ -402,6 +426,7 @@ OnInit: .book_name$ = getitemname(JesusalvaGrimorium); .sex = G_OTHER; .distance = 1; + bindatcmd "scry", "#Book-JGrimorium::OnScry", 0, 99, 0; end; } |