diff options
author | Jesusaves <cpntb1@ymail.com> | 2020-07-03 02:05:29 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2020-07-03 02:05:29 -0300 |
commit | d0507c2901a105027003a4e10a0eb8aea33219c4 (patch) | |
tree | ffba31b46a31aa54d278156256ce5a0ec1bfded3 /npc | |
parent | ae8988ab08430ccd4b343d27933d103514ddad1e (diff) | |
download | serverdata-d0507c2901a105027003a4e10a0eb8aea33219c4.tar.gz serverdata-d0507c2901a105027003a4e10a0eb8aea33219c4.tar.bz2 serverdata-d0507c2901a105027003a4e10a0eb8aea33219c4.tar.xz serverdata-d0507c2901a105027003a4e10a0eb8aea33219c4.zip |
Fix several obscure bugs
Diffstat (limited to 'npc')
-rw-r--r-- | npc/003-0/trickmaster.txt | 4 | ||||
-rw-r--r-- | npc/027-1/luca.txt | 4 | ||||
-rw-r--r-- | npc/027-1/saves.txt | 4 | ||||
-rw-r--r-- | npc/027-2/colin.txt | 4 | ||||
-rw-r--r-- | npc/functions/util.txt | 15 |
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); } |