From d78fd4be981fbc36b51a26e042029602c61a1754 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Fri, 6 May 2022 23:11:52 -0300 Subject: Expand Scry with magic data. Admins can now use scry to obtain more data. --- npc/items/books.txt | 31 +++++++++++++++++++++++-------- 1 file changed, 23 insertions(+), 8 deletions(-) (limited to 'npc/items/books.txt') 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; -- cgit v1.2.3-60-g2f50