From bae4b92e560c2694eaaf0e8b4d9e95e56204471b Mon Sep 17 00:00:00 2001 From: Ben Longbons Date: Sat, 18 Jun 2011 21:58:47 -0700 Subject: Move to a subdirectory --- world/map/npc/items/purification_potion.txt | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 world/map/npc/items/purification_potion.txt (limited to 'world/map/npc/items/purification_potion.txt') diff --git a/world/map/npc/items/purification_potion.txt b/world/map/npc/items/purification_potion.txt new file mode 100644 index 00000000..09a854bd --- /dev/null +++ b/world/map/npc/items/purification_potion.txt @@ -0,0 +1,28 @@ +// This is the function to use the PurificationPotion + +function script usePurificationPotion { + 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; + return; + +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, @Q_status + 1; + + message strcharinfo(0), "You pour the potion into the pond."; + + set QUEST_MAGIC2, + (QUEST_MAGIC2 & ~(@Q_MASK) + | (@Q_status << @Q_SHIFT)); + return; +} -- cgit v1.2.3-70-g09d2