summaryrefslogtreecommitdiff
path: root/world/map/npc/xmas/2011/emptyBoxesHelper.txt
diff options
context:
space:
mode:
Diffstat (limited to 'world/map/npc/xmas/2011/emptyBoxesHelper.txt')
-rw-r--r--world/map/npc/xmas/2011/emptyBoxesHelper.txt66
1 files changed, 66 insertions, 0 deletions
diff --git a/world/map/npc/xmas/2011/emptyBoxesHelper.txt b/world/map/npc/xmas/2011/emptyBoxesHelper.txt
new file mode 100644
index 00000000..8e22f077
--- /dev/null
+++ b/world/map/npc/xmas/2011/emptyBoxesHelper.txt
@@ -0,0 +1,66 @@
+// This file is part of Christmas Event 2011
+// author: Jenalya
+// Urmas asks for raw logs to make empty presents boxes
+// later he can be asked for those boxes to put toys in
+
+030-2.gat,140,41,0|script|Urmas|328,{
+
+ if (!(gettime(7) == $@xmas2011_year && gettime(6) == 12 && gettime(5) >= $@xmas2011_start_day))
+ goto L_NoEvent;
+ if ((gettime(7) == $@xmas2011_year && gettime(6) == 12 && gettime(5) >= $@xmas2011_reward_start_day))
+ goto L_RewardTime;
+
+ set @log_amount, 2;
+
+ if (xmas11 & $@xmas11_talkedToChief) goto L_Helping;
+
+ mes "[Busy Helper]";
+ mes "\"Don't stand in the way! We have some serious problems here.\"";
+ goto L_Close;
+
+L_Helping:
+ mes "[Urmas]";
+ mes "\"Ah, I see you're one of the auxiliary forces. Ok, listen to me.";
+ mes "\"We have a narrow on the empty present boxes. Don't ask me how that can happen!";
+ mes "Those paper-shufflers up there probably messed up the ordering or something. Pah.\"";
+ next;
+ mes "\"However, we need to fix it.";
+ mes "Bring me some wood, so I can make boxes out of it.";
+ mes "I think " + @log_amount + " Raw Logs will do for one box.\"";
+ if (countitem("RawLog") < @log_amount)
+ goto L_Close;
+ next;
+ mes "\"How many boxes do you need?\"";
+ input @amount;
+ if (@amount <= 0)
+ goto L_Close;
+ if (countitem("RawLog") < @amount*@log_amount)
+ goto L_NoItems;
+ delitem "RawLog", @amount*@log_amount;
+ mes "[Urmas]";
+ mes "\"Alright! Good job, kid. I'll start to make some more boxes now.";
+ mes "Here, take this in the meanwhile and put some toys in it.\"";
+ getitem "OpenPresentBox", @amount;
+ goto L_Close;
+
+L_NoEvent:
+ mes "[Urmas]";
+ mes "\"How did you come in? At this time of the year the door should be locked!\"";
+ warp "030-1.gat", 99, 55;
+ goto L_Close;
+
+L_RewardTime:
+ mes "[Urmas]";
+ mes "\"Ha, we did it. That really wasn't a piece of cake this year.\"";
+ goto L_Close;
+
+L_NoItems:
+ mes "[Urmas]";
+ mes "\"Eh? Are you kidding?\"";
+ goto L_Close;
+
+L_Close:
+ set @log_amount, 0;
+ set @amount, 0;
+ close;
+}