summaryrefslogtreecommitdiff
path: root/npc/003-0/wizard.txt
diff options
context:
space:
mode:
Diffstat (limited to 'npc/003-0/wizard.txt')
-rw-r--r--npc/003-0/wizard.txt64
1 files changed, 14 insertions, 50 deletions
diff --git a/npc/003-0/wizard.txt b/npc/003-0/wizard.txt
index 6891ccab9..bc011002f 100644
--- a/npc/003-0/wizard.txt
+++ b/npc/003-0/wizard.txt
@@ -119,62 +119,26 @@ L_Member:
mesc l("Causes a @@ bolt on the enemy. Number of hits is the skill level.", .@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)*8, getitemlink(FluoPowder));
- mesc l("@@/@@ @@", countitem(HerbalTea), (getskilllv(.@Skill)+1)*3, getitemlink(HerbalTea));
- mesc l("@@/@@ @@", countitem(DiamondPowder),(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)*8 ||
- countitem(HerbalTea) < (getskilllv(.@Skill)+1)*3 ||
- countitem(DiamondPowder) < (getskilllv(.@Skill)+1)*2 ||
- countitem(.@ItemB) < (getskilllv(.@Skill)+1)*1) goto L_Missing;
-
- delitem .@Item, (getskilllv(.@Skill)+1)*30;
- delitem FluoPowder, (getskilllv(.@Skill)+1)*8;
- delitem HerbalTea, (getskilllv(.@Skill)+1)*3;
- delitem DiamondPowder, (getskilllv(.@Skill)+1)*2;
- delitem .@ItemB, (getskilllv(.@Skill)+1)*1;
-
- sk_lvup(.@Skill);
-
- next;
- }
+ if (!mlearn(.@Skill,
+ .@Item, 30,
+ FluoPowder, 8,
+ HerbalTea, 3,
+ DiamondPowder, 2,
+ .@ItemB, 1))
+ goto L_Missing;
break;
case 7:
mesc l("[Fire Ball]");
mesc l("Standard fireball skill.");
mes "";
mesn;
- mesq l("This useful skill will only require:");
- mesc l("@@/@@ @@", countitem(Curshroom), (getskilllv(MG_FIREBALL)+1)*10, getitemlink(Curshroom));
- mesc l("@@/@@ @@", countitem(SulfurPowder), (getskilllv(MG_FIREBALL)+1)*10, getitemlink(SulfurPowder));
- mesc l("@@/@@ @@", countitem(FluoPowder), (getskilllv(MG_FIREBALL)+1)*10, getitemlink(FluoPowder));
- mesc l("@@/@@ @@", countitem(PolishedRuby), (getskilllv(MG_FIREBALL)+1)*3, getitemlink(PolishedRuby));
- mesc l("@@/@@ @@", countitem(HerbalTea), (getskilllv(MG_FIREBALL)+1)*1, getitemlink(HerbalTea));
- next;
- if (askyesno() == ASK_YES) {
- if (
- countitem(Curshroom) < (getskilllv(MG_FIREBALL)+1)*10 ||
- countitem(SulfurPowder) < (getskilllv(MG_FIREBALL)+1)*10 ||
- countitem(FluoPowder) < (getskilllv(MG_FIREBALL)+1)*10 ||
- countitem(PolishedRuby) < (getskilllv(MG_FIREBALL)+1)*3 ||
- countitem(HerbalTea) < (getskilllv(MG_FIREBALL)+1)*1) goto L_Missing;
-
- delitem Curshroom, (getskilllv(MG_FIREBALL)+1)*10;
- delitem SulfurPowder, (getskilllv(MG_FIREBALL)+1)*10;
- delitem FluoPowder, (getskilllv(MG_FIREBALL)+1)*10;
- delitem PolishedRuby, (getskilllv(MG_FIREBALL)+1)*3;
- delitem HerbalTea, (getskilllv(MG_FIREBALL)+1)*1;
-
- sk_lvup(MG_FIREBALL);
-
- next;
- }
+ if (!mlearn(MG_FIREBALL,
+ Curshroom, 10,
+ SulfurPowder, 10,
+ FluoPowder, 10,
+ PolishedRuby, 3,
+ HerbalTea, 1))
+ goto L_Missing;
break;
case 8:
// All skills related may include the basic class skills if they're related.