summaryrefslogtreecommitdiff
path: root/world/map/npc/002-1/sarah.txt
diff options
context:
space:
mode:
authorwushin <pasekei@gmail.com>2015-01-07 21:00:16 -0600
committerwushin <pasekei@gmail.com>2015-01-07 21:00:16 -0600
commit2901ba177dea5867cbd52eb2b02a0ef8e1816e15 (patch)
tree81cc70a70e7cc0b9e46cc3e055dea1c702db1309 /world/map/npc/002-1/sarah.txt
parentfb7caf2cb0e768cf4b9c7f83df644edc97250a78 (diff)
downloadserverdata-2901ba177dea5867cbd52eb2b02a0ef8e1816e15.tar.gz
serverdata-2901ba177dea5867cbd52eb2b02a0ef8e1816e15.tar.bz2
serverdata-2901ba177dea5867cbd52eb2b02a0ef8e1816e15.tar.xz
serverdata-2901ba177dea5867cbd52eb2b02a0ef8e1816e15.zip
Moving Tutorial from Tulimshar to Candor
Diffstat (limited to 'world/map/npc/002-1/sarah.txt')
-rw-r--r--world/map/npc/002-1/sarah.txt88
1 files changed, 88 insertions, 0 deletions
diff --git a/world/map/npc/002-1/sarah.txt b/world/map/npc/002-1/sarah.txt
new file mode 100644
index 00000000..15eeb83b
--- /dev/null
+++ b/world/map/npc/002-1/sarah.txt
@@ -0,0 +1,88 @@
+// Variables used: nibble 1 of QUEST_SouthTulimshar
+
+002-1.gat,93,43,0|script|Sarah|106
+{
+ // This NPC previously used the variable TMW_Quest
+ callfunc "ClearVarTMW_Quest";
+
+ set @state, ((QUEST_SouthTulimshar & NIBBLE_1_MASK) >> NIBBLE_1_SHIFT);
+
+ if (@state >= 2) goto L_Done;
+ if (@state == 1) goto L_Progress;
+
+ mes "[Sarah]";
+ mes "\"Boy, am I hungry or what!\"";
+ next;
+
+ set @TEMP, rand(2);
+ if(@TEMP == 1) goto L_Opening1;
+ goto L_Opening0;
+
+L_Opening0:
+ mes "\"Cherry Cake is the best!\"";
+ next;
+ goto L_Ask;
+
+L_Opening1:
+ mes "\"Mmm, Cherry Cake... I love it!\"";
+ next;
+ goto L_Ask;
+
+L_Ask:
+ mes "\"Can you bring me a piece of Cherry Cake? Pretty please?\"";
+ menu
+ "Yes.", L_Req0,
+ "No.", L_Close;
+
+L_Req0:
+ mes "[Sarah]";
+ mes "\"Yippee! Bring me a piece of Cherry Cake, and I'll give you a nice hat!\"";
+ next;
+ set @state, 1;
+ callsub S_Update_Var;
+ mes "[Sarah]";
+ mes "\"Please bring it to me!\"";
+ goto L_Close;
+
+L_Progress:
+ if (countitem("CherryCake") < 1)
+ goto L_NotEnough;
+ mes "[Sarah]";
+ mes "\"Whee!\"";
+ next;
+ mes "You brought me Cherry Cake! Here is your new hat, as promised.\"";
+ emotion EMOTE_TONGUE;
+ getinventorylist;
+ if ((@inventorylist_count - (countitem("CherryCake") == 1)) > 99) goto L_TooMany;
+ delitem "CherryCake", 1;
+ getitem "SerfHat", 1;
+ set @state, 2;
+ callsub S_Update_Var;
+ goto L_Close;
+
+L_NotEnough:
+ mes "[Sarah]";
+ mes "\"Oh, I'm starving! Please bring me Cherry Cake!\"";
+ goto L_Close;
+
+L_Done:
+ mes "[Sarah]";
+ mes "\"It was so tasty, I can't eat anything more... Thank you!\"";
+ emotion EMOTE_TONGUE;
+ goto L_Close;
+
+L_Close:
+ set @TEMP, 0;
+ set @state, 0;
+ close;
+
+L_TooMany:
+ next;
+ mes "[Sarah]";
+ mes "\"You don't have room for my reward. I'll wait until you do.\"";
+ goto L_Close;
+
+S_Update_Var:
+ set QUEST_SouthTulimshar, (QUEST_SouthTulimshar & ~(NIBBLE_1_MASK) | (@state << NIBBLE_1_SHIFT));
+ return;
+}