diff options
author | Jesusaves <cpntb1@ymail.com> | 2019-05-29 16:53:40 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2019-05-29 16:53:40 -0300 |
commit | 4d6d99d9117b1de60bb8ac1f55e2dcafdd3095c5 (patch) | |
tree | 249ff303d4672be7e5b134c63e6b4d7385331d6c /npc/craft/options.txt | |
parent | 0aa42d239b33b7a433f2a9e0b3399177fac26ad1 (diff) | |
download | serverdata-4d6d99d9117b1de60bb8ac1f55e2dcafdd3095c5.tar.gz serverdata-4d6d99d9117b1de60bb8ac1f55e2dcafdd3095c5.tar.bz2 serverdata-4d6d99d9117b1de60bb8ac1f55e2dcafdd3095c5.tar.xz serverdata-4d6d99d9117b1de60bb8ac1f55e2dcafdd3095c5.zip |
We now have the functions to build the menu. Now we need to really build it.
Diffstat (limited to 'npc/craft/options.txt')
-rw-r--r-- | npc/craft/options.txt | 50 |
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 ""; +} + |