summaryrefslogtreecommitdiff
path: root/npc/functions/util.txt
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2020-07-03 02:05:29 -0300
committerJesusaves <cpntb1@ymail.com>2020-07-03 02:05:29 -0300
commitd0507c2901a105027003a4e10a0eb8aea33219c4 (patch)
treeffba31b46a31aa54d278156256ce5a0ec1bfded3 /npc/functions/util.txt
parentae8988ab08430ccd4b343d27933d103514ddad1e (diff)
downloadserverdata-d0507c2901a105027003a4e10a0eb8aea33219c4.tar.gz
serverdata-d0507c2901a105027003a4e10a0eb8aea33219c4.tar.bz2
serverdata-d0507c2901a105027003a4e10a0eb8aea33219c4.tar.xz
serverdata-d0507c2901a105027003a4e10a0eb8aea33219c4.zip
Fix several obscure bugs
Diffstat (limited to 'npc/functions/util.txt')
-rw-r--r--npc/functions/util.txt15
1 files changed, 10 insertions, 5 deletions
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);
}