summaryrefslogtreecommitdiff
path: root/world/map/npc/001-2/sandra.txt
diff options
context:
space:
mode:
authorwushin <pasekei@gmail.com>2015-01-07 21:04:38 -0600
committerwushin <pasekei@gmail.com>2015-01-07 21:04:38 -0600
commit61c88ec162713b980f30e6e5111c1cfbd9f23d3a (patch)
treecbc5f399ccf8dd226056887a70b9a313f88bee6e /world/map/npc/001-2/sandra.txt
parent2901ba177dea5867cbd52eb2b02a0ef8e1816e15 (diff)
downloadserverdata-61c88ec162713b980f30e6e5111c1cfbd9f23d3a.tar.gz
serverdata-61c88ec162713b980f30e6e5111c1cfbd9f23d3a.tar.bz2
serverdata-61c88ec162713b980f30e6e5111c1cfbd9f23d3a.tar.xz
serverdata-61c88ec162713b980f30e6e5111c1cfbd9f23d3a.zip
Adjust rest of world to Match new tutorial
Diffstat (limited to 'world/map/npc/001-2/sandra.txt')
-rw-r--r--world/map/npc/001-2/sandra.txt118
1 files changed, 118 insertions, 0 deletions
diff --git a/world/map/npc/001-2/sandra.txt b/world/map/npc/001-2/sandra.txt
new file mode 100644
index 00000000..48632e58
--- /dev/null
+++ b/world/map/npc/001-2/sandra.txt
@@ -0,0 +1,118 @@
+// Variables used: nibble 3 of QUEST_SouthTulimshar
+
+001-2.gat,98,88,0|script|Sandra|114
+{
+ // This NPC previously used the variable TMW_Quest
+ callfunc "ClearVarTMW_Quest";
+
+ set @state, ((QUEST_SouthTulimshar & NIBBLE_3_MASK) >> NIBBLE_3_SHIFT);
+
+ if (@state >= 2) goto L_Done;
+ if (@state == 1) goto L_Progress;
+
+ mes "[Sandra]";
+ mes "\"Hunting monsters for potion ingredients can sometimes be a difficult task.\"";
+ next;
+
+ set @TEMP, rand(4);
+ if(@TEMP == 1) goto L_Opening1;
+ if(@TEMP == 2) goto L_Opening2;
+ if(@TEMP == 3) goto L_Opening3;
+ goto L_Opening0;
+
+L_Opening0:
+ mes "\"In the outskirts of Tulimshar, there are some scorpions... I need help! Will you help?\"";
+ next;
+ goto L_Ask;
+
+L_Opening1:
+ mes "\"When you venture to the outskirts of Tulimshar, you can spot scorpions. Will you help me kill some?\"";
+ next;
+ goto L_Ask;
+
+L_Opening2:
+ mes "\"The Scorpion Stinger carries many properties used in potions. Would you get some for me?\"";
+ next;
+ goto L_Ask;
+
+L_Opening3:
+ mes "\"You look sturdy enough, will you help me get something?\"";
+ next;
+ goto L_Ask;
+
+L_Ask:
+ menu
+ "Yes.", L_Yes,
+ "No.", L_Close;
+
+L_Yes:
+ set @TEMP, rand(3);
+ if(@TEMP == 1) goto L_Req1;
+ if(@TEMP == 2) goto L_Req2;
+ goto L_Req0;
+
+L_Req0:
+ mes "[Sandra]";
+ mes "\"I need 5 Scorpion Stingers.\"";
+ next;
+ goto L_Set;
+
+L_Req1:
+ mes "[Sandra]";
+ mes "\"I heard a while ago that stingers from scorpions can be used for medical purposes. I need you to help me get 5 Scorpion Stingers.\"";
+ next;
+ goto L_Set;
+
+L_Req2:
+ mes "[Sandra]";
+ mes "\"Bring me 5 Scorpion Stingers. I'll give you something if you do!\"";
+ next;
+ goto L_Set;
+
+L_Set:
+ set @state, 1;
+ callsub S_Update_Var;
+ mes "\"Please get them for me!\"";
+ goto L_Close;
+
+L_Progress:
+ if (countitem("ScorpionStinger") < 5)
+ goto L_NotEnough;
+ mes "[Sandra]";
+ mes "\"Excellent! You brought me 5 Scorpion Stingers!";
+ mes "Here's something for you.\"";
+ getinventorylist;
+ if (@inventorylist_count + (countitem("ScorpionStinger") == 5) - (countitem("Arrow") == 0) > 99)
+ goto L_TooMany;
+ delitem "ScorpionStinger", 5;
+ getitem "Bow", 1;
+ getitem "Arrow", 100;
+ set @state, 2;
+ callsub S_Update_Var;
+ goto L_Close;
+
+L_NotEnough:
+ mes "[Sandra]";
+ mes "\"Please hurry and bring me 5 Scorpion Stingers.\"";
+ goto L_Close;
+
+L_Done:
+ mes "[Sandra]";
+ mes "\"Thank you for all your help!\"";
+ goto L_Close;
+
+L_Close:
+ set @TEMP, 0;
+ set @state, 0;
+ close;
+
+L_TooMany:
+ next;
+ mes "[Sandra]";
+ 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_3_MASK) | (@state << NIBBLE_3_SHIFT));
+ return;
+}