From d0507c2901a105027003a4e10a0eb8aea33219c4 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Fri, 3 Jul 2020 02:05:29 -0300 Subject: Fix several obscure bugs --- npc/functions/util.txt | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'npc/functions') diff --git a/npc/functions/util.txt b/npc/functions/util.txt index 9b060898f..fb93ff074 100644 --- a/npc/functions/util.txt +++ b/npc/functions/util.txt @@ -782,19 +782,24 @@ function script learn_magic { } // Skill level check - if (getskilllv(.@sk)) { + if (getskilllv(.@ski)) { .@msp=50; // FIXME NYI .@learn$=l("Upgrading"); } mesc l("%s %s will require:", .@learn$, getskillname(.@ski)); - mes l("* %d/%d MSP (Magic Skill Points)", .@msp, sk_points()); - //mes l("* %d/%d AP (???)", .@ap, MAGIC_AP); - mes l("* %d/%d %s", .@am, countitem(.@it), getitemlink(.@it)); + mes l("* %d/%d MSP (Magic Skill Points)", sk_points(), .@msp); + //mes l("* %d/%d AP (???)", MAGIC_AP, .@ap); + if (countitem(.@it) < .@am) { + mesc l("~~%d/%d %s~~", countitem(.@it), .@am, getitemlink(.@it)), 8; + mes l("* %d/%d %s", countitem(ScholarshipBadge), 1, getitemlink(ScholarshipBadge)); + } else { + mes l("* %d/%d %s", countitem(.@it), .@am, getitemlink(.@it)); + } mes ""; mesc l("Really learn this skill?"); if (askyesno() == ASK_NO) - return false; + return true; return mlearn(.@ski, .@mlv, .@msp, .@it, .@am); } -- cgit v1.2.3-70-g09d2