diff options
Diffstat (limited to 'npc')
-rw-r--r-- | npc/009-2_Hurnscald/wyara.txt | 29 | ||||
-rw-r--r-- | npc/items/purification_potion.txt | 36 | ||||
-rw-r--r-- | npc/scripts.conf | 5 |
3 files changed, 40 insertions, 30 deletions
diff --git a/npc/009-2_Hurnscald/wyara.txt b/npc/009-2_Hurnscald/wyara.txt index 2f1eb6b7..d6ff9165 100644 --- a/npc/009-2_Hurnscald/wyara.txt +++ b/npc/009-2_Hurnscald/wyara.txt @@ -1,32 +1,3 @@ -function script PurificationPotion { - set @STATUS_PURIFY_ONCE, 2; - set @STATUS_PURIFY_TWICE, 3; - - set @PURIFICATIONPOTION, 733; - - if (isat("011-1.gat", 88,67)) - goto L_correct; - message strcharinfo(0), "This doesn't seem to be the right place."; - getitem @PURIFICATIONPOTION, 1; - close; -L_correct: - set @Q_MASK, NIBBLE_2_MASK; - set @Q_SHIFT, NIBBLE_2_SHIFT; - set @Q_status, (QUEST_MAGIC2 & @Q_MASK) >> @Q_SHIFT; - - if (@Q_status == @STATUS_PURIFY_ONCE) - set @Q_status, @STATUS_PURIFY_TWICE; - if (@Q_status < @STATUS_PURIFY_ONCE) - set @Q_status, @STATUS_PURIFY_ONCE; - - message strcharinfo(0), "You pour the potion into the pond."; - - set QUEST_MAGIC2, - (QUEST_MAGIC2 & ~(@Q_MASK) - | (@Q_status << @Q_SHIFT)); - return; -} - // ---------------------------------------- // Wyara the Hurnscald witch // ---------------------------------------- diff --git a/npc/items/purification_potion.txt b/npc/items/purification_potion.txt new file mode 100644 index 00000000..9f3c7e5e --- /dev/null +++ b/npc/items/purification_potion.txt @@ -0,0 +1,36 @@ +// + +function script PurificationPotion { + set @PURIFICATIONPOTION, 733; + + if (isat("011-1.gat", 88,67)) + goto L_Wyara_Pond; + +L_NoUse: + message strcharinfo(0), "You don't know what to do with this."; + getitem @PURIFICATIONPOTION, 1; + close; + +L_Wyara_Pond: + set @Q_MASK, NIBBLE_2_MASK; + set @Q_SHIFT, NIBBLE_2_SHIFT; + set @Q_status, (QUEST_MAGIC2 & @Q_MASK) >> @Q_SHIFT; + + if (@Q_status < 1) + goto L_NoUse; + if (@Q_status == 2) + set @Q_status, 3; + if (@Q_status < 2) + set @Q_status, 3; + + message strcharinfo(0), "You pour the potion into the pond."; + + set QUEST_MAGIC2, + (QUEST_MAGIC2 & ~(@Q_MASK) + | (@Q_status << @Q_SHIFT)); + return; + +L_NoUse: + message strcharinfo(0), "You don't know what to do with this."; + return; +} diff --git a/npc/scripts.conf b/npc/scripts.conf index ae6b9a83..f7cede08 100644 --- a/npc/scripts.conf +++ b/npc/scripts.conf @@ -5,11 +5,14 @@ npc: npc/functions/banker.txt npc: npc/functions/barber.txt npc: npc/functions/game_rules.txt npc: npc/functions/inn.txt +npc: npc/functions/magic.txt npc: npc/functions/mob_points.txt npc: npc/functions/process_equip.txt npc: npc/functions/slot_machine.txt npc: npc/functions/soul_menhir.txt -npc: npc/functions/magic.txt + +// Item Functions +npc: npc/items/purification_potion.txt import: npc/_import.txt |