summaryrefslogtreecommitdiff
path: root/npc
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2020-07-01 00:27:01 -0300
committerJesusaves <cpntb1@ymail.com>2020-07-01 00:27:01 -0300
commit06c37f2568409d12ab97188b80902d6fe5d745b6 (patch)
tree214e7bc67b7fa6284506ce738c2b4f0627cd1753 /npc
parentccd66209b40f2936e7e847a9c3b968fb6209c462 (diff)
downloadserverdata-06c37f2568409d12ab97188b80902d6fe5d745b6.tar.gz
serverdata-06c37f2568409d12ab97188b80902d6fe5d745b6.tar.bz2
serverdata-06c37f2568409d12ab97188b80902d6fe5d745b6.tar.xz
serverdata-06c37f2568409d12ab97188b80902d6fe5d745b6.zip
Rewrite trickmaster, it doesn't needs to be so expensive
Diffstat (limited to 'npc')
-rw-r--r--npc/003-0/trickmaster.txt67
1 files changed, 15 insertions, 52 deletions
diff --git a/npc/003-0/trickmaster.txt b/npc/003-0/trickmaster.txt
index ffb09c7dd..ddabbacb6 100644
--- a/npc/003-0/trickmaster.txt
+++ b/npc/003-0/trickmaster.txt
@@ -19,61 +19,24 @@
l("Advanced Tricks");
mes "";
.@lv=@menu;
- do {
- // Display appropriate menu
- if (.@lv == 1)
- basicMagic();
- else if (.@lv == 2)
- standardMagic();
- else if (.@lv == 3)
- advancedMagic();
+ do
+ {
+ // Display appropriate menu
+ if (.@lv == 1)
+ basicMagic();
+ else if (.@lv == 2)
+ standardMagic();
+ else if (.@lv == 3)
+ advancedMagic();
- // Handle result
- switch (@menuret) {
- case TMW2_MANABOMB:
- if (!learn_magic(TMW2_MANABOMB))
+ // Handle result
+ if (@menuret) {
+ if (!learn_magic(@menuret))
mesc l("You do not meet all requisites for this skill."), 1;
- break;
- case TF_BACKSLIDING:
- if (!learn_magic(TF_BACKSLIDING))
- mesc l("You do not meet all requisites for this skill."), 1;
- break;
- case MG_FIREWALL:
- if (!learn_magic(MG_FIREWALL))
- mesc l("You do not meet all requisites for this skill."), 1;
- break;
- case AC_VULTURE:
- if (!learn_magic(AC_VULTURE))
- mesc l("You do not meet all requisites for this skill."), 1;
- break;
- case TMW2_FIRSTAID:
- if (!learn_magic(TMW2_FIRSTAID))
- mesc l("You do not meet all requisites for this skill."), 1;
- break;
+ } else {
+ closeclientdialog;
+ }
- case SA_FREECAST:
- if (!learn_magic(SA_FREECAST))
- mesc l("You do not meet all requisites for this skill."), 1;
- break;
- case ALL_FULL_THROTTLE:
- if (!learn_magic(ALL_FULL_THROTTLE))
- mesc l("You do not meet all requisites for this skill."), 1;
- break;
- case GC_DARKILLUSION:
- if (!learn_magic(GC_DARKILLUSION))
- mesc l("You do not meet all requisites for this skill."), 1;
- break;
- case NV_TRICKDEAD:
- if (!learn_magic(NV_TRICKDEAD))
- mesc l("You do not meet all requisites for this skill."), 1;
- break;
- default:
- if (@menuret)
- Exception("ERROR skill not implemented", RB_DEFAULT|RB_SPEECH);
- else
- closeclientdialog;
- break;
- }
} while (@menuret);
close;