summaryrefslogtreecommitdiff
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
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.
-rw-r--r--npc/commands/ucp.txt13
-rw-r--r--npc/items/books.txt27
2 files changed, 38 insertions, 2 deletions
diff --git a/npc/commands/ucp.txt b/npc/commands/ucp.txt
index c7f92d906..19033089e 100644
--- a/npc/commands/ucp.txt
+++ b/npc/commands/ucp.txt
@@ -244,6 +244,14 @@ function script UserCtrlPanel {
mes l("Tutorial Protips: ") + col(l("Enabled"), 2);
+ // GSET_NOSCRY
+ // Should players be allowed to scry your information?
+ if (GSET_NOSCRY)
+ mes l("Others scrying you: ") + col(l("Not allowed"), 1);
+ else
+ mes l("Others scrying you: ") + col(l("Allowed"), 2);
+
+
if ($EVENT$ == "Valentine") {
// GSET_VALENTINE_EATONE
// Eat all Chocolate Boxes from Valentine Day event
@@ -279,6 +287,7 @@ function script UserCtrlPanel {
l("Lethal alcohol overdrinking"),
l("Change crafting method"),
l("Show Tutorial Protips"),
+ l("Others scrying your char data"),
rif($EVENT$ == "Valentine", ("Valentine Eating")),
rif(strcharinfo(2) == "Monster King", ("Toggle Autoreceive Event Coins"));
mes "";
@@ -322,8 +331,10 @@ function script UserCtrlPanel {
case 9:
TUTORIAL=!TUTORIAL; break;
case 10:
- GSET_VALENTINE_EATALL=!GSET_VALENTINE_EATALL; break;
+ GSET_NOSCRY=!GSET_NOSCRY; break;
case 11:
+ GSET_VALENTINE_EATALL=!GSET_VALENTINE_EATALL; break;
+ case 12:
GSET_AUTORECEIVE_COINS=!GSET_AUTORECEIVE_COINS; break;
}
clear;
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;
}