summaryrefslogtreecommitdiff
path: root/npc
diff options
context:
space:
mode:
Diffstat (limited to 'npc')
-rw-r--r--npc/003-0/trickmaster.txt4
-rw-r--r--npc/027-1/luca.txt4
-rw-r--r--npc/027-1/saves.txt4
-rw-r--r--npc/027-2/colin.txt4
-rw-r--r--npc/functions/util.txt15
5 files changed, 22 insertions, 9 deletions
diff --git a/npc/003-0/trickmaster.txt b/npc/003-0/trickmaster.txt
index c1831077b..d3e1e1c29 100644
--- a/npc/003-0/trickmaster.txt
+++ b/npc/003-0/trickmaster.txt
@@ -32,8 +32,10 @@
// Handle result
mes "";
if (@menuret) {
- if (!learn_magic(@menuret))
+ if (!learn_magic(@menuret)) {
mesc l("You do not meet all requisites for this skill."), 1;
+ next;
+ }
} else {
closeclientdialog;
}
diff --git a/npc/027-1/luca.txt b/npc/027-1/luca.txt
index 96eb47433..d609acec9 100644
--- a/npc/027-1/luca.txt
+++ b/npc/027-1/luca.txt
@@ -35,8 +35,10 @@
// Handle result
mes "";
if (@menuret) {
- if (!learn_magic(@menuret))
+ if (!learn_magic(@menuret)) {
mesc l("You do not meet all requisites for this skill."), 1;
+ next;
+ }
} else {
closeclientdialog;
}
diff --git a/npc/027-1/saves.txt b/npc/027-1/saves.txt
index 18453ec61..8bffe9118 100644
--- a/npc/027-1/saves.txt
+++ b/npc/027-1/saves.txt
@@ -35,8 +35,10 @@
// Handle result
mes "";
if (@menuret) {
- if (!learn_magic(@menuret))
+ if (!learn_magic(@menuret)) {
mesc l("You do not meet all requisites for this skill."), 1;
+ next;
+ }
} else {
closeclientdialog;
}
diff --git a/npc/027-2/colin.txt b/npc/027-2/colin.txt
index c5fb69939..ac3d1f82e 100644
--- a/npc/027-2/colin.txt
+++ b/npc/027-2/colin.txt
@@ -48,8 +48,10 @@
// Handle result
mes "";
if (@menuret) {
- if (!learn_magic(@menuret))
+ if (!learn_magic(@menuret)) {
mesc l("You do not meet all requisites for this skill."), 1;
+ next;
+ }
} else {
closeclientdialog;
}
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);
}