summaryrefslogtreecommitdiff
path: root/world/map/npc/functions/magic.txt
diff options
context:
space:
mode:
Diffstat (limited to 'world/map/npc/functions/magic.txt')
-rw-r--r--world/map/npc/functions/magic.txt34
1 files changed, 21 insertions, 13 deletions
diff --git a/world/map/npc/functions/magic.txt b/world/map/npc/functions/magic.txt
index a1faea94..2715cf7e 100644
--- a/world/map/npc/functions/magic.txt
+++ b/world/map/npc/functions/magic.txt
@@ -14,7 +14,6 @@ function|script|MagicGainBasic|,
{
set MAGIC_FLAGS, MAGIC_FLAGS | MFLAG_DRANK_POTION;
close;
-
}
// ------------------------------------------------------------
@@ -40,7 +39,6 @@ function|script|MagicTalkOptionsSetup|,
// Returns the result in @c, or returns 0 if there is no result
// ------------------------------------------------------------
-
function|script|MagicTalkMenu|,
{
setarray @choice$, "", "", "", "", "", "", "", "", "", "";
@@ -52,6 +50,7 @@ function|script|MagicTalkMenu|,
set @choice$[@choices_nr], "...Elanore the Healer?";
set @choice_idx[@choices_nr], @QQ_ELANORE;
set @choices_nr, @choices_nr + 1;
+ goto L_Q_post_elanore;
L_Q_post_elanore:
if (@ignore == @QQ_MANASEED)
@@ -61,6 +60,7 @@ L_Q_post_elanore:
set @choice$[@choices_nr], "...the Mana Seed?";
set @choice_idx[@choices_nr], @QQ_MANASEED;
set @choices_nr, @choices_nr + 1;
+ goto L_Q_post_manaseed;
L_Q_post_manaseed:
if (@ignore & @QQ_MANAPOTION)
@@ -70,6 +70,7 @@ L_Q_post_manaseed:
set @choice$[@choices_nr], "...Mana Potions?";
set @choice_idx[@choices_nr], @QQ_MANAPOTION;
set @choices_nr, @choices_nr + 1;
+ goto L_Q_post_manapotion;
L_Q_post_manapotion:
if (@ignore & @QQ_WYARA)
@@ -79,6 +80,7 @@ L_Q_post_manapotion:
set @choice$[@choices_nr], "...Wyara the Witch?";
set @choice_idx[@choices_nr], @QQ_WYARA;
set @choices_nr, @choices_nr + 1;
+ goto L_Q_post_wyara;
L_Q_post_wyara:
if (@ignore & @QQ_SAGATHA)
@@ -88,6 +90,7 @@ L_Q_post_wyara:
set @choice$[@choices_nr], "...Sagatha the Witch?";
set @choice_idx[@choices_nr], @QQ_SAGATHA;
set @choices_nr, @choices_nr + 1;
+ goto L_Q_post_sagatha;
L_Q_post_sagatha:
if (@ignore & @QQ_AULDSBEL)
@@ -97,6 +100,7 @@ L_Q_post_sagatha:
set @choice$[@choices_nr], "...Auldsbel the Wizard?";
set @choice_idx[@choices_nr], @QQ_AULDSBEL;
set @choices_nr, @choices_nr + 1;
+ goto L_Q_post_auldsbel;
L_Q_post_auldsbel:
if (@ignore & @QQ_OLDWIZ)
@@ -106,6 +110,7 @@ L_Q_post_auldsbel:
set @choice$[@choices_nr], "...the Old Wizard?";
set @choice_idx[@choices_nr], @QQ_OLDWIZ;
set @choices_nr, @choices_nr + 1;
+ goto L_Q_post_oldwiz;
L_Q_post_oldwiz:
if (@ignore & @QQ_IMP)
@@ -115,6 +120,7 @@ L_Q_post_oldwiz:
set @choice$[@choices_nr], "...the Earth Spirit in the desert well?";
set @choice_idx[@choices_nr], @QQ_IMP;
set @choices_nr, @choices_nr + 1;
+ goto L_Q_post_imp;
L_Q_post_imp:
if (@ignore & @QQ_ASTRALSOUL)
@@ -126,6 +132,7 @@ L_Q_post_imp:
set @choice$[@choices_nr], "...ways to improve my magic?";
set @choice_idx[@choices_nr], @QQ_ASTRALSOUL;
set @choices_nr, @choices_nr + 1;
+ goto L_Q_post_astralsoul;
L_Q_post_astralsoul:
set @choice$[@choices_nr], "...never mind.";
@@ -133,17 +140,18 @@ L_Q_post_astralsoul:
set @choices_nr, @choices_nr + 1;
menu
- @choice$[0], -,
- @choice$[1], -,
- @choice$[2], -,
- @choice$[3], -,
- @choice$[4], -,
- @choice$[5], -,
- @choice$[6], -,
- @choice$[7], -,
- @choice$[8], -,
- @choice$[9], -;
-
+ @choice$[0], L_MenuItems,
+ @choice$[1], L_MenuItems,
+ @choice$[2], L_MenuItems,
+ @choice$[3], L_MenuItems,
+ @choice$[4], L_MenuItems,
+ @choice$[5], L_MenuItems,
+ @choice$[6], L_MenuItems,
+ @choice$[7], L_MenuItems,
+ @choice$[8], L_MenuItems,
+ @choice$[9], L_MenuItems;
+
+L_MenuItems:
set @menu, @menu - 1;
if (@menu >= @choices_nr)