summaryrefslogtreecommitdiff
path: root/npc/024-16
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2019-06-07 11:48:30 -0300
committerJesusaves <cpntb1@ymail.com>2019-06-07 11:48:30 -0300
commitf6531ec393f2de67142d357ddf58d3aa634962ef (patch)
treec9bd87756da80e7c8d3b02ddf57ebc7b0a477726 /npc/024-16
parent645955dc68ba01f89d31ee2b40d60074700b883c (diff)
downloadserverdata-f6531ec393f2de67142d357ddf58d3aa634962ef.tar.gz
serverdata-f6531ec393f2de67142d357ddf58d3aa634962ef.tar.bz2
serverdata-f6531ec393f2de67142d357ddf58d3aa634962ef.tar.xz
serverdata-f6531ec393f2de67142d357ddf58d3aa634962ef.zip
Prevent bugs of skill going above max level.
Diffstat (limited to 'npc/024-16')
-rw-r--r--npc/024-16/craftsman.txt8
1 files changed, 5 insertions, 3 deletions
diff --git a/npc/024-16/craftsman.txt b/npc/024-16/craftsman.txt
index d3e14ab81..477ce4069 100644
--- a/npc/024-16/craftsman.txt
+++ b/npc/024-16/craftsman.txt
@@ -28,7 +28,7 @@
mes "";
select
rif(!CRAFTING_SCORE, l("How can I complete a craft?")),
- rif(calcRequisites(), l("Learn crafting for @@ GP", format_number(calcPrices())) ),
+ rif(CRAFTING_SCORE >= calcRequisites(), l("Learn crafting for @@ GP", format_number(calcPrices())) ),
l("Nothing for now, thanks.");
mes "";
switch (@menu) {
@@ -42,7 +42,7 @@
mesq l("There you go. Craft hard, mwhahahahaha!");
} else {
mesn;
- mesq l("You don't have met all requisites, like money and successful crafts.");
+ mesq l("You don't have met all requisites, like money and successful crafts, or you already reached the maximum level for this skill.");
}
break;
}
@@ -67,7 +67,7 @@ function calcRequisites {
case 6:
return 32;
}
- return false;
+ return -1;
}
// Calc how much GP the skill will cost you
@@ -101,6 +101,8 @@ function calcUpgrade {
return false;
if (CRAFTING_SCORE < .@cf)
return false;
+ if (.@cf < 0)
+ return false;
Zeny-=.@gp;
skill TMW2_CRAFT, getskilllv(TMW2_CRAFT)+1, 0;