From 0938190724314e214c728a7089e2e79160bb8b14 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Fri, 24 May 2019 15:44:10 -0300 Subject: Okay, this is enough to test :3 --- npc/003-0/wizard.txt | 28 ++++++---------------------- 1 file changed, 6 insertions(+), 22 deletions(-) diff --git a/npc/003-0/wizard.txt b/npc/003-0/wizard.txt index 284961f78..6891ccab9 100644 --- a/npc/003-0/wizard.txt +++ b/npc/003-0/wizard.txt @@ -72,28 +72,12 @@ L_Member: mesc l("Drains Mana to reduce damage taken. The only defensive skill from wizards."); mes ""; mesn; - mesq l("This useful skill will only require:"); - mesc l("@@/@@ @@", countitem(Tentacles), (getskilllv(MG_ENERGYCOAT)+1)*10, getitemlink(Tentacles)); - mesc l("@@/@@ @@", countitem(MushroomSpores), (getskilllv(MG_ENERGYCOAT)+1)*5, getitemlink(MushroomSpores)); - mesc l("@@/@@ @@", countitem(WolvernTooth), (getskilllv(MG_ENERGYCOAT)+1)*3, getitemlink(WolvernTooth)); - mesc l("@@/@@ @@", countitem(RedScorpionClaw), (getskilllv(MG_ENERGYCOAT)+1)*1, getitemlink(RedScorpionClaw)); - next; - if (askyesno() == ASK_YES) { - if ( - countitem(Tentacles) < (getskilllv(MG_ENERGYCOAT)+1)*10 || - countitem(MushroomSpores) < (getskilllv(MG_ENERGYCOAT)+1)*5 || - countitem(WolvernTooth) < (getskilllv(MG_ENERGYCOAT)+1)*3 || - countitem(RedScorpionClaw) < (getskilllv(MG_ENERGYCOAT)+1)*1) goto L_Missing; - - delitem Tentacles, (getskilllv(MG_ENERGYCOAT)+1)*10; - delitem MushroomSpores, (getskilllv(MG_ENERGYCOAT)+1)*5; - delitem WolvernTooth, (getskilllv(MG_ENERGYCOAT)+1)*3; - delitem RedScorpionClaw, (getskilllv(MG_ENERGYCOAT)+1)*1; - - sk_lvup(MG_ENERGYCOAT); - - next; - } + if (!mlearn(MG_ENERGYCOAT, + Tentacles, 10, + MushroomSpores, 5, + WolvernTooth, 3, + RedScorpionClaw, 1)) + goto L_Missing; break; case 2: mesc l("[Napalm Beat]"); -- cgit v1.2.3-60-g2f50