diff options
author | Jesusaves <cpntb1@ymail.com> | 2019-05-29 10:13:02 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2019-05-29 10:13:02 -0300 |
commit | 4b0117a685b92a64c3c91fd3fdceff001e77882d (patch) | |
tree | 9e6e0a1c4af375ee045ee73909dae94890c775e2 /npc/003-0/sage.txt | |
parent | 5e79ad377e93967ce7ea4a54bdb8954033664f34 (diff) | |
download | serverdata-4b0117a685b92a64c3c91fd3fdceff001e77882d.tar.gz serverdata-4b0117a685b92a64c3c91fd3fdceff001e77882d.tar.bz2 serverdata-4b0117a685b92a64c3c91fd3fdceff001e77882d.tar.xz serverdata-4b0117a685b92a64c3c91fd3fdceff001e77882d.zip |
Sage entirely rewriten
Diffstat (limited to 'npc/003-0/sage.txt')
-rw-r--r-- | npc/003-0/sage.txt | 32 |
1 files changed, 7 insertions, 25 deletions
diff --git a/npc/003-0/sage.txt b/npc/003-0/sage.txt index 0d84de4d7..9df6a2dec 100644 --- a/npc/003-0/sage.txt +++ b/npc/003-0/sage.txt @@ -130,31 +130,13 @@ L_Member: mesc l("Temporaly switch weapon element to @@. Success rate is fixed at 70%.", .@Skill$); mes ""; mesn; - mesq l("This useful skill will only require:"); - mesc l("@@/@@ @@", countitem(.@Item), (getskilllv(.@Skill)+1)*30, getitemlink(.@Item)); - mesc l("@@/@@ @@", countitem(FluoPowder), (getskilllv(.@Skill)+1)*15, getitemlink(FluoPowder)); - mesc l("@@/@@ @@", countitem(HerbalTea), (getskilllv(.@Skill)+1)*3, getitemlink(HastePotion)); - mesc l("@@/@@ @@", countitem(WoodenLog), (getskilllv(.@Skill)+1)*2, getitemlink(DiamondPowder)); - mesc l("@@/@@ @@", countitem(.@ItemB), (getskilllv(.@Skill)+1)*1, getitemlink(.@ItemB)); - next; - if (askyesno() == ASK_YES) { - if ( - countitem(.@Item) < (getskilllv(.@Skill)+1)*30 || - countitem(FluoPowder) < (getskilllv(.@Skill)+1)*15 || - countitem(HerbalTea) < (getskilllv(.@Skill)+1)*3 || - countitem(WoodenLog) < (getskilllv(.@Skill)+1)*2 || - countitem(.@ItemB) < (getskilllv(.@Skill)+1)*1) goto L_Missing; - - delitem .@Item, (getskilllv(.@Skill)+1)*30; - delitem FluoPowder, (getskilllv(.@Skill)+1)*15; - delitem HerbalTea, (getskilllv(.@Skill)+1)*3; - delitem WoodenLog, (getskilllv(.@Skill)+1)*2; - delitem .@ItemB, (getskilllv(.@Skill)+1)*1; - - sk_lvup(.@Skill); - - next; - } + if (!mlearn(.@Skill, + .@Item, 30, + FluoPowder, 10, + WoodenLog, 5, + HerbalTea, 3, + .@ItemB, 1)) + goto L_Missing; break; case 8: // All skills related may include the basic class skills if they're related. |