summaryrefslogtreecommitdiff
path: root/npc/003-0
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2019-07-19 18:59:20 -0300
committerJesusaves <cpntb1@ymail.com>2019-07-19 18:59:20 -0300
commit490b3ef02d6420c78f19f5525443bce393252b3e (patch)
treea354c6629179cdb7d4a220297fe32c6565e81633 /npc/003-0
parent0c7de4dc5c467e7d81035c8eb7a91bd8dd513dbf (diff)
downloadserverdata-490b3ef02d6420c78f19f5525443bce393252b3e.tar.gz
serverdata-490b3ef02d6420c78f19f5525443bce393252b3e.tar.bz2
serverdata-490b3ef02d6420c78f19f5525443bce393252b3e.tar.xz
serverdata-490b3ef02d6420c78f19f5525443bce393252b3e.zip
Reintroduce mlearn(), and optimize the code.
Diffstat (limited to 'npc/003-0')
-rw-r--r--npc/003-0/trickmaster.txt22
1 files changed, 6 insertions, 16 deletions
diff --git a/npc/003-0/trickmaster.txt b/npc/003-0/trickmaster.txt
index 538fbce0e..b9f61ae60 100644
--- a/npc/003-0/trickmaster.txt
+++ b/npc/003-0/trickmaster.txt
@@ -21,23 +21,13 @@
setskin "";
switch (@menuret) {
+ case SA_FREECAST:
+ if (!mlearn(SA_FREECAST, 1, 1, Lockpicks, 1))
+ mesc l("You do not meet all requisites for this skill."), 1;
+ break;
case TF_BACKSLIDING:
- if (getskilllv(TF_BACKSLIDING) >= 1) {
- mesc l("You've reached the maximum level for this skill."), 1;
- break;
- }
- mesc l("To learn backsliding you'll need @@/@@ point(s).", 1, sk_points());
- mesc l("You'll also need the Trickmaster fee, 1x @@", getitemlink(Lockpicks));
- next;
- if (askyesno() == ASK_YES) {
- if (!sk_canlvup(Lockpicks, 1)) {
- mesc l("Requisites not met");
- break;
- }
- delitem Lockpicks, 1;
- sk_lvup(TF_BACKSLIDING, 1);
- mesc l("Success!");
- }
+ if (!mlearn(TF_BACKSLIDING, 1, 1, Lockpicks, 1))
+ mesc l("You do not meet all requisites for this skill."), 1;
break;
default:
if (@menuret)