summaryrefslogtreecommitdiff
path: root/npc
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2020-06-25 06:40:01 -0300
committerJesusaves <cpntb1@ymail.com>2020-06-25 06:40:01 -0300
commit14a0487a49e0a0bcba13f370cba8ecfbd5577a97 (patch)
treeb782f47b52e5bdbebf6f14f837bb583ae0692767 /npc
parent24bad6a171378e652a71b33a1f4d34549987fa6d (diff)
downloadserverdata-14a0487a49e0a0bcba13f370cba8ecfbd5577a97.tar.gz
serverdata-14a0487a49e0a0bcba13f370cba8ecfbd5577a97.tar.bz2
serverdata-14a0487a49e0a0bcba13f370cba8ecfbd5577a97.tar.xz
serverdata-14a0487a49e0a0bcba13f370cba8ecfbd5577a97.zip
Update Trickmaster to new magic learning interface
Diffstat (limited to 'npc')
-rw-r--r--npc/003-0/trickmaster.txt16
-rw-r--r--npc/config/magic.txt19
-rw-r--r--npc/functions/util.txt4
3 files changed, 29 insertions, 10 deletions
diff --git a/npc/003-0/trickmaster.txt b/npc/003-0/trickmaster.txt
index 7bf14f51e..8a4bf345d 100644
--- a/npc/003-0/trickmaster.txt
+++ b/npc/003-0/trickmaster.txt
@@ -31,36 +31,36 @@
// Handle result
switch (@menuret) {
case TMW2_MANABOMB:
- if (!mlearn(TMW2_MANABOMB, 1, 1, SulfurPowder, 1))
+ if (!learn_magic(TMW2_MANABOMB))
mesc l("You do not meet all requisites for this skill."), 1;
break;
case TF_BACKSLIDING:
- if (!mlearn(TF_BACKSLIDING, 1, 1, Lockpicks, 1))
+ if (!learn_magic(TF_BACKSLIDING))
mesc l("You do not meet all requisites for this skill."), 1;
break;
case MG_FIREWALL:
- if (!mlearn(MG_FIREWALL, 10, 1, Lockpicks, 1))
+ if (!learn_magic(MG_FIREWALL))
mesc l("You do not meet all requisites for this skill."), 1;
break;
case AC_VULTURE:
- if (!mlearn(AC_VULTURE, 1, 1, Lockpicks, 1))
+ if (!learn_magic(AC_VULTURE))
mesc l("You do not meet all requisites for this skill."), 1;
break;
case SA_FREECAST:
- if (!mlearn(SA_FREECAST, 1, 1, Lockpicks, 1))
+ if (!learn_magic(SA_FREECAST))
mesc l("You do not meet all requisites for this skill."), 1;
break;
case ALL_FULL_THROTTLE:
- if (!mlearn(ALL_FULL_THROTTLE, 1, 1, Lockpicks, 1))
+ if (!learn_magic(ALL_FULL_THROTTLE))
mesc l("You do not meet all requisites for this skill."), 1;
break;
case GC_DARKILLUSION:
- if (!mlearn(GC_DARKILLUSION, 3, 2, Lockpicks, 1))
+ if (!learn_magic(GC_DARKILLUSION))
mesc l("You do not meet all requisites for this skill."), 1;
break;
case NV_TRICKDEAD:
- if (!mlearn(NV_TRICKDEAD, 1, 2, Lockpicks, 1))
+ if (!learn_magic(NV_TRICKDEAD))
mesc l("You do not meet all requisites for this skill."), 1;
break;
default:
diff --git a/npc/config/magic.txt b/npc/config/magic.txt
index 8b7cf25bc..54128fecd 100644
--- a/npc/config/magic.txt
+++ b/npc/config/magic.txt
@@ -282,6 +282,25 @@ OnInit:
//////////////////////// Destructive Magic
//////////////////////// Trickmaster
+ /* RegisterMagic(MSP, Skill, MaxLv, Item, Amount,
+ Class, Cost, {PreReq, PostReq}) */
+ RegisterMagic(1, TMW2_MANABOMB, 10, SulfurPowder, 1,
+ CLASS_TRICKS, 0);
+ RegisterMagic(1, TF_BACKSLIDING, 1, Lockpicks, 1,
+ CLASS_TRICKS, 0);
+ RegisterMagic(1, MG_FIREWALL, 10, Lockpicks, 1,
+ CLASS_TRICKS, 0);
+ RegisterMagic(1, AC_VULTURE, 1, Lockpicks, 1,
+ CLASS_TRICKS, 0);
+ RegisterMagic(1, SA_FREECAST, 1, Lockpicks, 1,
+ CLASS_TRICKS, 0);
+ RegisterMagic(1, ALL_FULL_THROTTLE, 1, Lockpicks, 1,
+ CLASS_TRICKS, 0);
+ RegisterMagic(2, GC_DARKILLUSION, 3, Lockpicks, 1,
+ CLASS_TRICKS, 0);
+ RegisterMagic(2, NV_TRICKDEAD, 1, Lockpicks, 1,
+ CLASS_TRICKS, 0);
+
//////////////////////// Other: Summonning
//////////////////////// Other: Misc
// Chargd Shot
diff --git a/npc/functions/util.txt b/npc/functions/util.txt
index 73218f5f9..2abb6c9bc 100644
--- a/npc/functions/util.txt
+++ b/npc/functions/util.txt
@@ -733,7 +733,7 @@ function script learn_magic {
// Max level reached
if (getskilllv(.@ski) >= .@mlv) {
mesc l("You've reached the maximum level for this skill."), 1;
- return false;
+ return true;
}
// Skill level check
@@ -766,7 +766,7 @@ function script mlearn {
.@ap=getarg(5, 0);
// Max level reached
if (getskilllv(.@sk) >= .@ff) {
- return false;
+ return true;
}
// Not enough items
if (countitem(.@it) < .@am && !(countitem(ScholarshipBadge)))