summaryrefslogtreecommitdiff
path: root/npc/items
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2022-05-06 23:11:52 -0300
committerJesusaves <cpntb1@ymail.com>2022-05-06 23:11:52 -0300
commitd78fd4be981fbc36b51a26e042029602c61a1754 (patch)
treeccd3ae0749019fe3b22bdb0c16daea125ab6afe4 /npc/items
parent5ba69b775b1c364c4ba7d8ecd67a03267914bc27 (diff)
downloadserverdata-d78fd4be981fbc36b51a26e042029602c61a1754.tar.gz
serverdata-d78fd4be981fbc36b51a26e042029602c61a1754.tar.bz2
serverdata-d78fd4be981fbc36b51a26e042029602c61a1754.tar.xz
serverdata-d78fd4be981fbc36b51a26e042029602c61a1754.zip
Expand Scry with magic data. Admins can now use scry to obtain more data.
Diffstat (limited to 'npc/items')
-rw-r--r--npc/items/books.txt31
1 files changed, 23 insertions, 8 deletions
diff --git a/npc/items/books.txt b/npc/items/books.txt
index 7dd99a736..d3fc75d8a 100644
--- a/npc/items/books.txt
+++ b/npc/items/books.txt
@@ -345,18 +345,33 @@ function myself {
mesc l("Born %s ago", FuzzyTime(.@born));
dnext;
- // FIXME
- if (.@who != .@why) return 0;
+ /* Magic Data */
+ detachrid();
+ attachrid(.@who);
+ .@lvl = MAGIC_LVL;
+ .@rank$ = academicrank();
+ if (.@all) {
+ .@rp$ = fnum(MAGIC_RP);
+ .@sp = sk_points();
+ .@msp = sk_maxpoints();
+ } else {
+ .@rp$ = "?";
+ }
+ detachrid();
+ attachrid(.@why);
mes ".:: " + l("Magic Status") + " ::.";
- mesc l("Current magic rank: %d", MAGIC_LVL);
+ mesc l("Current magic rank: %d", .@lvl);
if (.@all)
mesc l("You have @@/@@ magic skill points available.",
- b(sk_points()), sk_maxpoints());
+ b(.@sp), .@msp);
mesc l("Your current scholar rank: %s (%s Research Points)",
- academicrank(), fnum(MAGIC_RP));
- ShowAbizit(true);
+ .@rank$, .@rp$);
+ if (.@who == .@why)
+ ShowAbizit(true);
dnext;
+ // FIXME
+ if (.@who != .@why) return 0;
mes ".:: " + l("Rogue Status") + " ::.";
@@ -449,7 +464,7 @@ function myself {
}
OnScry:
- if (!countitem(JesusalvaGrimorium))
+ if (!countitem(JesusalvaGrimorium) && !is_staff())
end;
.@w$ = implode(.@atcmd_parameters$, " ");
if (.@w$ == "" || .@w$ == "NULL")
@@ -462,7 +477,7 @@ OnScry:
}
/* attachrid() + mes() is a no-go for this */
setnpcdialogtitle sprintf("@scry %s", .@w$);
- if (myself(false, .@id)) {
+ if (myself(is_admin(), .@id)) {
mesc l("%s has protected themselves from prying eyes. Your scry attempt failed.", .@w$), 1;
}
close;