summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--npc/002-1/elanore.txt82
-rw-r--r--npc/002-2/omar.txt2
2 files changed, 31 insertions, 53 deletions
diff --git a/npc/002-1/elanore.txt b/npc/002-1/elanore.txt
index 1b547819..50996c6a 100644
--- a/npc/002-1/elanore.txt
+++ b/npc/002-1/elanore.txt
@@ -1,20 +1,4 @@
-function script ElanoreFix {
- @Q_MASK = NIBBLE_1_MASK;
- @Q_SHIFT = NIBBLE_1_SHIFT;
-
- set @Q_STATUS_MAX, 3; // FIXME once level 3 magic was released
-
- @Q_status = (QUEST_MAGIC2 & @Q_MASK) >> @Q_SHIFT;
- if (@Q_status > @Q_STATUS_MAX)
- @Q_status = @ST_INITIAL;
- if (@Q_status > 1 && (getskilllv(SKILL_MAGIC_LIFE) < 2))
- @Q_status = @ST_INITIAL;
-
- QUEST_MAGIC2 = (QUEST_MAGIC2 & ~(@Q_MASK) | (@Q_status << @Q_SHIFT));
- return;
-}
-
function script elanore_decrease_exp {
.@heal_exp = getq2(MagicQuest_Healing);
@@ -37,19 +21,6 @@ function script elanore_decrease_exp {
@SUP_id = SKILL_MAGIC_LIFE;
@SUP_name$ = "Life Magic";
- @ST_INITIAL = 0;
- @ST_LEARNED_LIGHT_HEAL = 1;
- @ST_MASTERED_LIGHT_HEAL = 2;
- @ST_LEARNED_LAYONHANDS = 3;
- @ST_WAITING_FOR_KADIYA = 4;
- @ST_READY_TO_CURE_POISON = 5;
- @ST_LEARNED_CURE_POISON = 6;
-
- callfunc "ElanoreFix";
-
- // This operation works around an earlier possible corruption of this state
- if (@Q_status > @Q_STATUS_MAX)
- setq1(MagicQuest_Healing, @ST_INITIAL);
if (sc_check(SC_POISON) || sc_check(SC_DPOISON)) goto L_CurePoison;
if (BaseLevel > 20) goto L_NoHeal;
mesn l("Elanore the Healer");
@@ -87,13 +58,13 @@ L_Chat:
goto L_Main;
L_Main:
- if (@has_magic && (@Q_status == @ST_INITIAL))
+ if (@has_magic && (@Q_status == .ST_INITIAL))
menu
"Can you heal me?", L_NoHealMessage,
"Can you teach me magic?", L_Teach,
"What do you know about...", L_Question,
"Goodbye!", L_Bye;
- if (@has_magic && (@Q_status > @ST_INITIAL))
+ if (@has_magic && (@Q_status > .ST_INITIAL))
menu
"Can you heal me?", L_NoHealMessage,
"Can you teach me more?", L_Teach,
@@ -172,13 +143,13 @@ L_MakeSelf_no:
goto L_close;
L_Teach:
- if (@Q_status == @ST_INITIAL) goto L_T_Initial;
- if (@Q_status == @ST_LEARNED_LIGHT_HEAL) goto L_T_ChkAdvTo2;
- if (@Q_status == @ST_MASTERED_LIGHT_HEAL) goto L_T_ChkAdvToLOH;
- if (@Q_status == @ST_LEARNED_LAYONHANDS) goto L_T_Explain3;
- if (@Q_status == @ST_WAITING_FOR_KADIYA) goto L_T_ChkAdvTo3;
- if (@Q_status == @ST_READY_TO_CURE_POISON) goto L_T_CurePosion;
- if (@Q_status == @ST_LEARNED_CURE_POISON) goto L_T_dunno;
+ if (@Q_status == .ST_INITIAL) goto L_T_Initial;
+ if (@Q_status == .ST_LEARNED_LIGHT_HEAL) goto L_T_ChkAdvTo2;
+ if (@Q_status == .ST_MASTERED_LIGHT_HEAL) goto L_T_ChkAdvToLOH;
+ if (@Q_status == .ST_LEARNED_LAYONHANDS) goto L_T_Explain3;
+ if (@Q_status == .ST_WAITING_FOR_KADIYA) goto L_T_ChkAdvTo3;
+ if (@Q_status == .ST_READY_TO_CURE_POISON) goto L_T_CurePosion;
+ if (@Q_status == .ST_LEARNED_CURE_POISON) goto L_T_dunno;
mesn l("Elanore the Healer");
mes "\"You have made good progress, but you lack the magical power to advance further. Also, I would like to observe you some more to be certain that you will make a good healer.\"";
@@ -209,7 +180,7 @@ L_T_Initial:
if ((@inventorylist_count == 100) && (countitem("Lifestone") == 0)) goto L_T_Initial_Noroom;
getitem "Lifestone", 1;
learnskill SKILL_LUM;
- setq1(MagicQuest_Healing, @ST_LEARNED_LIGHT_HEAL);
+ setq1(MagicQuest_Healing, .ST_LEARNED_LIGHT_HEAL);
mesn l("Elanore the Healer");
mes "Elanore hands you the crystal.";
@@ -246,7 +217,7 @@ L_T_AdvTo2_skip:
next;
mesn l("Elanore the Healer");
mes "You feel a strange, tingling kind of warmth spread through your body.";
- setq1(MagicQuest_Healing, @ST_MASTERED_LIGHT_HEAL);
+ setq1(MagicQuest_Healing, .ST_MASTERED_LIGHT_HEAL);
@SUP_xp = 5000;
@SUP_lvl = 2;
callfunc "SkillUp";
@@ -280,7 +251,7 @@ L_T_ChkAdvToLOH:
mes "[1000 experience points]";
getexp 1000, 0;
learnskill SKILL_INMA;
- setq1(MagicQuest_Healing, @ST_LEARNED_LAYONHANDS);
+ setq1(MagicQuest_Healing, .ST_LEARNED_LAYONHANDS);
goto L_close;
L_T_LOH_adv_abort0:
@@ -301,7 +272,7 @@ L_T_Explain3:
mesc l("Elanore smiles.");
mes "\"You seem to be ready to advance as a healer. There is one favour I must ask of you first, though.\"";
set QUEST_MAGIC2, (QUEST_MAGIC2 & ~(NIBBLE_3_MASK)); // Initialise Kadiya quest
- setq1(MagicQuest_Healing, @ST_WAITING_FOR_KADIYA);
+ setq1(MagicQuest_Healing, .ST_WAITING_FOR_KADIYA);
next;
mesn l("Elanore the Healer");
@@ -398,7 +369,7 @@ L_T_AdvTo3Ready:
mes "[" + @xp + " experience points]";
mes "[Level 3 in Life Magic]";
- setq1(MagicQuest_Healing, @ST_READY_TO_CURE_POISON);
+ setq1(MagicQuest_Healing, .ST_READY_TO_CURE_POISON);
getexp @xp, 0;
if (getskilllv(SKILL_MAGIC_LIFE) < 3)
updateskill SKILL_MAGIC_LIFE, 3;
@@ -434,7 +405,7 @@ L_T_CurePosion:
mes "\"Once again, the invocation is `" + get(.invocation$, "cure-poison") + "'.\"";
mes "\"Come back again soon; there is another spell I would like to teach you.\"";
next;
- setq1(MagicQuest_Healing, @ST_LEARNED_CURE_POISON);
+ setq1(MagicQuest_Healing, .ST_LEARNED_CURE_POISON);
goto L_Main;
L_T_dunno:
@@ -526,17 +497,26 @@ L_Bye:
L_close:
@has_magic = 0;
- @Q_STATUS_MAX = 0;
@Q_status = 0;
@SUP_id = 0;
@SUP_name$ = "";
@ignore = 0;
- @ST_LEARNED_LIGHT_HEAL = 0;
- @ST_MASTERED_LIGHT_HEAL = 0;
- @ST_LEARNED_LAYONHANDS = 0;
- @ST_WAITING_FOR_KADIYA = 0;
- @ST_READY_TO_CURE_POISON = 0;
- @ST_LEARNED_CURE_POISON = 0;
+ .ST_LEARNED_LIGHT_HEAL = 0;
+ .ST_MASTERED_LIGHT_HEAL = 0;
+ .ST_LEARNED_LAYONHANDS = 0;
+ .ST_WAITING_FOR_KADIYA = 0;
+ .ST_READY_TO_CURE_POISON = 0;
+ .ST_LEARNED_CURE_POISON = 0;
@xp = 0;
close;
+
+OnInit:
+ .ST_INITIAL = 0;
+ .ST_LEARNED_LIGHT_HEAL = 1;
+ .ST_MASTERED_LIGHT_HEAL = 2;
+ .ST_LEARNED_LAYONHANDS = 3;
+ .ST_WAITING_FOR_KADIYA = 4;
+ .ST_READY_TO_CURE_POISON = 5;
+ .ST_LEARNED_CURE_POISON = 6;
+ end;
}
diff --git a/npc/002-2/omar.txt b/npc/002-2/omar.txt
index 1307a6f8..5c7b7cd9 100644
--- a/npc/002-2/omar.txt
+++ b/npc/002-2/omar.txt
@@ -20,7 +20,6 @@ function script KadiyaSubquestConsts {
}
002-2,117,126,0 script Omar NPC162,{
- callfunc "ElanoreFix";
callfunc "KadiyaSubquestConsts";
@Q_status = @Q_kadiya_status;
@@ -179,7 +178,6 @@ S_Update_Var:
@child_number = 7;
callfunc "XmasList";
- callfunc "ElanoreFix";
@Q_MASK = NIBBLE_3_MASK;
@Q_SHIFT = NIBBLE_3_SHIFT;
callfunc "KadiyaSubquestConsts";