summaryrefslogtreecommitdiff
path: root/npc/items
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2021-12-26 13:12:10 -0300
committerJesusaves <cpntb1@ymail.com>2021-12-26 13:12:10 -0300
commit508496d7e9a688164e3c1f81efbe1129a707f41a (patch)
tree023e307b16cab4d58df06c61be9326d26f932419 /npc/items
parent4c73065ec4ab64923d05cf6080d4eb0bbd04de63 (diff)
downloadserverdata-508496d7e9a688164e3c1f81efbe1129a707f41a.tar.gz
serverdata-508496d7e9a688164e3c1f81efbe1129a707f41a.tar.bz2
serverdata-508496d7e9a688164e3c1f81efbe1129a707f41a.tar.xz
serverdata-508496d7e9a688164e3c1f81efbe1129a707f41a.zip
Allow scrying once you obtain the Grimorium.
This allows you to see other players data.
Diffstat (limited to 'npc/items')
-rw-r--r--npc/items/books.txt27
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;
}