summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--npc/craft/options.txt50
1 files changed, 38 insertions, 12 deletions
diff --git a/npc/craft/options.txt b/npc/craft/options.txt
index 27ca1bc9e..d1384a21e 100644
--- a/npc/craft/options.txt
+++ b/npc/craft/options.txt
@@ -545,16 +545,6 @@ function script csysGUI_OptToogleMenu {
}
-// csysGUI_OptToogleMenu( cr )
-// Returns a Toogle Menu for option group (CR)
-function script csysGUI_GroupOpt {
- .@sk=getarg(0);
- if (csysGUI_OptReq(.@sk))
- .@ms$=""
- return ":";
-}
-
-
// csysGUI_OptReq( cr )
// Return true if all requisites for Option were met
function script csysGUI_OptReq {
@@ -635,11 +625,47 @@ function script csysGUI_OptReq {
// Return group option price and requisites
function script csysGUI_OptPrice {
.@sk=getarg(0);
+ .@lv=getd("CRAFTSYS["+.@sk+"]");
switch (.@sk) {
+ case CRGROUP_BASE:
+ return 1000*.@lv;
+ // Tier 1
+ case CRGROUP_ATK:
+ case CRGROUP_DEF:
+ case CRGROUP_ACC:
+ case CRGROUP_EVD:
+ return 10000*.@lv;
+ // Tier 2
+ case CRGROUP_REGEN:
+ case CRGROUP_SPEED:
+ case CRGROUP_DOUBLE:
+ case CRGROUP_MAXPC:
+ return 40000*.@lv;
+ // Tier 3
+ case CRGROUP_SCRESIST:
+ case CRGROUP_SCINFLICT:
+ case CRGROUP_MANAUSE:
+ case CRGROUP_BOSSATK:
+ return 120000*.@lv;
+ // Final
+ case CRGROUP_FINAL:
+ return 200000*.@lv;
+ default:
+ return Exception("Invalid optprice group: "+.@cr);
}
-
- return ":";
+ return Exception("Definitely Invalid optprice group: "+.@cr);
}
+// csysGUI_GroupOpt( cr )
+// Returns the menu entry to learn the group skill.
+// Cost is NOT taken as requisite, must check it later.
+function script csysGUI_GroupOpt {
+ .@sk=getarg(0);
+ if (csysGUI_OptReq(.@sk)) {
+ .@ms$="Upgrade "+csysGUI_CRName(.@sk)+" for "+csysGUI_OptPrice(.@sk)+" Mobpt";
+ }
+ return "";
+}
+