summaryrefslogtreecommitdiff
path: root/world
diff options
context:
space:
mode:
Diffstat (limited to 'world')
-rw-r--r--world/map/news.txt92
-rw-r--r--world/map/npc/006-1/pachua.txt6
-rw-r--r--world/map/npc/scripts.conf2
-rw-r--r--world/map/npc/xmas/2011/_import.txt19
-rw-r--r--world/map/npc/xmas/2011/badguy.txt443
-rw-r--r--world/map/npc/xmas/2011/beddingHelper.txt103
-rw-r--r--world/map/npc/xmas/2011/bodyguards.txt120
-rw-r--r--world/map/npc/xmas/2011/chiefHelper.txt81
-rw-r--r--world/map/npc/xmas/2011/deliverPresentsHelper.txt275
-rw-r--r--world/map/npc/xmas/2011/doll.txt163
-rw-r--r--world/map/npc/xmas/2011/emptyBoxesHelper.txt66
-rw-r--r--world/map/npc/xmas/2011/entranceHelpers.txt73
-rw-r--r--world/map/npc/xmas/2011/glitterHelper.txt108
-rw-r--r--world/map/npc/xmas/2011/guardOfHonor.txt155
-rw-r--r--world/map/npc/xmas/2011/illHelper.txt99
-rw-r--r--world/map/npc/xmas/2011/leatherBall.txt162
-rw-r--r--world/map/npc/xmas/2011/monsters.txt33
-rw-r--r--world/map/npc/xmas/2011/plushMouboo.txt199
-rw-r--r--world/map/npc/xmas/2011/reinboos.txt606
-rw-r--r--world/map/npc/xmas/2011/santa.txt138
-rw-r--r--world/map/npc/xmas/2011/stickReinboo.txt179
-rw-r--r--world/map/npc/xmas/2011/wrappingPaperHelper.txt147
-rw-r--r--world/map/npc/xmas/2011/xmas2011config.txt194
23 files changed, 3421 insertions, 42 deletions
diff --git a/world/map/news.txt b/world/map/news.txt
index df0eda4f..322b3040 100644
--- a/world/map/news.txt
+++ b/world/map/news.txt
@@ -1,25 +1,33 @@
+##3 Christmas 2011
+
+##0 Christmas is coming near and Santa and his helpers are busy
+##0 preparing everything for the celebration in Santa's house near Nivalis.
+##0 But somehow... everything seems to go wrong.
+##0 Bad luck? Or rather - malicious interference?
+##0 However, someone might need your help.
+
##3 November 2011
##3 A Rule Correction on "No Botting"
-
+
##3 Previously, only activity while the user was
##3 away from the keyboard was a bannable offense.
##3 Now, any sort of automated following
##3 (especially, but not only, attack-following)
##3 is also covered.
-
+
##3 If you know any of the people who left this game
##3 due to the prevalence of bots that were previously
##3 tolerated, please tell them it's time to return.
-
+
##2 ~ The Hurnscald Herald ~
-
+
##3 Halloween 2011
-
+
##0 Happy Halloween!
##0 This year the governments of Argaes and Tonori have decided to sponsor
##0 trick-or-treating across both continents.
##0 Have fun and don't make yourself sick by pigging out!
-
+
##0 Credits:
##0 initial outline - enchilado
##0 intial draft - alastrim
@@ -30,11 +38,11 @@
##0 old item - maybe Black Don ?
##0 (We're not spoiling what the items *are*)
##0 -o11c
-
+
##3 July 2011
-
+
##0 Will Kill Monsters For Food?
-
+
##0 Recovery from the Great Earthquake is still
##0 very slow throughout the world. The vast
##0 devastation still causes starvation and
@@ -42,7 +50,7 @@
##0 Earthquake has been the increasing number of
##0 aggressive monsters and dooms long thought
##0 forgotten.
-
+
##0 To answer this problem Tulimshar
##0 has issued a call to be spread far and wide:
##0 "If you're hungry, if you need work, if you
@@ -50,13 +58,13 @@
##0 Slaying monsters, liberating mines and
##0 defeating the night horrors that terrify even
##0 the most strong willed never paid so well!"
-
+
##0 Needless to say, many are answering this call.
##0 You may very well be one of them.
-
+
##0 Olana, the Innkeeper's Daughter, Returns to
##0 Hurnscald...But Where Are Her Daughters?
-
+
##0 Olana, who is staying in the West wing of the
##0 Hurnscald Inn, has been away to Tulimshar with
##0 her family since before the Earthquake.
@@ -65,7 +73,7 @@
##0 I would've returned immediately, but I didn't
##0 want to put my family at risk until travel
##0 became a little safer."
-
+
##0 When asked about her daughters, Olana smiled
##0 "They love wandering the woods around here.
##0 Other than the occasional bandit group, things
@@ -73,11 +81,11 @@
##0 in Tulimshar. I just hope they don't wander
##0 near these caves...I've heard many of them can
##0 be quite dangerous."
-
+
##2 ~ The Hurnscald Herald ~
-
+
##3 June 2011
-
+
##0 A large shipment of gold coins was plundered
##0 by pirates. The shipment was to be sent to
##0 Tulimshar as part of their effort to control
@@ -85,14 +93,14 @@
##0 no where! They took the shipment and my pet
##0 squirrel Chompers!" Captain Zierock reported
##0 while in tears.
-
+
##0 It is believed the pirates divided the gold
##0 then went separate ways to spend their spoils.
##0 Ironically, these pirates were the target of
##0 monsters, who plundered them not just for
##0 their new found wealth, but also for their
##0 crunchy bones and sea salty flesh.
-
+
##0 On that note, be on the lookout for Green Slimes,
##0 which have grown hostile as they evolve to the
##0 harsh Tonori desert, making them a threat to
@@ -100,13 +108,13 @@
##0 pirates attempted to cross the Snake Desert,
##0 where they met the Green Slimes...and their
##0 end.
-
+
##0 In other news, Andra, a friend of Hinnak, has
##0 increased her agricultural knowledge and needs
##0 help keeping the soil around the farm fertile.
##0 Interested volunteers should speak with her
##0 about how to help.
-
+
##0 Last, but certainly not least, Agostine has
##0 returned to Nivalis. While he enjoyed his
##0 time in Tulimshar, mingling with other artisans,
@@ -114,41 +122,41 @@
##0 fabulous sweater, but nobody wanted to wear it
##0 in this hot and smelly desert. That is when I
##0 decided enough was enough. Sweat is just gross."
-
+
##2 ~ The Hurnscald Herald ~
-
+
##3 May 2011
-
+
##0 Many battle hardened warriors took some time
##0 during April and enjoyed helping the somewhat
##0 forgetful Easter Bunny make his baskets. The
##0 children surely must have enjoyed their sweets.
-
+
##0 The demi-god Golbenez has finally made good on
##0 his promise to open a 'place of leisure' in
##0 the form of an inn. Youngsters beware, since
##0 the entrance to this inn is near the old
##0 graveyard and could be dangerous.
-
+
##0 There have also been reports about a mysterious
##0 stranger roaming the beaches near Tulimshar.
##0 Be on the lookout if you are in the area.
-
+
##2 ~ The Hurnscald Herald ~
-
+
##3 January 2011
-
+
##0 Reports of bandit raids to the west of
##0 Hurnscald has mobilized the town. Those
##0 injured by these bandits may have a long stay
##0 ahead of them in Hurnscald's hospital.
-
+
##0 Shortly after Tulimshar loosened the tariff
##0 on travel, skill trainers have come to Mana.
##0 If one wants to improve themselves through
##0 acquiring skills, be on the lookout for these
##0 trainers.
-
+
##0 In other news, Taro is still missing, but
##0 Diryn, an agent of Tulimshar, has established
##0 a connection with the Kaizei area, making
@@ -158,7 +166,7 @@
##0 back can be done by finding Frozenbeard, a
##0 pioneer who is mapping a trade route to get
##0 to Nivalis by ship.
-
+
##0 Diryn's re-connection with Nivalis came none
##0 too soon. Golbenez, a demi-god who demanded
##0 a half billion gold pieces for building some
@@ -169,26 +177,26 @@
##0 not gift the children of the world, wizards,
##0 warriors and archers rallied to pay the
##0 demi-god his demands.
-
+
##0 Shortly after Santa was freed, something more
##0 sinister has come to Kaizei. The yeti.
##0 Sightings of this beast returns with stories
##0 of them. Though aggressive, their behavior
##0 seems out of place. They've never been known
##0 as cave dwellers nor to kidnap people.
-
+
##0 Last, but definitely not least, Dimond's Cove
##0 is observing "Burns' Supper" January 24-26th.
##0 Shanon is hosting the event, which he promises
##0 will be an excellent time for food, drink and
##0 poems.
-
+
##2 ~ The Hurnscald Herald ~
-
+
##3 Countless candy-concerning complaints: council
##3 consequently considers citizen-composed cleanup crew
##3 Eighteenth of November 2010
-
+
##0 Recently, the ancient tradition of Hallowe'en
##0 was celebrated across Argaes, Tonori and other
##0 continents. Estimated tons of sweets were given
@@ -197,25 +205,25 @@
##0 dropped on the night. Even a week and a half
##0 after Hallowe'en, many kilograms of sweets
##0 still litter our pleasant woodlands.
-
+
##0 After dozens of letters regarding the situation,
##0 the Hurnscald Council has said that the best
##0 solution would be to organise a team of
##0 volunteers to work on collecting dropped sweets
##0 and disposing of them - but it has yet to
##0 organise any such thing.
-
+
##0 In the meantime, why not do your bit and collect
##0 some sweets for yourself? If you don't mind them
##0 being a bit old, you could be able to make the
##0 biggest Hallowe'en haul in history.
-
+
##0 Additionally, we've been getting some reports of
##0 a rather creepy skeleton hanging around the
##0 woodland. He doesn't appear to be aggressive,
##0 but he chatters unintelligibly at passers-by.
-
-
+
+
##3 Rollback
##0 2010-11-17
##0
diff --git a/world/map/npc/006-1/pachua.txt b/world/map/npc/006-1/pachua.txt
index 6f25c42b..95a43aae 100644
--- a/world/map/npc/006-1/pachua.txt
+++ b/world/map/npc/006-1/pachua.txt
@@ -2,6 +2,12 @@
set @LEATHER_PATCH_PRICE, 300;
set @wants_leather_patch, QUEST_Forestbow_state & NIBBLE_4_MASK;
+ if ((gettime(5) >= $@xmas2011_start_day) && (gettime(5) < $@xmas2011_reward_start_day) && (gettime(6) == 12) && (gettime(7) == $@xmas2011_year))
+ set @wants_leather_patch, @wants_leather_patch | (xmas11 & $@xmas11_talkedToChief);
+
+ set $@xmas2011_start_day, 10;
+ set $@xmas2011_reward_start_day, 25;
+
// lines belong to easter 2011:
// set @month, 4;
// set @start_day, 15;
diff --git a/world/map/npc/scripts.conf b/world/map/npc/scripts.conf
index a15e57f6..96826a28 100644
--- a/world/map/npc/scripts.conf
+++ b/world/map/npc/scripts.conf
@@ -91,3 +91,5 @@ import: npc/_import.txt
// There has been some discussion about making this an annual quest,
// although there would need to be more work for that.
import: npc/halloween/2011/_import.txt
+
+import: npc/xmas/2011/_import.txt
diff --git a/world/map/npc/xmas/2011/_import.txt b/world/map/npc/xmas/2011/_import.txt
new file mode 100644
index 00000000..ac91097a
--- /dev/null
+++ b/world/map/npc/xmas/2011/_import.txt
@@ -0,0 +1,19 @@
+npc: npc/xmas/2011/badguy.txt
+npc: npc/xmas/2011/beddingHelper.txt
+npc: npc/xmas/2011/bodyguards.txt
+npc: npc/xmas/2011/chiefHelper.txt
+npc: npc/xmas/2011/deliverPresentsHelper.txt
+npc: npc/xmas/2011/doll.txt
+npc: npc/xmas/2011/entranceHelpers.txt
+npc: npc/xmas/2011/emptyBoxesHelper.txt
+npc: npc/xmas/2011/glitterHelper.txt
+npc: npc/xmas/2011/guardOfHonor.txt
+npc: npc/xmas/2011/illHelper.txt
+npc: npc/xmas/2011/leatherBall.txt
+npc: npc/xmas/2011/monsters.txt
+npc: npc/xmas/2011/plushMouboo.txt
+npc: npc/xmas/2011/reinboos.txt
+npc: npc/xmas/2011/santa.txt
+npc: npc/xmas/2011/stickReinboo.txt
+npc: npc/xmas/2011/xmas2011config.txt
+npc: npc/xmas/2011/wrappingPaperHelper.txt
diff --git a/world/map/npc/xmas/2011/badguy.txt b/world/map/npc/xmas/2011/badguy.txt
new file mode 100644
index 00000000..81f79972
--- /dev/null
+++ b/world/map/npc/xmas/2011/badguy.txt
@@ -0,0 +1,443 @@
+// This file is part of Christmas Event 2011
+// author: Jenalya
+// Balthasar is sent by Santa's antagonist to sabotage the preparations for Christmas
+// gives rewards depending on how much the player helped to sabotage
+
+030-2.gat,100,31,0|script|Balthasar|336,{
+
+ 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;
+ if ((BaseLevel > 30) && (gettimetick(2)-TUT_var < 3*7*86400)) // player must be created at least three weeks ago
+ goto L_NoHelp;
+
+ set @plushmouboo, (xmas11 & $@xmas11_PlushMoubooMask) >> $@xmas11_PlushMoubooShift;
+ set @stickreinboo, (xmas11 & $@xmas11_StickReinbooMask) >> $@xmas11_StickReinbooShift;
+ set @ball, (xmas11 & $@xmas11_BallMask) >> $@xmas11_BallShift;
+ set @doll, (xmas11 & $@xmas11_DollMask) >> $@xmas11_DollShift;
+
+ set @input_amount, 1;
+ set @output_amount, 3;
+
+ if (xmas11 & $@xmas11_talkedToBadGuy) goto L_Helping;
+
+ mes "[Sneaky person]";
+ mes "\"Hey there! Yes, you! Are you here to see the great Santa?";
+ mes "But he's hiding in his room, isn't he? Too busy for us normal people, right?\"";
+ next;
+ mes "\"Tell me... would you like to help me with some... trick?";
+ mes "Don't worry, nothing mean... just a joke. A joke, yes.\"";
+ menu
+ "Ahm, sure.",L_Agree,
+ "You're scary. I don't want to help you.",L_Disagree;
+
+L_Agree:
+ mes "He smiles.";
+ mes "[Sneaky person]";
+ mes "\"Very nice, yes, very nice. You will see, it is fun.";
+ mes "We'll just play some tricks to all this busy busy helpers of the great Santa.\"";
+ next;
+ mes "\"They're a bit mixed up.\"";
+ mes "He giggles in a very creepy way.";
+ next;
+ mes "[Sneaky person]";
+ mes "\"So, go to see if you can... help them. Talk to the Chief Helper, he should be somewhere upstairs. And when they ask you to do something...";
+ mes "You can come to ask the old Balthasar how we can trick them, eh?\"";
+ set xmas11, xmas11 | $@xmas11_talkedToBadGuy;
+ goto L_Close;
+
+L_Disagree:
+ mes "[Sneaky person]";
+ mes "\"Oh, com'on. Do you really think the old Balthasar is scary?";
+ mes "No, no, no, I'm very harmless. Like a baby.\"";
+ mes "He grins in a very creepy way.";
+ next;
+ mes "[Balthasar]";
+ mes "\"If you change your mind, just come back...\"";
+ set xmas11, xmas11 | $@xmas11_talkedToBadGuy;
+ goto L_Close;
+
+L_Helping:
+ mes "[Balthasar]";
+ mes "\"Welcome back my dear friend. Did you get any tasks to do? Did they ask you for help?";
+ mes "Maybe I can give you some advice how to... trick them. Yes, harmless tricks.\"";
+
+ cleararray @choice_idx, 0, 9;
+ cleararray @choice$, "", 9;
+
+ set @C_reinboo, 1;
+ set @C_bedding, 2;
+ set @C_glitter, 3;
+ set @C_potion, 4;
+ set @C_plushmouboo, 5;
+ set @C_stickreinboo, 6;
+ set @C_ball, 7;
+ set @C_doll, 8;
+ set @C_nevermind, 9;
+
+ // counter of available answers
+ set @choices_nr, 0;
+
+ if (!(xmas11 & $@xmas11_startedReinbooSearch))
+ goto L_NoReinboo;
+ set @choice_idx[@choices_nr], @C_reinboo;
+ set @choice$[@choices_nr], "I have to search some lost mouboos...";
+ set @choices_nr, @choices_nr + 1;
+
+L_NoReinboo:
+ if (!(xmas11 & $@xmas11_Bedding) || (xmas11 & $@xmas11_BeddingDone))
+ goto L_NoBedding;
+ set @choice_idx[@choices_nr], @C_bedding;
+ set @choice$[@choices_nr], "I shall get some White Fur as bedding.";
+ set @choices_nr, @choices_nr + 1;
+
+L_NoBedding:
+ if (!(xmas11 & $@xmas11_Decoration) || (xmas11 & $@xmas11_DecorationDone))
+ goto L_NoGlitter;
+ set @choice_idx[@choices_nr], @C_glitter;
+ set @choice$[@choices_nr], "They want Diamond and Ruby Powder for decoration.";
+ set @choices_nr, @choices_nr + 1;
+
+L_NoGlitter:
+ if (!(xmas11 & $@xmas11_Potion) || (xmas11 & $@xmas11_PotionDone))
+ goto L_NoPotion;
+ set @choice_idx[@choices_nr], @C_potion;
+ set @choice$[@choices_nr], "There is some helper not feeling well. He wants a Healing Potion.";
+ set @choices_nr, @choices_nr + 1;
+
+L_NoPotion:
+ if (@plushmouboo != 3)
+ goto L_NoPlushMouboo;
+ set @choice_idx[@choices_nr], @C_plushmouboo;
+ set @choice$[@choices_nr], "I have to pack this Plush Mouboo.";
+ set @choices_nr, @choices_nr + 1;
+
+L_NoPlushMouboo:
+ if (@stickreinboo != 3)
+ goto L_NoStickReinboo;
+ set @choice_idx[@choices_nr], @C_stickreinboo;
+ set @choice$[@choices_nr], "I have to pack this Stick Reinboo.";
+ set @choices_nr, @choices_nr + 1;
+
+L_NoStickReinboo:
+ if (@ball != 3)
+ goto L_NoBall;
+ set @choice_idx[@choices_nr], @C_ball;
+ set @choice$[@choices_nr], "I have to pack this Leather Ball.";
+ set @choices_nr, @choices_nr + 1;
+
+L_NoBall:
+ if (@doll != 3)
+ goto L_NoDoll;
+ set @choice_idx[@choices_nr], @C_doll;
+ set @choice$[@choices_nr], "I have to pack this Doll.";
+ set @choices_nr, @choices_nr + 1;
+
+L_NoDoll:
+ set @choice_idx[@choices_nr], @C_nevermind;
+ set @choice$[@choices_nr], "Nevermind and leave.";
+
+ menu
+ @choice$[0],-,
+ @choice$[1],-,
+ @choice$[2],-,
+ @choice$[3],-,
+ @choice$[4],-,
+ @choice$[5],-,
+ @choice$[6],-,
+ @choice$[7],-,
+ @choice$[8],-;
+
+ set @menu, @menu - 1;
+ if (@choice_idx[@menu] == 0)
+ goto L_Close;
+ if (@choice_idx[@menu] == @C_reinboo)
+ goto L_ReinbooAdvice;
+ if (@choice_idx[@menu] == @C_bedding)
+ goto L_BeddingAdvice;
+ if (@choice_idx[@menu] == @C_glitter)
+ goto L_GlitterAdvice;
+ if (@choice_idx[@menu] == @C_potion)
+ goto L_PotionAdvice;
+ if (@choice_idx[@menu] == @C_plushmouboo)
+ goto L_PlushMoubooWrapping;
+ if (@choice_idx[@menu] == @C_stickreinboo)
+ goto L_StickReinbooWrapping;
+ if (@choice_idx[@menu] == @C_ball)
+ goto L_BallWrapping;
+ if (@choice_idx[@menu] == @C_doll)
+ goto L_DollWrapping;
+ if ((@choice_idx[@menu] == @C_nevermind))
+ goto L_Close;
+ goto L_Close;
+
+L_ReinbooAdvice:
+ mes "Balthasar giggles spitefully.";
+ mes "[Balthasar]";
+ mes "\"Oh, right, the poor lost Reinboos. So far far away from home.\"";
+ next;
+ mes "\"They really really like candy and sweets.";
+ mes "It would be mean not to give them candy, wouldn't it?\"";
+ goto L_Close;
+
+L_BeddingAdvice:
+ mes "[Balthasar]";
+ mes "\"White Fur? Don't you think it's cruel to use fur for that? Real cruel, yes.";
+ mes "Why not using simple Cotton Cloth instead?\"";
+ goto L_Close;
+
+L_GlitterAdvice:
+ mes "[Balthasar]";
+ mes "\"Gem powder is expensive, isn't it? Too expensive to use it for glitter, don't you think so?";
+ mes "I can make you some replacement powder easily.\"";
+ next;
+ mes "Just bring my some powder of those fuzzy ball things, how are they called again?";
+ mes "Ah, Spectres and Wisps was it.\"";
+ menu
+ "Here is some Spectre Powder.",L_RedPowder,
+ "I have some Wisp Powder.",L_YellowPowder,
+ "I'll go and get it.",L_Close;
+ goto L_Close;
+
+L_PotionAdvice:
+ mes "[Balthasar]";
+ mes "\"Oh, feeling not well? What a poor guy! But drinking a healing potion...";
+ mes "It's much healthier to let the body recover itself, don't you think so?\"";
+ next;
+ mes "\"Too much medication is bad, yes, bad. Why don't you give him something nice to drink instead?\"";
+ goto L_Close;
+
+L_RedPowder:
+ if (countitem("SpectrePowder") < @input_amount)
+ goto L_NoItem;
+ delitem "SpectrePowder", @input_amount;
+ getitem "RedPowder", @output_amount;
+ mes "[Balthasar]";
+ mes "\"Here, here it is.\"";
+ goto L_Close;
+
+L_YellowPowder:
+ if (countitem("WispPowder") < @input_amount)
+ goto L_NoItem;
+ delitem "WispPowder", @input_amount;
+ getitem "YellowPowder", @output_amount;
+ mes "[Balthasar]";
+ mes "\"Here, here it is.\"";
+ goto L_Close;
+
+L_PlushMoubooWrapping:
+ mes "[Balthasar]";
+ mes "\"Oh, a Plush Mouboo - what a silly thing, really silly thing.";
+ mes "Don't you think we should put something more useful, expedient in that box?\"";
+ next;
+ mes "\"What about ... a nice Cotton Shirt? A decent Cotton Shirt would be nice, don't you think so?";
+ mes "Give me an Empty Present Box, some Cotton Shirt and that Plush Mouboo. I'll pack that box for you.\"";
+ menu
+ "Sure, here it is.",-,
+ "One Moment, I need to get the stuff.",L_Close,
+ "I don't think this is a good idea.",L_Close;
+ if ((countitem("CottonShirt") < 1) || (countitem("OpenPresentBox") < 1) || (countitem("PlushMouboo") < 1))
+ goto L_NoItem;
+ delitem "CottonShirt", 1;
+ delitem "OpenPresentBox", 1;
+ delitem "PlushMouboo", 1;
+ getitem "ClosedChristmasBox", 1;
+ set @plushmouboo, 4;
+ set xmas11, (xmas11 & ~($@xmas11_PlushMoubooMask) | (@plushmouboo << $@xmas11_PlushMoubooShift));
+ mes "He bags the Plush Mouboo you gave him and puts the cotton shirt into the box.";
+ goto L_Close;
+
+L_StickReinbooWrapping:
+ mes "[Balthasar]";
+ mes "\"Ooh, a stickreinboo! Don't you think this is an invidious thing for the reinboos? Really really mean, yes.";
+ mes "Do you know, reinboos are clever, they can even speak. And this is a toy reinboo! Very very disrespectful, right?\"";
+ next;
+ mes "\"Do you think... do you think we should punish the brat that wished for this disrespectful toy? I think so, yes, disrespectful brat.";
+ mes "Let's put... let's put a Raw Log in there instead, yes. Give me an Empty Present Box, some Raw Log and that Stick Reinboo. I'll prepare that box for you.\"";
+ menu
+ "Sure, here it is.",-,
+ "One Moment, I need to get the stuff.",L_Close,
+ "I think the Stick Reinboo is nice!",L_Close;
+ if ((countitem("RawLog") < 1) || (countitem("OpenPresentBox") < 1) || (countitem("StickReinboo") < 1))
+ goto L_NoItem;
+ delitem "RawLog", 1;
+ delitem "OpenPresentBox", 1;
+ delitem "StickReinboo", 1;
+ getitem "ClosedChristmasBox", 1;
+ set @stickreinboo, 4;
+ set xmas11, (xmas11 & ~($@xmas11_StickReinbooMask) | (@stickreinboo << $@xmas11_StickReinbooShift));
+ mes "He puts away the Stick Reinboo and packs the Raw Log in the box.";
+ goto L_Close;
+
+L_BallWrapping:
+ mes "[Balthasar]";
+ mes "\"A ball? Eh, ah, a ball... ah -";
+ mes "but what if the kid that gets it rather needs something to get warm?\"";
+ next;
+ mes "\"Let's put a piece of Coal in there instead! Yes, piece of Coal, that's good.";
+ mes "Empty Present Box, a piece of Coal and the Ball. I'll pack the box for you.\"";
+ menu
+ "Sure, here it is.",-,
+ "One Moment, I need to get the stuff.",L_Close,
+ "Come on, now you're getting really implausible.",L_Close;
+ if ((countitem("Coal") < 1) || (countitem("OpenPresentBox") < 1) || (countitem("LeatherBall") < 1))
+ goto L_NoItem;
+ delitem "Coal", 1;
+ delitem "OpenPresentBox", 1;
+ delitem "LeatherBall", 1;
+ getitem "ClosedChristmasBox", 1;
+ set @ball, 4;
+ set xmas11, (xmas11 & ~($@xmas11_BallMask) | (@ball << $@xmas11_BallShift));
+ mes "He takes the ball, puts the coal into the box and closes it.";
+ goto L_Close;
+
+
+L_DollWrapping:
+ mes "[Balthasar]";
+ mes "\"Let me see, have a look... Oh, they made that kind of doll already last year. This is not very creative, isn't it?";
+ mes "The child will be disappointed, yes, deeply disappointed to get such an ... uncool present, yes.\"";
+ next;
+ mes "\"We should fix that, yes, fix it. We can put some of these nice Mouboo Figurines in the box instead.";
+ mes "Bring me an Empty Present Box, a Mouboo Figurine and the Doll. I'll pack the box for you.\"";
+ menu
+ "Sure, here it is.",-,
+ "One Moment, I need to get the stuff.",L_Close,
+ "A Mouboo Figurine is lame.",L_Close;
+ if ((countitem("MoubooFigurine") < 1) || (countitem("OpenPresentBox") < 1) || (countitem("Doll") < 1))
+ goto L_NoItem;
+ delitem "MoubooFigurine", 1;
+ delitem "OpenPresentBox", 1;
+ delitem "Doll", 1;
+ getitem "ClosedChristmasBox", 1;
+ set @doll, 4;
+ set xmas11, (xmas11 & ~($@xmas11_DollMask) | (@doll << $@xmas11_DollShift));
+ mes "He puts the doll in his pocket and packs the Mouboo Figurine into the box.";
+ goto L_Close;
+
+L_NoEvent:
+ mes "[Balthasar]";
+ mes "\"How did you come in at this time of the year? As sneaky as I am, he?";
+ mes "But you should leave anyway.\"";
+ warp "030-1.gat", 99, 55;
+ goto L_Close;
+
+L_RewardTime:
+ callfunc "xmas2011points";
+ if (xmas11 & $@xmas11_BadGuyReward) goto L_Done;
+
+ if (@sabotagepoints == 0)
+ goto L_NoHelp;
+ getinventorylist;
+ if (@inventorylist_count > 80)
+ goto L_Full_Inv;
+ mes "[Balthasar]";
+
+ if (@sabotagepoints < $@xmas2011_main_rewardcost)
+ goto L_NoMainReward;
+ getitem "Sunglasses", 1;
+ set @sabotagepoints, @sabotagepoints - $@xmas2011_main_rewardcost;
+ mes "\"You've shown great skill in the art of infiltration and sabotage. I'm so proud on you, very proud, yes.\"";
+ next;
+
+L_NoMainReward:
+ if (@sabotagepoints < $@xmas2011_toy_rewardcost)
+ goto L_NoToyReward;
+L_ToyAgain:
+ set @toy_reward, rand(4);
+ if (@toy_reward == 0)
+ getitem "PlushMouboo", 1;
+ if (@toy_reward == 1)
+ getitem "StickReinboo", 1;
+ if (@toy_reward == 2)
+ getitem "Doll", 1;
+ if (@toy_reward == 3)
+ getitem "LeatherBall", 1;
+ set @sabotagepoints, @sabotagepoints - $@xmas2011_toy_rewardcost;
+ if (@sabotagepoints >= $@xmas2011_toy_rewardcost)
+ goto L_ToyAgain;
+ mes "\"I think you earned yourself some fun with this toy things.\"";
+ next;
+
+L_NoToyReward:
+ if (@sabotagepoints < $@xmas2011_gloves_rewardcost)
+ goto L_NoGlovesReward;
+ set @gloves, $@glove_id + rand(10);
+ getitem @gloves, 1;
+ set @sabotagepoints, @sabotagepoints - $@xmas2011_gloves_rewardcost;
+ mes "\"This will help to keep your hands warm when operating in such cold areas.\"";
+ next;
+
+L_NoGlovesReward:
+ if (@sabotagepoints == 0)
+ goto L_Done;
+ mes "\"Have some candy.\"";
+ next;
+ if (@sabotagepoints < $@xmas2011_gingerbreadman_rewardcost)
+ goto L_NoGBMReward;
+ set @candy_amount, @sabotagepoints/$@xmas2011_gingerbreadman_rewardcost;
+ getitem "GingerBreadMan", @candy_amount;
+ set @sabotagepoints, @sabotagepoints - @candy_amount*$@xmas2011_gingerbreadman_rewardcost;
+L_NoGBMReward:
+ if (@sabotagepoints < $@xmas2011_xmascake_rewardcost)
+ goto L_NoXmasCakeReward;
+ set @candy_amount, @sabotagepoints/$@xmas2011_xmascake_rewardcost;
+ getitem "XmasCake", @candy_amount;
+ set @sabotagepoints, @sabotagepoints - @candy_amount*$@xmas2011_xmascake_rewardcost;
+L_NoXmasCakeReward:
+ if (@sabotagepoints < $@xmas2011_candy_rewardcost)
+ goto L_Done;
+ set @candy_amount, @sabotagepoints/$@xmas2011_candy_rewardcost;
+ getitem "Candy", @candy_amount;
+ set @sabotagepoints, @sabotagepoints - @candy_amount*$@xmas2011_candy_rewardcost;
+
+L_Done:
+ mes "[Balthasar]";
+ mes "\"It was so much fun, wasn't it?\"";
+ set xmas11, xmas11 | $@xmas11_BadGuyReward;
+ goto L_Close;
+
+L_NoItem:
+ mes "[Balthasar]";
+ mes "\"Eh? Where is it? Go and get it!\"";
+ goto L_Close;
+
+L_Full_Inv:
+ mes "[Balthasar]";
+ mes "\"Oh, you have a lot of stuff with you, yes many many things. I'm going to give you some ... allowance for your effort.";
+ mes "Come back with less things in your backpack.\"";
+ goto L_Close;
+
+L_NoHelp:
+ mes "[Balthasar]";
+ mes "\"Eh? Are you having fun with the cheesy Christmas stuff? Pah.\"";
+ goto L_Close;
+
+L_Close:
+ set @input_amount, 0;
+ set @output_amount, 0;
+ set @plushmouboo, 0;
+ set @stickreinboo, 0;
+ set @ball, 0;
+ set @doll, 0;
+ set @C_reinboo, 0;
+ set @C_bedding, 0;
+ set @C_glitter, 0;
+ set @C_potion, 0;
+ set @C_plushmouboo, 0;
+ set @C_stickreinboo, 0;
+ set @C_ball, 0;
+ set @C_doll, 0;
+ set @C_nervermind, 0;
+ set @choices_nr, 0;
+ cleararray @choice_idx, 0, 9;
+ cleararray @choice$, "", 9;
+ set @menu, 0;
+ set @inventorylist_count, 0;
+ set @toy_reward, 0;
+ set @gloves, 0;
+ set @candy_amount, 0;
+ set @sabotagepoints, 0;
+ set @helppoints, 0;
+ close;
+}
diff --git a/world/map/npc/xmas/2011/beddingHelper.txt b/world/map/npc/xmas/2011/beddingHelper.txt
new file mode 100644
index 00000000..0398505c
--- /dev/null
+++ b/world/map/npc/xmas/2011/beddingHelper.txt
@@ -0,0 +1,103 @@
+// This file is part of Christmas Event 2011
+// author: Jenalya
+// Osmo asks for some White Fur which is used for bedding some presents in the boxes
+// can be sabotaged by given Cloth instead
+// 00 not talked
+// 10 asked for Bedding
+// 01 done in good way
+// 11 done in bad way
+
+030-2.gat,37,77,0|script|Osmo|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 @bedding_amount, 10;
+
+ if (xmas11 & $@xmas11_BeddingDone) goto L_Done;
+ if (xmas11 & $@xmas11_Bedding) goto L_Bedding;
+ if (xmas11 & $@xmas11_talkedToChief) goto L_Helping;
+
+ mes "[Busy Helper]";
+ mes "\"What? Uh, excuse me, I have some work to do.\"";
+ goto L_Close;
+
+L_Helping:
+ mes "[Osmo]";
+ mes "\"You just came here in the right moment. I was informed that our bedding material for fragile presents is nearly expended.";
+ mes "Could you bring me " + @bedding_amount + " White Furs?\"";
+ next;
+ mes "[Osmo]";
+ mes "\"Take care that it's real White Fur.";
+ mes "Other materials tend to go out of place in the present box, leaving the fragile content extradited to any pushes.\"";
+ set xmas11, xmas11 | $@xmas11_Bedding;
+ goto L_Close;
+
+L_Bedding:
+ mes "[Osmo]";
+ mes "\"Ah, you're back. Do you have the " + @bedding_amount + " White Fur needed as bedding for fragile presents?\"";
+ if ((countitem("WhiteFur") >= @bedding_amount) && (countitem("CottonCloth") >= @bedding_amount))
+ menu
+ "Yeah, here it is. (Give the White Fur.)",L_Fur,
+ "Sure, here it is. (Give the Cotton Cloth.)",L_Cloth,
+ "No, I'm still working on that.",L_Close;
+ if (countitem("WhiteFur") >= @bedding_amount)
+ menu
+ "Yeah, here it is. (Give the White Fur.)",L_Fur,
+ "No, I'm still working on that.",L_Close;
+ if (countitem("CottonCloth") >= @bedding_amount)
+ menu
+ "Sure, here it is. (Give the Cotton Cloth.)",L_Cloth,
+ "No, I'm still working on that.",L_Close;
+ goto L_Close;
+
+L_Fur:
+ if (countitem("WhiteFur") < @bedding_amount)
+ goto L_NoItems;
+ delitem "WhiteFur", @bedding_amount;
+ set xmas11, xmas11 & ~$@xmas11_Bedding;
+ set xmas11, xmas11 | $@xmas11_BeddingDone;
+ mes "[Osmo]";
+ mes "\"Wonderful! Thanks for your effort.\"";
+ goto L_Close;
+
+L_Cloth:
+ if (countitem("CottonCloth") < @bedding_amount)
+ goto L_NoItems;
+ delitem "CottonCloth", @bedding_amount;
+ set xmas11, xmas11 | $@xmas11_BeddingDone;
+ mes "He doesn't notice that you're giving him Cotton Cloth.";
+ mes "[Osmo]";
+ mes "\"Wonderful! Thanks for your effort.\"";
+ goto L_Close;
+
+L_Done:
+ mes "[Osmo]";
+ if (xmas11 & $@xmas11_Bedding)
+ mes "\"The Fur you brought me isn't working very well.\"";
+ if (!(xmas11 & $@xmas11_Bedding))
+ mes "\"Thanks for helping out with the bedding material.\"";
+ goto L_Close;
+
+L_NoEvent:
+ mes "[Osmo]";
+ 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 "[Osmo]";
+ mes "\"I have to say that I'm satisfied with our work, even if it was very stressful this year.\"";
+ goto L_Close;
+
+L_NoItems:
+ mes "[Osmo]";
+ mes "\"Where do you have it? Is this a joke?\"";
+ goto L_Close;
+
+L_Close:
+ set @bedding_amount, 0;
+ close;
+}
diff --git a/world/map/npc/xmas/2011/bodyguards.txt b/world/map/npc/xmas/2011/bodyguards.txt
new file mode 100644
index 00000000..84eda7a7
--- /dev/null
+++ b/world/map/npc/xmas/2011/bodyguards.txt
@@ -0,0 +1,120 @@
+// This file is part of Christmas Event 2011
+// author: Jenalya
+// Bodyguards who don't let you enter Santa's room until after Christmas
+
+030-2.gat,76,88,0|script|Vilhelmiina|335,{
+
+ 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;
+
+ mes "[Vilhelmiina]";
+ mes "\"You can't get in that room now. Santa is very busy.\"";
+ menu
+ "But I want to talk to Santa!",-,
+ "Understood.",L_Close;
+ mes "[Vilhelmiina]";
+ mes "\"So? Now guess what me and my brother are here for?\"";
+ goto L_Close;
+
+L_NoEvent:
+ mes "[Vilhelmiina]";
+ mes "\"How did you get in? At this time of the year this house isn't in use.\"";
+ warp "030-1.gat", 99, 55;
+ goto L_Close;
+
+L_RewardTime:
+ mes "[Vilhelmiina]";
+ mes "\"Santa welcomes visitors now. You may enter.\"";
+ goto L_Close;
+
+L_Close:
+ close;
+}
+
+030-2.gat,80,88,0|script|Verneri|334,{
+
+ 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;
+
+ mes "[Verneri]";
+ mes "\"This is Santa's room.\"";
+ menu
+ "I want to see him!",-,
+ "Ok.",L_Close;
+ mes "The bodyguard takes a daunting look over his glasses at you.";
+ mes "[Verneri]";
+ mes "\"No.\"";
+ goto L_Close;
+
+L_NoEvent:
+ mes "[Verneri]";
+ mes "\"What are you doing in here? At this time of the year this house isn't in use.\"";
+ warp "030-1.gat", 99, 55;
+ goto L_Close;
+
+L_RewardTime:
+ mes "[Verneri]";
+ mes "\"You can enter now.\"";
+ goto L_Close;
+
+L_Close:
+ close;
+}
+
+030-2.gat,152,22,0|script|Vanamo|332,{
+ if (!(gettime(7) == $@xmas2011_year && gettime(6) == 12 && gettime(5) >= $@xmas2011_start_day))
+ goto L_NoEvent;
+
+ mes "[Vanamo]";
+ mes "\"This area is restricted. You're not allowed to enter.\"";
+ close;
+
+L_NoEvent:
+ mes "[Vanamo]";
+ mes "\"What are you doing in here? At this time of the year this house isn't in use.\"";
+ warp "030-1.gat", 99, 55;
+ close;
+}
+
+030-2.gat,89,23,0|script|Vihtori|333,{
+ if (!(gettime(7) == $@xmas2011_year && gettime(6) == 12 && gettime(5) >= $@xmas2011_start_day))
+ goto L_NoEvent;
+
+ mes "[Vihtori]";
+ mes "\"Mh? I'm having a break.\"";
+ close;
+
+L_NoEvent:
+ mes "[Vihtori]";
+ mes "\"What are you doing in here? At this time of the year this house isn't in use.\"";
+ warp "030-1.gat", 99, 55;
+ close;
+}
+
+// door to Santa's room
+030-2.gat,78,87,0|script|#door|127,1,1{
+
+ if ((gettime(7) == $@xmas2011_year && gettime(6) == 12 && gettime(5) >= $@xmas2011_reward_start_day))
+ goto L_RewardTime;
+ end;
+
+L_RewardTime:
+ warp "030-2.gat", 194, 67;
+ end;
+}
+
+// entrance of the building
+030-1.gat,99,53,0|script|#Door|127,1,1,{
+
+ if (!(gettime(7) == $@xmas2011_year && gettime(6) == 12 && gettime(5) >= $@xmas2011_start_day))
+ goto L_NoEvent;
+
+ warp "030-2.gat", 88, 50;
+
+L_NoEvent:
+ end;
+}
diff --git a/world/map/npc/xmas/2011/chiefHelper.txt b/world/map/npc/xmas/2011/chiefHelper.txt
new file mode 100644
index 00000000..5e87ebac
--- /dev/null
+++ b/world/map/npc/xmas/2011/chiefHelper.txt
@@ -0,0 +1,81 @@
+// This file is part of Christmas Event 2011
+// author: Jenalya
+// Warrick is the Chief of Santa's helpers, starts the quest
+
+030-2.gat,87,77,0|script|Chief Warrick|329,{
+
+ 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;
+ if ((BaseLevel > 30) && (gettimetick(2)-TUT_var < 3*7*86400)) // player must be created at least three weeks ago
+ goto L_NoHelp;
+
+ if (xmas11 & $@xmas11_talkedToChief) goto L_Helping;
+
+ mes "[Important looking Person]";
+ mes "\"Welcome to the home of Santa! My name is Warrick, I'm the chief of Santa's helpers.";
+ mes "As you certainly know Christmas is near. Therefore we're very very busy.\"";
+ next;
+ mes "\"For this reason I have to ask you to leave and come back some at some more convenient time.\"";
+ menu
+ "But I want to see Santa!",-,
+ "I'm so excited! This is really Santa's house?",-,
+ "This is not very friendly. Isn't Christmas about love and happiness and all?",-;
+ mes "Warrick sighs.";
+ mes "[Chief Warrick]";
+ mes "\"Usually we'd be more obliging. But this year - our preparations for Christmas -";
+ mes "Everything goes wrong, we're missing ingredients for the Christmas candy and material for the toys.";
+ mes "The lists about the good and bad kids got mixed up, everything is in utter confusion.";
+ mes "And to make matters worse some of the reinboos are missing!\"";
+ next;
+ mes "\"Oh, please excuse me. I didn't mean to moan.";
+ mes "However, as you can see we have to deal with some serious problems here.";
+ mes "So I'd appreciate if you could just leave and not interfere.\"";
+ menu
+ "But I can help!",-;
+ mes "He hesitates.";
+ mes "[Chief Warrick]";
+ mes "\"I'm not sure...\"";
+ menu
+ "Really, I can do a lot of things.",-;
+ mes "[Chief Warrick]";
+ mes "\"Well, alright. I suppose it can't get worse than it already is.";
+ mes "Go to the helpers all over the house and ask them what is needed.";
+ mes "This will show you're hired as a co-helper.\"";
+ mes "He stabs your chest with his finger and leaves a blinking mark.";
+ set xmas11, xmas11 | $@xmas11_talkedToChief;
+ goto L_Close;
+
+L_Helping:
+ mes "[Chief Warrick]";
+ mes "\"I hope you're doing well.\"";
+ goto L_Close;
+
+L_NoEvent:
+ mes "[Chief Warrick]";
+ 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 "Warrick looks really tired.";
+ mes "[Chief Warrick]";
+ mes "\"I'm so glad it's over for this year.";
+ mes "Did you already talk to Santa?\"";
+ goto L_Close;
+
+L_NoHelp:
+ mes "[Chief Warrick]";
+ mes "\"Hello young one. Welcome to Santa's house.";
+ mes "Have a look around and enjoy your visit, but please don't interrupt the busy helpers.\"";
+ mes "He smiles at you.";
+ goto L_Close;
+
+L_Close:
+ close;
+}
+
+//030-2.gat,85,33,0|script|Debug|105,{
+// callfunc "xmas2011debug";
+//}
diff --git a/world/map/npc/xmas/2011/deliverPresentsHelper.txt b/world/map/npc/xmas/2011/deliverPresentsHelper.txt
new file mode 100644
index 00000000..8bf4d9ed
--- /dev/null
+++ b/world/map/npc/xmas/2011/deliverPresentsHelper.txt
@@ -0,0 +1,275 @@
+// author: Jenalya
+// Aaron collects the finished toys
+// good way: give toy + open box + wrapping
+// bad way: give closed box prepared at the bad guy + wrapping
+
+030-2.gat,127,41,0|script|Aaron|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 @plushmouboo, (xmas11 & $@xmas11_PlushMoubooMask) >> $@xmas11_PlushMoubooShift;
+ set @stickreinboo, (xmas11 & $@xmas11_StickReinbooMask) >> $@xmas11_StickReinbooShift;
+ set @ball, (xmas11 & $@xmas11_BallMask) >> $@xmas11_BallShift;
+ set @doll, (xmas11 & $@xmas11_DollMask) >> $@xmas11_DollShift;
+
+ if (xmas11 & $@xmas11_talkedToChief) goto L_Helping;
+
+ mes "[Busy Helper]";
+ mes "\"This is a disaster!\"";
+ goto L_Close;
+
+L_Helping:
+ mes "[Aaron]";
+ mes "\"Hello there! Do you have any finished toys ready for being packed and wrapped?";
+ mes "We also need an empty box and wrapping paper.\"";
+
+ cleararray @choice_idx, 0, 9;
+ cleararray @choice$, "", 9;
+
+ set @C_plushmouboo, 1;
+ set @C_plushmouboobox, 2;
+ set @C_stickreinboo, 3;
+ set @C_stickreinboobox, 4;
+ set @C_ball, 5;
+ set @C_ballbox, 6;
+ set @C_doll, 7;
+ set @C_dollbox, 8;
+ set @C_nevermind, 9;
+
+ // counter of available answers
+ set @choices_nr, 0;
+
+ if (@plushmouboo != 3)
+ goto L_NoPlushMouboo;
+ set @choice_idx[@choices_nr], @C_plushmouboo;
+ set @choice$[@choices_nr], "This Plush Mouboo needs to be packed.";
+ set @choices_nr, @choices_nr + 1;
+
+L_NoPlushMouboo:
+ if (@plushmouboo != 4)
+ goto L_NoPlushMoubooBox;
+ set @choice_idx[@choices_nr], @C_plushmouboobox;
+ set @choice$[@choices_nr], "I already packed this Plush Mouboo...";
+ set @choices_nr, @choices_nr + 1;
+
+L_NoPlushMoubooBox:
+ if (@stickreinboo != 3)
+ goto L_NoStickReinboo;
+ set @choice_idx[@choices_nr], @C_stickreinboo;
+ set @choice$[@choices_nr], "This Stick Reinboo needs to be packed.";
+ set @choices_nr, @choices_nr + 1;
+
+L_NoStickReinboo:
+ if (@stickreinboo != 4)
+ goto L_NoStickReinbooBox;
+ set @choice_idx[@choices_nr], @C_stickreinboobox;
+ set @choice$[@choices_nr], "I already packed this Stick Reinboo...";
+ set @choices_nr, @choices_nr + 1;
+
+L_NoStickReinbooBox:
+ if (@ball != 3)
+ goto L_NoBall;
+ set @choice_idx[@choices_nr], @C_ball;
+ set @choice$[@choices_nr], "This Leather Ball needs to be packed.";
+ set @choices_nr, @choices_nr + 1;
+
+L_NoBall:
+ if (@stickreinboo != 4)
+ goto L_NoBallBox;
+ set @choice_idx[@choices_nr], @C_ballbox;
+ set @choice$[@choices_nr], "I already packed this Leather Ball...";
+ set @choices_nr, @choices_nr + 1;
+
+L_NoBallBox:
+ if (@doll != 3)
+ goto L_NoDoll;
+ set @choice_idx[@choices_nr], @C_doll;
+ set @choice$[@choices_nr], "This Doll needs to be packed.";
+ set @choices_nr, @choices_nr + 1;
+
+L_NoDoll:
+ if (@doll != 4)
+ goto L_NoDollBox;
+ set @choice_idx[@choices_nr], @C_dollbox;
+ set @choice$[@choices_nr], "I already packed this Doll...";
+ set @choices_nr, @choices_nr + 1;
+
+L_NoDollBox:
+ set @choice_idx[@choices_nr], @C_nevermind;
+ set @choice$[@choices_nr], "I'll be back later.";
+
+ menu
+ @choice$[0],-,
+ @choice$[1],-,
+ @choice$[2],-,
+ @choice$[3],-,
+ @choice$[4],-,
+ @choice$[5],-,
+ @choice$[6],-,
+ @choice$[7],-,
+ @choice$[8],-;
+
+ set @menu, @menu - 1;
+ if (@choice_idx[@menu] == 0)
+ goto L_Close;
+
+ if ((@choice_idx[@menu] == @C_plushmouboo)|| (@choice_idx[@menu] == @C_plushmouboobox))
+ set @toy$, "PlushMouboo";
+ if (@choice_idx[@menu] == @C_plushmouboo)
+ goto L_Pack;
+ if (@choice_idx[@menu] == @C_plushmouboobox)
+ goto L_Wrap;
+
+ if ((@choice_idx[@menu] == @C_stickreinboo) || (@choice_idx[@menu] == @C_stickreinboobox))
+ set @toy$, "StickReinboo";
+ if (@choice_idx[@menu] == @C_stickreinboo)
+ goto L_Pack;
+ if (@choice_idx[@menu] == @C_stickreinboobox)
+ goto L_Wrap;
+
+ if ((@choice_idx[@menu] == @C_ball) || (@choice_idx[@menu] == @C_ballbox))
+ set @toy$, "LeatherBall";
+ if (@choice_idx[@menu] == @C_ball)
+ goto L_Pack;
+ if (@choice_idx[@menu] == @C_ballbox)
+ goto L_Wrap;
+
+ if ((@choice_idx[@menu] == @C_doll) || (@choice_idx[@menu] == @C_dollbox))
+ set @toy$, "Doll";
+ if (@choice_idx[@menu] == @C_doll)
+ goto L_Pack;
+ if (@choice_idx[@menu] == @C_dollbox)
+ goto L_Wrap;
+
+ if ((@choice_idx[@menu] == @C_nevermind))
+ goto L_Close;
+ goto L_Close;
+
+L_Pack:
+ mes "[Aaron]";
+ mes "\"Very well, do you also have a box and wrapping paper?\"";
+
+ callsub S_WrappingColor;
+
+ if ((countitem("OpenPresentBox") < 1) || (countitem(@wrappingColor$) < 1) || (countitem(@toy$) < 1))
+ goto L_NoItems;
+ delitem "OpenPresentBox", 1;
+ delitem @wrappingColor$, 1;
+ delitem @toy$, 1;
+ mes "[Aaron]";
+ mes "\"Excellent! Give it to me!\"";
+ mes "He takes the box, puts the toy into it and wraps it skillfully with the paper you gave him.";
+ mes "Then he writes something on a paper next to him.";
+ goto L_Deliver;
+
+L_Wrap:
+ mes "[Aaron]";
+ mes "\"Ah, even better! Do you also have some wrapping paper?\"";
+
+ callsub S_WrappingColor;
+
+ if ((countitem("ClosedChristmasBox") < 1) || (countitem(@wrappingColor$) < 1))
+ goto L_NoItems;
+ delitem "ClosedChristmasBox", 1;
+ delitem @wrappingColor$, 1;
+ mes "[Aaron]";
+ mes "\"Alright. Give it to me.\"";
+ mes "He takes the box and wraps it elaborately with the paper you gave him.";
+ mes "Then he writes something on a paper next to him.";
+ goto L_Deliver;
+
+L_Deliver:
+ if ((@toy$ == "PlushMouboo") && (@plushmouboo == 3))
+ set @plushmouboo, 5;
+ if ((@toy$ == "PlushMouboo") && (@plushmouboo == 4))
+ set @plushmouboo, 6;
+ if (@toy$ == "PlushMouboo")
+ set xmas11, (xmas11 & ~($@xmas11_PlushMoubooMask) | (@plushmouboo << $@xmas11_PlushMoubooShift));
+
+ if ((@toy$ == "StickReinboo") && (@stickreinboo == 3))
+ set @stickreinboo, 5;
+ if ((@toy$ == "StickReinboo") && (@stickreinboo == 4))
+ set @stickreinboo, 6;
+ if (@toy$ == "StickReinboo")
+ set xmas11, (xmas11 & ~($@xmas11_StickReinbooMask) | (@stickreinboo << $@xmas11_StickReinbooShift));
+
+ if ((@toy$ == "LeatherBall") && (@ball == 3))
+ set @ball, 5;
+ if ((@toy$ == "LeatherBall") && (@ball == 4))
+ set @ball, 6;
+ if (@toy$ == "LeatherBall")
+ set xmas11, (xmas11 & ~($@xmas11_BallMask) | (@ball << $@xmas11_BallShift));
+
+ if ((@toy$ == "Doll") && (@doll == 3))
+ set @doll, 5;
+ if ((@toy$ == "Doll") && (@doll == 4))
+ set @doll, 6;
+ if (@toy$ == "Doll")
+ set xmas11, (xmas11 & ~($@xmas11_DollMask) | (@doll << $@xmas11_DollShift));
+
+ goto L_Close;
+
+L_NoEvent:
+ mes "[Aaron]";
+ 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 "[Aaron]";
+ mes "\"This was a lot of hard work this year.\"";
+ goto L_Close;
+
+L_NoItems:
+ mes "[Aaron]";
+ mes "\"Don't be silly. Where are the items?\"";
+ goto L_Close;
+
+L_Close:
+ set @plushmouboo, 0;
+ set @stickreinboo, 0;
+ set @ball, 0;
+ set @doll, 0;
+ set @C_plushmouboo, 0;
+ set @C_plushmouboobox, 0;
+ set @C_stickreinboo, 0;
+ set @C_stickreinboobox, 0;
+ set @C_ball, 0;
+ set @C_ballbox, 0;
+ set @C_doll, 0;
+ set @C_dollbox, 0;
+ set @C_nevermind, 0;
+ set @choices_nr, 0;
+ cleararray @choice_idx, 0, 9;
+ cleararray @choice$, "", 9;
+ set @menu, 0;
+ set @toy$, "";
+ set @wrappingColor$, "";
+ close;
+
+S_WrappingColor:
+ menu
+ "Yeah, I have this red dotted.",-,
+ "Sure, see this yellow dotted.",-,
+ "Yes, what about this blue dotted?",-,
+ "Here, I have this purple striped.",-,
+ "Isn't this red golden striped one wonderful?",-,
+ "Here is this green red striped.",-,
+ "No, I'll get it.",L_Close;
+ if (@menu == 1)
+ set @wrappingColor$, "RedDottedWrap";
+ if (@menu == 2)
+ set @wrappingColor$, "YellowDottedWrap";
+ if (@menu == 3)
+ set @wrappingColor$, "BlueDottedWrap";
+ if (@menu == 4)
+ set @wrappingColor$, "PurpleStripedWrap";
+ if (@menu == 5)
+ set @wrappingColor$, "RedGoldenStripedWrap";
+ if (@menu == 6)
+ set @wrappingColor$, "GreenRedStripedWrap";
+ return;
+}
diff --git a/world/map/npc/xmas/2011/doll.txt b/world/map/npc/xmas/2011/doll.txt
new file mode 100644
index 00000000..a436c4bf
--- /dev/null
+++ b/world/map/npc/xmas/2011/doll.txt
@@ -0,0 +1,163 @@
+// This file is part of Christmas Event 2011
+// author: Jenalya
+// Doll states:
+// 1: got order from Taito
+// 2: Raimo said that he needs more material
+// 3: Raimo created the Doll
+// 4: gave Doll to the bad guy
+// 5: delivered the Doll without giving it to the bad guy
+// 6: delivered fake present instead of Doll
+
+030-2.gat,37,85,0|script|Taito|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 @doll, (xmas11 & $@xmas11_DollMask) >> $@xmas11_DollShift;
+
+ if (@doll > 0) goto L_Ordered;
+ if (xmas11 & $@xmas11_talkedToChief) goto L_Helping;
+
+ mes "This helper is very concentrated on his paperworks.";
+ mes "[Busy Helper]";
+ mes "\"Ah! You startled me! I need to do some paperwork, please don't sneak up on me like that!\"";
+ goto L_Close;
+
+L_Helping:
+ mes "[Taito]";
+ mes "\"Hm? Oh, you're here to help? Very good, I have something you could do.\"";
+ mes "He gives you some piece of paper. It looks very confusing to you.";
+ next;
+ mes "[Taito]";
+ mes "\"Please bring this to Raimo.\"";
+ set @doll, 1;
+ set xmas11, (xmas11 & ~($@xmas11_DollMask) | (@doll << $@xmas11_DollShift));
+ goto L_Close;
+
+L_Ordered:
+ mes "[Taito]";
+ mes "\"Oh? I'm sorry I was very concentrated. I don't have more tasks for you.\"";
+ goto L_Close;
+
+L_NoEvent:
+ mes "[Taito]";
+ 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 "Taito is fallen asleep on his desk.";
+ goto L_Close;
+
+L_Close:
+ set @doll, 0;
+ close;
+}
+
+030-2.gat,153,39,0|script|Raimo|329,{
+
+ 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 @doll, (xmas11 & $@xmas11_DollMask) >> $@xmas11_DollShift;
+ set @cotton_amount, 2;
+ set @dye_amount, 2;
+ set @spike_amount, 2;
+
+ if (@doll >= 3) goto L_DollDone;
+ if (@doll == 2) goto L_Doll;
+ if (xmas11 & $@xmas11_talkedToChief) goto L_Helping;
+
+ mes "The helper is busy sorting some tools and materials.";
+ goto L_Close;
+
+L_Helping:
+ mes "[Raimo]";
+ mes "\"Oh, hello. Do you have something to do? Because I don't have. We're only allowed to create toys that were ordered!";
+ mes "And now I'm sitting here with nothing to do but sorting my tools. Which are already sorted.\"";
+ mes "He sighs.";
+ if (@doll == 0)
+ goto L_Close;
+ next;
+ menu
+ "Taito gave me this paper for you.",-,
+ "Oh, that's not nice.", L_Close;
+ mes "[Raimo]";
+ mes "\"Ah, let's see! Mh, a doll. I think there are some materials missing.";
+ mes "Could you bring me " + @cotton_amount + " Cotton Cloths, " + @dye_amount + " Light Blue Dyes and " + @spike_amount + " Hard Spikes?";
+ set @doll, 2;
+ callsub S_Update_Var;
+ goto L_Close;
+
+L_Doll:
+ mes "[Raimo]";
+ mes "\"I need " + @cotton_amount + " Cotton Cloths, " + @dye_amount + " Light Blue Dyes and " + @spike_amount + " Hard Spikes for the Doll.\"";
+ menu
+ "Here it is.",-,
+ "I don't have it yet.",L_Close;
+ if ((countitem("CottonCloth") < @cotton_amount) || (countitem("LightBlueDye") < @dye_amount) || (countitem("HardSpike") < @spikes_amount))
+ goto L_NoItems;
+ delitem "CottonCloth", @cotton_amount;
+ delitem "LightBlueDye", @dye_amount;
+ delitem "HardSpike", @spikes_amount;
+ set @doll, 3;
+ callsub S_Update_Var;
+ getitem "Doll", 1;
+ mes "[Raimo]";
+ mes "\"Alright, let's start.\"";
+ mes "He takes your items and start to many different things.";
+ mes "He dyes the Cotton Cloths and while waiting for it to dry, he takes out a doll without hair, clothes and face from his workbench.";
+ mes "It seems he already prepared that. He rummages in another drawer of his workbench and pulls out a ball of red wool.";
+ mes "While attaching strings of wool to the dolls head, he talks to you.";
+ next;
+ mes "[Raimo]";
+ mes "\"You know, usually it's really fun to be one of Santa's helpers. But this year something's going really wrong. I wonder what's the reason for this.";
+ mes "All kind of material deliveries went wrong, the guys up in the office are all roused up because their paperwork got mixed up and I heard some of the Reinboos are lost!\"";
+ next;
+ mes "\"It's kind of odd, isn't it?\"";
+ mes "While he was talking, he finished attaching the hair and got to tailor a cute little dress from the dyed Cotton Cloths.";
+ mes "He carefully puts on the dressand takes the Hard Spikes you gave him.";
+ next;
+ mes "[Raimo]";
+ mes "\"These spikes are excellent for making eyes, have a look.\"";
+ mes "He takes a sharp knife and starts carving them. After a short while he has managed to bring them in a round shape, with a gap on the backside part. He takes a needle and sewing thread and attches them to the dolls face.";
+ next;
+ mes "[Raimo]";
+ mes "\"Alright, it's done. Could you please bring it to Aaron?\"";
+ goto L_Close;
+
+L_DollDone:
+ mes "[Raimo]";
+ mes "\"Do you have another order for me? I'm bored.\"";
+ goto L_Close;
+
+L_NoEvent:
+ mes "[Raimo]";
+ 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 "[Raimo]";
+ mes "\"Ah, we're finally done for this year.\"";
+ goto L_Close;
+
+L_NoItems:
+ mes "[Raimo]";
+ mes "\"You don't have it!\"";
+ goto L_Close;
+
+L_Close:
+ set @cotton_amount, 0;
+ set @fur_amount, 0;
+ set @doll, 0;
+ close;
+
+S_Update_Var:
+ set xmas11, (xmas11 & ~($@xmas11_DollMask) | (@doll << $@xmas11_DollShift));
+ return;
+}
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;
+}
diff --git a/world/map/npc/xmas/2011/entranceHelpers.txt b/world/map/npc/xmas/2011/entranceHelpers.txt
new file mode 100644
index 00000000..03a606aa
--- /dev/null
+++ b/world/map/npc/xmas/2011/entranceHelpers.txt
@@ -0,0 +1,73 @@
+// This file is part of Christmas Event 2011
+// author: Jenalya
+// The NPCs in this file are for background information
+
+030-2.gat,74,29,0|script|Vellamo|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;
+ mes "[Vellamo]";
+ mes "\"This terrible slimes! It's a disaster!";
+ mes "No matter what I do they always come back!\"";
+ next;
+ mes "\"How am I supposed to work under these conditions!";
+ mes "This is absoutely not acceptable! Those icky slimes!\"";
+ next;
+ mes "\"They occupied the entire basement where all our materials and all the remaining presents are stored.";
+ mes "Grrrr.\"";
+ mes "He seems too freaked out to have a decent conversation.";
+ goto L_Close;
+
+L_NoEvent:
+ mes "[Vellamo]";
+ 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 "[Vellamo]";
+ mes "\"The slimes are still there.\"";
+ mes "Vellamo seems to be totally overwrought.";
+ goto L_Close;
+
+L_Close:
+ close;
+}
+
+// welcome Guy
+030-2.gat,87,40,0|script|Valtteri|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;
+
+ mes "[Valterri]";
+ mes "\"Welcome to Santa's house.";
+ mes "We're currently busy with the preparations for Christmas, so please don't interrupt the helpers.\"";
+ menu
+ "Wow, this place looks much smaller from the outside.",-,
+ "Thank you.",L_Close;
+ mes "[Valterri]";
+ mes "\"Isn't it obvious? Magic!";
+ mes "Santa is a member of the Sages of Kazei, a council of powerful wizards who rule our lands.\"";
+ goto L_Close;
+
+L_RewardTime:
+ mes "[Valterri]";
+ mes "\"Welcome to Santa's house.";
+ next;
+ mes "We just finished the Christmas rush.\"";
+ goto L_Close;
+
+L_NoEvent:
+ mes "[Valtteri]";
+ 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_Close:
+ close;
+}
diff --git a/world/map/npc/xmas/2011/glitterHelper.txt b/world/map/npc/xmas/2011/glitterHelper.txt
new file mode 100644
index 00000000..3ceba9a5
--- /dev/null
+++ b/world/map/npc/xmas/2011/glitterHelper.txt
@@ -0,0 +1,108 @@
+// This file is part of Christmas Event 2011
+// author: Jenalya
+// Eljas asks for Diamond Powder and Ruby Powder for decoration
+// can be sabotaged with Red Powder and Yellow Powder, Saboteur can make that out of Wisp and Spectre Powder
+// Coding of Decoration:
+// 00 not talked
+// 10 asked for Decoration
+// 01 done in good way
+// 11 done in bad way
+
+030-2.gat,31,81,0|script|Eljas|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 @red_amount, 5;
+ set @yellow_amount, 5;
+
+ if (xmas11 & $@xmas11_DecorationDone) goto L_Done;
+ if (xmas11 & $@xmas11_Decoration) goto L_Powder;
+ if (xmas11 & $@xmas11_talkedToChief) goto L_Helping;
+
+ mes "[Busy Helper]";
+ mes "\"Mh? Excuse me, I'm very busy right now.\"";
+ goto L_Close;
+
+L_Helping:
+ mes "[Eljas]";
+ mes "\"Hello. We have some problem here. Something went wrong with the shipment of the ingredients of our decoration glitter.";
+ mes "Could you bring me " + @red_amount + " Ruby Powders and " + @yellow_amount + " Topaz Powders?\"";
+ next;
+ mes "[Eljas]";
+ mes "\"But make sure it is really gempowder and not some kind of cheap replacement.";
+ mes "You know, our decoration glitter is intensified by some magic, and that only works with real gempowders. Otherwise it'll loose its effect after a while.\"";
+ set xmas11, xmas11 | $@xmas11_Decoration;
+ goto L_Close;
+
+L_Powder:
+ mes "[Eljas]";
+ mes "\"Welcome back. Do you have the " + @red_amount + " Ruby Powders and " + @yellow_amount + " Topaz Powders needed for the decoration glitter?\"";
+ if ((countitem("RubyPowder") >= @red_amount) && (countitem("TopazPowder") >= @yellow_amount) && (countitem("RedPowder") >= @red_amount) && (countitem("YellowPowder") >= @yellow_amount))
+ menu
+ "Yeah, here it is. (Give the gem powders.)",L_GemPowders,
+ "Sure, here it is. (Give the fake powders.)",L_FakePowders,
+ "No, I'm still working on that.",L_Close;
+ if ((countitem("RubyPowder") >= @red_amount) && (countitem("TopazPowder") >= @yellow_amount))
+ menu
+ "Yeah, here it is. (Give the gem powders.)",L_GemPowders,
+ "No, I'm still working on that.",L_Close;
+ if ((countitem("RedPowder") >= @red_amount) && (countitem("YellowPowder") >= @yellow_amount))
+ menu
+ "Sure, here it is. (Give the fake powders.)",L_FakePowders,
+ "No, I'm still working on that.",L_Close;
+ goto L_Close;
+
+L_GemPowders:
+ if ((countitem("RubyPowder") < @red_amount) || (countitem("TopazPowder") < @yellow_amount))
+ goto L_NoItems;
+ delitem "RubyPowder", @red_amount;
+ delitem "TopazPowder", @yellow_amount;
+ set xmas11, xmas11 & ~$@xmas11_Decoration;
+ set xmas11, xmas11 | $@xmas11_DecorationDone;
+ mes "[Eljas]";
+ mes "\"Excellent! Thank you very much.\"";
+ goto L_Close;
+
+L_FakePowders:
+ if ((countitem("RedPowder") < @red_amount) || (countitem("YellowPowder") < @yellow_amount))
+ goto L_NoItems;
+ delitem "RedPowder", @red_amount;
+ delitem "YellowPowder", @yellow_amount;
+ set xmas11, xmas11 | $@xmas11_DecorationDone;
+ mes "He doesn't notice that you're giving him faked powders.";
+ mes "[Eljas]";
+ mes "\"Excellent! Thank you very much.\"";
+ goto L_Close;
+
+L_Done:
+ mes "[Eljas]";
+ if (xmas11 & $@xmas11_Decoration)
+ mes "\"The powders you gave me seem to be of poor quality.\"";
+ if (!(xmas11 & $@xmas11_Decoration))
+ mes "\"Thanks for bringing the powders.\"";
+ goto L_Close;
+
+L_NoEvent:
+ mes "[Eljas]";
+ 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 "[Eljas]";
+ mes "\"I need vacation.\"";
+ goto L_Close;
+
+L_NoItems:
+ mes "[Eljas]";
+ mes "\"Eh? Are you kidding?\"";
+ goto L_Close;
+
+L_Close:
+ set @red_amount, 0;
+ set @yellow_amount, 0;
+ close;
+}
diff --git a/world/map/npc/xmas/2011/guardOfHonor.txt b/world/map/npc/xmas/2011/guardOfHonor.txt
new file mode 100644
index 00000000..f8171f7c
--- /dev/null
+++ b/world/map/npc/xmas/2011/guardOfHonor.txt
@@ -0,0 +1,155 @@
+// This file is part of Christmas Event 2011
+// author: Jenalya
+// Nutcrackers are magical beings serving Santa as guards of honor
+
+// outside of the building
+030-1.gat,89,51,0|script|Grigory the Nutcracker|330,{
+
+ if (!(gettime(7) == $@xmas2011_year && gettime(6) == 12 && gettime(5) >= $@xmas2011_start_day))
+ goto L_NoEvent;
+
+ mes "[Grigory the Nutcracker]";
+ mes "\"Welcome to Santa's house. Please behave well.\"";
+ close;
+
+L_NoEvent:
+ mes "[Grigory the Nutcracker]";
+ mes "\"This is Santa's house. But he isn't home at the moment.\"";
+ close;
+}
+
+030-1.gat,89,54,0|script|Vadim the Nutcracker|330,{
+
+ if (!(gettime(7) == $@xmas2011_year && gettime(6) == 12 && gettime(5) >= $@xmas2011_start_day))
+ goto L_NoEvent;
+
+ mes "[Vadim the Nutcracker]";
+ mes "\"Welcome. Enjoy your time in Santa's residence.\"";
+ close;
+
+L_NoEvent:
+ mes "[Vadim the Nutcracker]";
+ mes "\"This is Santa's residence, but he isn't here at the moment.\"";
+ close;
+}
+
+// in the entrance area
+030-2.gat,83,43,0|script|Andrey the Nutcracker|330,{
+
+ if (!(gettime(7) == $@xmas2011_year && gettime(6) == 12 && gettime(5) >= $@xmas2011_start_day))
+ goto L_NoEvent;
+
+ mes "[Andrey the Nutcracker]";
+ mes "\"Hello. Have a nice time visiting Santa's home.";
+ mes "Be careful not to cause trouble, we, the Nutcracker Guard of Honor, guarantee peace in this house.\"";
+ close;
+
+L_NoEvent:
+ mes "[Andrey the Nutcracker]";
+ mes "\"How did you come in? At this time of the year the door should be locked!\"";
+ warp "030-1.gat", 99, 55;
+ close;
+}
+
+030-2.gat,99,23,0|script|Eugeny the Nutcracker|330,{
+
+ if (!(gettime(7) == $@xmas2011_year && gettime(6) == 12 && gettime(5) >= $@xmas2011_start_day))
+ goto L_NoEvent;
+
+ mes "[Eugeny the Nutcracker]";
+ mes "\"Greetings. The workshop is upstairs.\"";
+ if ((gettime(7) == $@xmas2011_year && gettime(6) == 12 && gettime(5) >= $@xmas2011_reward_start_day))
+ close;
+ next;
+ mes "\"Usually the helpers are very friendly and would explain what they do to the visitors.\"";
+ mes "But there is some trouble this year and they're all under great pressure.";
+ mes "You can have a look, but be gentle and don't disturb them.\"";
+ close;
+
+L_NoEvent:
+ mes "[Eugeny the Nutcracker]";
+ mes "\"How did you come in? At this time of the year the door should be locked!\"";
+ warp "030-1.gat", 99, 55;
+ close;
+}
+
+030-2.gat,77,23,0|script|Leonid the Nutcracker|330,{
+
+ if (!(gettime(7) == $@xmas2011_year && gettime(6) == 12 && gettime(5) >= $@xmas2011_start_day))
+ goto L_NoEvent;
+
+ mes "[Leonid the Nutcracker]";
+ mes "\"Hello. Feel free to have a look around.\"";
+ close;
+
+L_NoEvent:
+ mes "[Leonid the Nutcracker]";
+ mes "\"How did you come in? At this time of the year the door should be locked!\"";
+ warp "030-1.gat", 99, 55;
+ close;
+}
+
+// in office
+030-2.gat,47,81,0|script|Yakov the Nutcracker|330,{
+
+ if (!(gettime(7) == $@xmas2011_year && gettime(6) == 12 && gettime(5) >= $@xmas2011_start_day))
+ goto L_NoEvent;
+
+ mes "[Yakov the Nutcracker]";
+ mes "\"Greetings. I hope you find your visit interesting.\"";
+ menu
+ "What is behind that door?",-,
+ "Yeah, it's very interesting.",L_Close;
+ mes "[Yakov the Nutcracker]";
+ mes "\"The Archive. Restricted area, you're not allowed to enter.\"";
+L_Close:
+ close;
+
+L_NoEvent:
+ mes "[Yakov the Nutcracker]";
+ mes "\"How did you come in? At this time of the year the door should be locked!\"";
+ warp "030-1.gat", 99, 55;
+ close;
+}
+
+// in the room before Santa's
+030-2.gat,96,77,0|script|Taras the Nutcracker|330,{
+
+ 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;
+
+ mes "[Taras the Nutcracker]";
+ mes "\"Hello. Santa's room is down the hallway.";
+ mes "But he has a lot of things to take care of, so he doesn't receives visitors at the moment.\"";
+ close;
+
+L_RewardTime:
+ mes "[Taras the Nutcracker]";
+ mes "\"Hello. Santa's room is down the hallway.\"";
+ close;
+
+L_NoEvent:
+ mes "[Taras the Nutcracker]";
+ mes "\"How did you come in? At this time of the year the door should be locked!\"";
+ warp "030-1.gat", 99, 55;
+ close;
+}
+
+030-2.gat,99,77,0|script|Stepan the Nutcracker|330,{
+
+ if (!(gettime(7) == $@xmas2011_year && gettime(6) == 12 && gettime(5) >= $@xmas2011_start_day))
+ goto L_NoEvent;
+
+ mes "[Stepan the Nutcracker]";
+ mes "\"Greetings. The dormitory is up there.";
+ mes "I think Ismo went up there because he isn't feeling well. Please let him rest.\"";
+ close;
+
+L_NoEvent:
+ mes "[Stepan the Nutcracker]";
+ mes "\"How did you come in? At this time of the year the door should be locked!\"";
+ warp "030-1.gat", 99, 55;
+ close;
+}
diff --git a/world/map/npc/xmas/2011/illHelper.txt b/world/map/npc/xmas/2011/illHelper.txt
new file mode 100644
index 00000000..7e8e2a0e
--- /dev/null
+++ b/world/map/npc/xmas/2011/illHelper.txt
@@ -0,0 +1,99 @@
+// This file is part of Christmas Event 2011
+// author: Jenalya
+// Ismo is ill and can't work because of that, asks for a small healing potion
+// bad: give him a cactus potion instead
+// 00 not talked
+// 10 asked for powders
+// 01 done in good way
+// 11 done in bad way
+
+030-2.gat,127,89,0|script|Ismo|329,{
+
+ 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;
+
+ if (xmas11 & $@xmas11_PotionDone) goto L_Done;
+ if (xmas11 & $@xmas11_Potion) goto L_Asked;
+ if (xmas11 & $@xmas11_talkedToChief) goto L_Helping;
+
+ mes "[Ill Helper]";
+ mes "\"Uh, my head.\"";
+ goto L_Close;
+
+L_Helping:
+ mes "[Ismo]";
+ mes "\"Hello. I'm not feeling well. My head hurts so bad and I'm all weary.\"";
+ next;
+ mes "\"Could you bring me a Small Healing Potion?\"";
+ set xmas11, xmas11 | $@xmas11_Potion;
+ goto L_Close;
+
+L_Asked:
+ mes "[Ismo]";
+ mes "\"Ah, you're back. Do you have a Small Healing Potion for me? I feel so bad.\"";
+ if ((countitem("SmallHealingPotion") >= 1) && (countitem("CactusPotion") >= 1))
+ menu
+ "Yeah, here it is. (Give the Small Healing Potion.)",L_Heal,
+ "Sure, here it is. (Give the Cactus Potion.)",L_Cactus,
+ "Not yet, sorry.",L_Close;
+ if (countitem("SmallHealingPotion") >= 1)
+ menu
+ "Yeah, here it is. (Give the Small Healing Potion.)",L_Heal,
+ "Not yet, sorry.",L_Close;
+ if (countitem("CactusPotion") >= 1)
+ menu
+ "Sure, here it is. (Give Cactus Potion.)",L_Cactus,
+ "Not yet, sorry.",L_Close;
+ goto L_Close;
+
+L_Heal:
+ if (countitem("SmallHealingPotion") < 1)
+ goto L_NoItems;
+ delitem "SmallHealingPotion", 1;
+ set xmas11, xmas11 & ~$@xmas11_Potion;
+ set xmas11, xmas11 | $@xmas11_PotionDone;
+ mes "[Ismo]";
+ mes "\"Ah, thank you.\"";
+ mes "He drinks the potion.";
+ goto L_Close;
+
+L_Cactus:
+ if (countitem("CactusPotion") < 1)
+ goto L_NoItems;
+ delitem "CactusPotion", 1;
+ set xmas11, xmas11 | $@xmas11_PotionDone;
+ mes "He doesn't notice that you're giving him a Cactus Potion.";
+ mes "[Ismo]";
+ mes "\"Ah, thank you.\"";
+ mes "He drinks the potion.";
+ goto L_Close;
+
+L_Done:
+ mes "[Ismo]";
+ if (xmas11 & $@xmas11_Potion)
+ mes "\"I don't really feel better yet. Are you sure you gave me a Small Healing Potion?\"";
+ if (!(xmas11 & $@xmas11_Potion))
+ mes "\"Thanks for bringing me the Small Healing Potion, I feel slightly better now.\"";
+ goto L_Close;
+
+L_NoEvent:
+ mes "[Ismo]";
+ 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 "[Ismo]";
+ mes "\"I'm getting better.\"";
+ goto L_Close;
+
+L_NoItems:
+ mes "[Ismo]";
+ mes "\"Where is it?\"";
+ goto L_Close;
+
+L_Close:
+ close;
+}
diff --git a/world/map/npc/xmas/2011/leatherBall.txt b/world/map/npc/xmas/2011/leatherBall.txt
new file mode 100644
index 00000000..1397adc5
--- /dev/null
+++ b/world/map/npc/xmas/2011/leatherBall.txt
@@ -0,0 +1,162 @@
+// This file is part of Christmas Event 2011
+// author: Jenalya
+// Leather Ball states:
+// 1: got order from Tarmo
+// 2: Iivo said that he needs more material
+// 3: Iivo created the Leather Ball
+// 4: gave Leather Ball to the bad guy
+// 5: delivered the Leather Ball without giving it to the bad guy
+// 6: delivered fake present instead of Leather Ball
+
+030-2.gat,37,81,0|script|Tarmo|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 @ball, (xmas11 & $@xmas11_BallMask) >> $@xmas11_BallShift;
+
+ if (@ball > 0) goto L_Ordered;
+ if (xmas11 & $@xmas11_talkedToChief) goto L_Helping;
+
+ mes "[Busy Helper]";
+ mes "\"Oh, hello. I'm very sorry, I can't help you. I need to work on all these papers here.\"";
+ goto L_Close;
+
+L_Helping:
+ mes "[Tarmo]";
+ mes "\"Mh? Oh, are you new? Well, but I suppose it's a good idea to hire more helpers.";
+ mes "Listen, I have this ordering form. Can you bring it to Iivo for me?\"";
+ set @ball, 1;
+ set xmas11, (xmas11 & ~($@xmas11_BallMask) | (@ball << $@xmas11_BallShift));
+ menu
+ "Sure, I'll do that.",L_Close,
+ "What is it?",-;
+ mes "[Tarmo]";
+ mes "\"The form? It's an order for a toy. We have a shortage on material this year. Some things went wrong with the delivery of it.";
+ mes "That's why we produce only explicitely ordered toys this year.\"";
+ goto L_Close;
+
+L_Ordered:
+ mes "[Tarmo]";
+ mes "\"Ah, hello. Please bring the order to Iivo.";
+ mes "I don't have anything else for you to do.\"";
+ goto L_Close;
+
+L_NoEvent:
+ mes "[Tarmo]";
+ 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 "[Tarmo]";
+ mes "\"Given all the adversities we did a pretty good job I think.\"";
+ goto L_Close;
+
+L_Close:
+ set @ball, 0;
+ close;
+}
+
+030-2.gat,154,33,0|script|Iivo|329,{
+
+ 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 @ball, (xmas11 & $@xmas11_BallMask) >> $@xmas11_BallShift;
+ set @leather_amount, 1;
+ set @maggotslime_amount, 10;
+
+ if (@ball >= 3) goto L_LeatherBallDone;
+ if (@ball == 2) goto L_LeatherBall;
+ if (@ball == 1) goto L_Order;
+ if (xmas11 & $@xmas11_talkedToChief) goto L_Helping;
+
+ mes "[Busy Helper]";
+ mes "\"Hello there. I hope you have a good time visiting Santa's home.";
+ mes "We're usually more hospitable, but this year... I don't know why, but everything goes wrong.\"";
+ goto L_Close;
+
+L_Helping:
+ mes "[Iivo]";
+ mes "\"Hi there. I'm a bit bored because we're nearly out of material.";
+ mes "I need an order to make some toys.\"";
+ if (@ball == 0)
+ goto L_Close;
+L_Order:
+ mes "[Iivo]";
+ mes "\"I wish the guys up there in the office would send me something to do.\"";
+ menu
+ "Tarmo gave me an order for a Leather Ball.",-,
+ "Yeah, it's a shame.", L_Close;
+ mes "[Iivo]";
+ mes "\"Really? That's great! Let me see.";
+ mes "Ah, there are some things missing. I need " + @leather_amount + " Leather Patch?";
+ mes "I need also about " + @maggotslime_amount + " Maggot Slimes. It's an ingredient for the lotion that is used to imbue the leather.\"";
+ set @ball, 2;
+ callsub S_Update_Var;
+ goto L_Close;
+
+L_LeatherBall:
+ mes "[Iivo]";
+ mes "\"I need " + @leather_amount + " Leather Patch and " + @maggotslime_amount + " Maggot Slimes for the Leather Ball.\"";
+ menu
+ "Here it is.",-,
+ "I don't have it yet.",L_Close;
+ if ((countitem("LeatherPatch") < @leather_amount) || (countitem("MaggotSlime") < @maggotslime_amount))
+ goto L_NoItems;
+ delitem "LeatherPatch", @leather_amount;
+ delitem "MaggotSlime", @maggotslime_amount;
+ set @ball, 3;
+ callsub S_Update_Var;
+ getitem "LeatherBall", 1;
+ mes "[Iivo]";
+ mes "\"Great!\"";
+ mes "He takes the material and starts to cut the leather in pieces and seam them together.";
+ mes "It seems to be hard to stitch the leather and takes a while.";
+ next;
+ mes "You get distracted and start daydreaming.";
+ mes "[Iivo]";
+ mes "\"Alright! Now the impregnation.\"";
+ mes "You startle.";
+ next;
+ mes "Iivo mixes the maggot slimes with some other ingredients you can't exactly identify and rubs the ball with it.";
+ mes "[Iivo]";
+ mes "\"Very good. It's done. Can you take it to Aaron to get it packed?\"";
+ goto L_Close;
+
+L_LeatherBallDone:
+ mes "[Iivo]";
+ mes "\"I hope the kids will have fun with the ball I made. Did you already bring it to Aaron?\"";
+ goto L_Close;
+
+L_NoEvent:
+ mes "[Iivo]";
+ 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 "[Iivo]";
+ mes "\"This year's Christmas prepations really were a huddle. I hope we'll do better next year.\"";
+ goto L_Close;
+
+L_NoItems:
+ mes "[Iivo]";
+ mes "\"You don't have it!\"";
+ goto L_Close;
+
+L_Close:
+ set @cotton_amount, 0;
+ set @fur_amount, 0;
+ set @ball, 0;
+ close;
+
+S_Update_Var:
+ set xmas11, (xmas11 & ~($@xmas11_BallMask) | (@ball << $@xmas11_BallShift));
+ return;
+}
diff --git a/world/map/npc/xmas/2011/monsters.txt b/world/map/npc/xmas/2011/monsters.txt
new file mode 100644
index 00000000..4fc088a3
--- /dev/null
+++ b/world/map/npc/xmas/2011/monsters.txt
@@ -0,0 +1,33 @@
+// This file is part of Christmas Event 2011
+// author: Jenalya
+
+030-2.gat,20,19,52,48|monster|SantaSlime|1015,5,120000,30000,xmasMob030-2::On1015
+
+030-2.gat,0,0,0|script|xmasMob030-2|-1,{
+On1015:
+ set @mobID, 1015;
+ callfunc "MobPoints";
+ break;
+
+}
+
+030-1.gat,0,0|monster|Wisp|1040,5,120000,30000,xmasMob030-1::On1040
+030-1.gat,0,0|monster|Spectre|1042,5,120000,30000,xmasMob030-1::On1042
+030-1.gat,0,0|monster|Poltergeist|1047,5,120000,30000,xmasMob030-1::On1047
+
+030-1.gat,0,0,0|script|xmasMob030-1|-1,{
+On1040:
+ set @mobID, 1040;
+ callfunc "MobPoints";
+ break;
+
+On1042:
+ set @mobID, 1042;
+ callfunc "MobPoints";
+ break;
+
+On1047:
+ set @mobID, 1047;
+ callfunc "MobPoints";
+ break;
+}
diff --git a/world/map/npc/xmas/2011/plushMouboo.txt b/world/map/npc/xmas/2011/plushMouboo.txt
new file mode 100644
index 00000000..cbb154af
--- /dev/null
+++ b/world/map/npc/xmas/2011/plushMouboo.txt
@@ -0,0 +1,199 @@
+// This file is part of Christmas Event 2011
+// author: Jenalya
+// Plush Mouboo states:
+// 1: got order from Rikhard
+// 2: Launo said that he needs more material
+// 3: Launo created the Plush Mouboo
+// 4: gave Plush Mouboo to the bad guy
+// 5: delivered the Plush Mouboo without giving it to the bad guy
+// 6: delivered fake present instead of Plush Mouboo
+
+030-2.gat,31,77,0|script|Rikhard|329,{
+
+ 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 @plushmouboo, (xmas11 & $@xmas11_PlushMoubooMask) >> $@xmas11_PlushMoubooShift;
+
+ if (@plushmouboo > 0) goto L_Ordered;
+ if (xmas11 & $@xmas11_talkedToChief) goto L_Helping;
+
+ mes "You see some guy grubbing in a huge bunch of paper.";
+ mes "[Busy Helper]";
+ mes "\"Where is this fu-\"";
+ mes "He suddenly notices you nearby.";
+ mes "[Busy Helper]";
+ mes "\"- ahrm, fiddly paper.\"";
+ goto L_Close;
+
+L_Helping:
+ mes "[Rikhard]";
+ mes "\"Ah! You just came in the right moment! I need someone to deliver this Christmas-present-toy-ordering-form to Launo.";
+ mes "Here, take this.\"";
+ mes "He puts some piece of paper in your hand.";
+ next;
+ mes "It seems to be some kind of form, but is very confusing to you. It contains a lot of boxes with some numbers scrabbled in and some hard to read words.";
+ menu
+ "Er, what is this?",-,
+ "Wait a sec, what do you want me to do with that?",-;
+ mes "Rikhard mumbles something about hiring nonskilled workers.";
+ mes "[Rikhard]";
+ mes "\"Ok, listen - we're organizing the Christmas business here. We're keeping track about who was a good or bad kid this year and what was written on the wish lists.";
+ mes "And the good children get what they wished, remember? So, this is a Christmas-present-toy-ordering-form to order a Plush Mouboo for some very well-behaved cute little girl.\"";
+ next;
+ mes "\"Launo is very skilled at creating plush toys, so you need to bring him this form.\"";
+ mes "He waves at you with his hand and then digs into the papers again.";
+ set @plushmouboo, 1;
+ set xmas11, (xmas11 & ~($@xmas11_PlushMoubooMask) | (@plushmouboo << $@xmas11_PlushMoubooShift));
+ goto L_Close;
+
+L_Ordered:
+ mes "[Rikhard]";
+ mes "\"Did you already give Launo the Christmas-present-toy-ordering-form? Yes?";
+ mes "Ok, I have some more paperwork to do, so please don't interrupt.\"";
+ goto L_Close;
+
+L_NoEvent:
+ mes "[Rikhard]";
+ 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 "[Rikhard]";
+ mes "\"With sufficient organization you can achieve everything.\"";
+ mes "He smiles happily.";
+ goto L_Close;
+
+L_Close:
+ set @plushmouboo, 0;
+ close;
+}
+
+030-2.gat,135,31,0|script|Launo|329,{
+
+ 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 @plushmouboo, (xmas11 & $@xmas11_PlushMoubooMask) >> $@xmas11_PlushMoubooShift;
+ set @cotton_amount, 5;
+ set @fur_amount, 2;
+
+ if (@plushmouboo >= 3) goto L_PlushMoubooDone;
+ if (@plushmouboo == 2) goto L_PlushMouboo;
+ if (@plushmouboo == 1) goto L_Order;
+ if (xmas11 & $@xmas11_talkedToChief) goto L_Helping;
+
+ mes "[Busy Helper]";
+ mes "\"Mh, mh, mh. This is not good.\"";
+ goto L_Close;
+
+L_Helping:
+ mes "[Launo]";
+ mes "\"Mh? Oh, you're here to help?";
+ mes "That's very kind of you.\"";
+ next;
+ mes "\"Though I can't do anything right now.";
+ mes "I'm specialized in making plush toys. Usually I'd just create dozens of them and if they aren't on this years wishing lists, they'd be used next year.\"";
+ mes "He sighs.";
+ next;
+ mes "\"But since we're short in material we got the order to only create toys that are requested.";
+ mes "And now I sit here and wait to get such an order. But the guys up in the office seems to have some problems to get their paperwork done.";
+ mes "Maybe you can go up there and ask if there's a plush toy to make?\"";
+ goto L_Close;
+
+L_Order:
+ mes "Launo sighs.";
+ mes "[Launo]";
+ mes "\"I wish I had an order for a toy.\"";
+ menu
+ "I have one for you! Rikhard gave me an order for a Plush Mouboo.",-,
+ "Well, bad luck.", L_Close;
+ mes "Launos gets a happier look on his face.";
+ mes "[Launo]";
+ mes "\"A Plush Mouboo? I love doing them!";
+ mes "Ok, let's see if I have all the material needed.\"";
+ next;
+ mes "[Launo]";
+ mes "\"Hrm, it seems I need some more Cotton, could you bring me " + @cotton_amount + " Cotton Cloths?";
+ mes "And I need some fur to make the belly extra fluffy. " + @fur_amount + " pieces of White Fur would be good, I can dye the color myself.\"";
+ set @plushmouboo, 2;
+ callsub S_Update_Var;
+ goto L_Close;
+
+L_PlushMouboo:
+ mes "[Launo]";
+ mes "\"I need " + @cotton_amount + " Cotton Cloths and " + @fur_amount + " pieces of White Fur for the Plush Mouboo.\"";
+ menu
+ "I have it!",-,
+ "I'm still working on that.",L_Close;
+ if ((countitem("CottonCloth") < @cotton_amount) || (countitem("WhiteFur") < @fur_amount))
+ goto L_NoItems;
+ delitem "CottonCloth", @cotton_amount;
+ delitem "WhiteFur", @fur_amount;
+ set @plushmouboo, 3;
+ callsub S_Update_Var;
+ getitem "PlushMouboo", 1;
+ mes "[Launo]";
+ mes "\"Excellent! I'll start right away.\"";
+ next;
+ mes "He takes puts the items you gave him into some pot with brown dye and takes it out after short while, putting it to dry on the desk.";
+ mes "In the meanwhile he rummages in his workbench and gets out some tools and wood template.";
+ next;
+ mes "The workbench seems to have a heating mechanism or someting since the cloth and fur is already dry.";
+ mes "He takes the wood template, puts it on the cloth and draws very tiny lines on it. Then he cuts it out with very quick but confident movements.";
+ next;
+ mes "After that he takes the different parts and starts to sew them together.";
+ mes "He stops before it's finished, leaving a hole where he puts in some stuffing.";
+ next;
+ mes "He's kneading it a bit to arrange the stuffing properly in the toy and finally stitches up the hole.";
+ mes "Finally he adds some knob for the eyes and presents you the Plush Mouboo.";
+ next;
+ mes "[Launo]";
+ mes "\"Here you go! Isn't it felicitous?\"";
+ menu
+ "Wow, that was quick!",-;
+ mes "[Launo]";
+ mes "\"Well yeah, I'm used to work quickly. Usually we produce much more toys.\"";
+ mes "However, now it needs to be put in a present box and then that box have to be wrapped.\"";
+ next;
+ mes "\"Could you take care about that? Urmas should have some boxes for you and Reino takes care about the wrapping paper.";
+ mes "The place to wrap the presents is at Aaron's desk.\"";
+ goto L_Close;
+
+L_PlushMoubooDone:
+ mes "[Launo]";
+ mes "\"I feel much better now after I got some work done. Please take care about packing, wrapping and giving it to Aaron.\"";
+ goto L_Close;
+
+L_NoEvent:
+ mes "[Launo]";
+ 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 "[Launo]";
+ mes "\"Hu, it was really stressful this year.";
+ mes "But imagining the happy kids cuddling the plush toys I made - that makes amends for all that.\"";
+ goto L_Close;
+
+L_NoItems:
+ mes "[Launo]";
+ mes "\"You don't have it!\"";
+ goto L_Close;
+
+L_Close:
+ set @cotton_amount, 0;
+ set @fur_amount, 0;
+ set @plushmouboo, 0;
+ close;
+
+S_Update_Var:
+ set xmas11, (xmas11 & ~($@xmas11_PlushMoubooMask) | (@plushmouboo << $@xmas11_PlushMoubooShift));
+ return;
+}
diff --git a/world/map/npc/xmas/2011/reinboos.txt b/world/map/npc/xmas/2011/reinboos.txt
new file mode 100644
index 00000000..4fcfbcba
--- /dev/null
+++ b/world/map/npc/xmas/2011/reinboos.txt
@@ -0,0 +1,606 @@
+// This file is part of Christmas Event 2011
+// author: Jenalya
+// Grombadil gives the task to search for the lost Reinboos after the player talked to the Chief helper
+// Home Reinboos: Reimeles, Leimeres
+// Lost Reinboos: Meireles, Meileres, Reilemes, Leiremes
+// coding for a lost reinboo
+// b1b0
+// 00 : haven't talked yet
+// 01 : talked
+// 10 : Good
+// 11 : Bad
+
+030-1.gat,103,54,0|script|Grombadil|105,{
+
+ 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;
+
+ if (xmas11 & $@xmas11_startedReinbooSearch) goto L_Search;
+
+ mes "The man is grumbling to himself and seems very worried.";
+ if (xmas11 & $@xmas11_talkedToChief)
+ goto L_Help;
+ goto L_Close;
+
+L_Help:
+ menu
+ "Chief Warrick asked me to help out a bit.",-,
+ "Nevermind.",L_Close;
+ mes "[Santa's Helper]";
+ mes "\"He did? Well, I indeed have a problem.";
+ mes "I'm Grombadil, the equerry of Santa's Reinboos.\"";
+ next;
+ mes "\"Those Reinboos, you know, are much more clever than a normal animal and can even talk.";
+ mes "But they are more like children than an adult.\"";
+ next;
+ mes "\"And I fear something happened to some of my little fosterlings.";
+ mes "It isn't a long time until Christmas and they all should have already arrived here.";
+ mes "But look!\"";
+ next;
+ mes "He waves his hands to point at the area around him.";
+ mes "[Grombadil]";
+ mes "\"Only Reimeles and Leimeres are here.";
+ mes "Meireles, Reilemes, Meileres and Leiremes are missing!";
+ mes "And I have no idea where they could be!\"";
+ next;
+ mes "\"They could be anywhere and I can't leave here. Would you search them for me?\"";
+ menu
+ "Don't worry, they're as good as home.",-,
+ "I'll keep my eyes open.",-,
+ "I'm on my way!",-;
+ mes "Grombadil looks relieved.";
+ mes "[Grombadil]";
+ mes "\"Oh, one thing before you leave!\"";
+ next;
+ mes "\"As I told you, they're a bit like children. And as children they love all kind of candy.";
+ mes "But it's not good for them, they get their stomache upset from eating sweet stuff.\"";
+ next;
+ mes "\"So don't give them candy! You might want to take some apples with you, that's much better for them.";
+ mes "Red apples. Don't give them candy. Good luck.\"";
+ set xmas11, xmas11 | $@xmas11_startedReinbooSearch;
+ goto L_Close;
+
+L_Search:
+ mes "[Grombadil]";
+ mes "\"Welcome back! I hope you'll be able to find my fosterlings before it's too late.";
+ mes "Imagine what would be if they don't arrive in time!\"";
+ next;
+ mes "\"And remember, don't give them candy, but red apples. Those are the best ones.";
+ goto L_Close;
+
+L_NoEvent:
+ mes "[Grombadil]";
+ mes "\"Everything is calm and peaceful.\"";
+ mes "He smiles.";
+ goto L_Close;
+
+L_RewardTime:
+ mes "[Grombadil]";
+ mes "\"Hu, all this stress is finally over. You might want to talk to Santa.\"";
+ goto L_Close;
+
+L_Close:
+ close;
+}
+
+030-1.gat,96,57,0|script|Reimeles|170,{
+
+ 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;
+
+ mes "[Reimeles the Reinboo]";
+ mes "\"I miss Reilemes, he's my best friend.\"";
+ close;
+
+L_NoEvent:
+ mes "[Reimeles the Reinboo]";
+ mes "\"Hello. Do you want to see Santa? He's not at home.\"";
+ close;
+
+L_RewardTime:
+ mes "[Reimeles the Reinboo]";
+ mes "\"Ah, I'm tired. But it was fun!\"";
+ close;
+}
+
+030-1.gat,100,46,0|script|Leimeres|170,{
+
+ 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;
+
+ mes "[Leimeres the Reinboo]";
+ mes "\"I like the snowflakes. Look, I can catch them with my mouth!\"";
+ close;
+
+L_NoEvent:
+ mes "[Leimeres the Reinboo]";
+ mes "\"It's nice here, isn't it?\"";
+ close;
+
+L_RewardTime:
+ mes "[Leimeres the Reinboo]";
+ mes "\"It was fun to ride with Santa!\"";
+ close;
+}
+
+006-1.gat,126,112,0|script|Meireles the Reinboo|170,{
+ set @cake_amount, 3;
+ set @apple_amount, 5;
+
+ 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;
+
+ if ((xmas11 & $@xmas11_firstReinboo) && (xmas11 & $@xmas11_firstReinbooDone)) goto L_Bad;
+ if (!(xmas11 & $@xmas11_firstReinboo) && (xmas11 & $@xmas11_firstReinbooDone)) goto L_Good;
+ if (xmas11 & $@xmas11_firstReinboo) goto L_Food;
+ if (xmas11 & $@xmas11_startedReinbooSearch) goto L_Search;
+
+ mes "The reinboo shys away from you. It seems to be frightened.";
+ goto L_Close;
+
+L_Search:
+ mes "The Reinboo comes close to you.";
+ mes "[Meireles the Reinboo]";
+ mes "\"Your smell is familiar!\"";
+ menu
+ "Grombadil sent me to search you.",-,
+ "I don't talk with animals!",L_Close;
+ mes "[Meireles the Reinboo]";
+ mes "\"Oh! Yes, I shouldn't be here, but home.";
+ mes "But I got lost.\"";
+ menu
+ "What happened?",-;
+ mes "The Reinboo seems to feel ashamed.";
+ mes "[Meireles the Reinboo]";
+ mes "\"I was stupid. I was on the way home, but there were some guy with a mask.";
+ mes "He gave me tasty cakes! So tasty...\"";
+ next;
+ mes "\"He made me go with him, he said he has more cakes. But he tricked me!";
+ mes "He dashed some powder into my face and ran away.";
+ mes "The powder burned in my nose and made me forget to the smell of the way home.\"";
+ next;
+ mes "\"I tried to find the way, but I'm totally lost.";
+ mes "This place is very odd.\"";
+ next;
+ mes "\"And all this running around made me become hungry.\"";
+L_Food:
+ mes "The Reinboo snuffles on you.";
+ set xmas11, xmas11 | $@xmas11_firstReinboo;
+ next;
+ if (countitem("OrangeCake") >= @cake_amount)
+ goto L_Cake;
+ mes "[Meireles the Reinboo]";
+ mes "\"Can you bring me some Orange Cakes? Please?";
+ mes "When I had something to eat I can follow your smell back home.\"";
+ if (countitem("RedApple") < @apple_amount)
+ goto L_Close;
+ menu
+ "I'll try to find some.",L_Close,
+ "Cakes aren't good for you, remember? But I have some apples.",L_GiveApple;
+
+L_Cake:
+ mes "[Meireles the Reinboo]";
+ mes "\"You have some Orange Cakes! Give them to me! Please?\"";
+ if (countitem("RedApple") >= @apple_amount)
+ menu
+ "I have something that is better for you. Apples!",L_GiveApple,
+ "No, I want to keep them.",L_Close,
+ "Ok, here.",L_GiveCake;
+ menu
+ "No, I want to keep them.",L_Close,
+ "Ok, here.",L_GiveCake;
+
+L_GiveCake:
+ if (countitem("OrangeCake") < @cake_amount)
+ goto L_NoItem;
+ delitem "OrangeCake", @cake_amount;
+ mes "[Meireles the Reinboo]";
+ mes "\"Yam!\"";
+ mes "The Reinboos munches the Orange Cakes.";
+ set xmas11, xmas11 | $@xmas11_firstReinbooDone;
+ goto L_Close;
+
+L_GiveApple:
+ if (countitem("RedApple") < @apple_amount)
+ goto L_NoItem;
+ delitem "RedApple", @apple_amount;
+ mes "[Meireles the Reinboo]";
+ mes "\"Apples, bah. Ok.\"";
+ mes "The Reinboos munches the Apples.";
+ set xmas11, xmas11 | $@xmas11_firstReinbooDone;
+ set xmas11, xmas11 & ~$@xmas11_firstReinboo;
+ goto L_Close;
+
+L_NoItem:
+ mes "[Meireles the Reinboo]";
+ mes "\"Hu? It disappeared!\"";
+ goto L_Close;
+
+L_Good:
+ mes "[Meireles the Reinboo]";
+ mes "\"I feel better now. I'm about to follow your smell back to Grombadil.\"";
+ goto L_Close;
+
+L_Bad:
+ mes "[Meireles the Reinboo]";
+ mes "\"Uh, I don't feel well. My stomache hurts. I have to rest a little longer.\"";
+ goto L_Close;
+
+L_NoEvent:
+ mes "The Reinboo just looks at you.";
+ goto L_Close;
+
+L_RewardTime:
+ mes "[Meireles the Reinboo]";
+ mes "\"Phew, I that was short. I nearly didn't make it back in time.";
+ mes "But everything went well and now I came back because this place made me curious.\"";
+ goto L_Close;
+
+L_Close:
+ set @cake_amount, 0;
+ set @apple_amount, 0;
+ close;
+}
+
+012-1.gat,66,55,0|script|Meileres the Reinboo|170,{
+ set @cake_amount, 3;
+ set @apple_amount, 5;
+
+ 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;
+
+ if ((xmas11 & $@xmas11_secondReinboo) && (xmas11 & $@xmas11_secondReinbooDone)) goto L_Bad;
+ if (!(xmas11 & $@xmas11_secondReinboo) && (xmas11 & $@xmas11_secondReinbooDone)) goto L_Good;
+ if (xmas11 & $@xmas11_secondReinboo) goto L_Food;
+ if (xmas11 & $@xmas11_startedReinbooSearch) goto L_Search;
+
+ mes "The reinboo shys away from you. It seems to be frightened.";
+ goto L_Close;
+
+L_Search:
+ mes "The Reinboo snuffles on your clothes.";
+ mes "[Meileres the Reinboo]";
+ mes "\"Mh, you smell like home.\"";
+ menu
+ "Grombadil sent me to search you.",-,
+ "Back off from me!",L_Close;
+ mes "[Meileres the Reinboo]";
+ mes "\"Grombadil! He must be worried!\"";
+ menu
+ "He is. How did you get lost?",-,
+ "What are you doing here?",-;
+ mes "The Reinboo seems abashed.";
+ mes "[Meileres the Reinboo]";
+ mes "\"There was this guy with the candy. Very tasty candy.";
+ mes "He promised to give me more candy, so I followed him.\"";
+ next;
+ mes "\"But he didn't give me more candy! He dashed some stinging powder into my face!";
+ mes "It hurt my nose and my eyes. And then he was gone and I don't know where I am.\"";
+ next;
+ mes "\"Usually I could find the way back with my remarkable nose.";
+ mes "But because of that stinging powder I can't remember the smell of the way back.\"";
+ next;
+ mes "\"And I'm hungry.\"";
+L_Food:
+ mes "The Reinboo snuffles on you again.";
+ set xmas11, xmas11 | $@xmas11_secondReinboo;
+ next;
+ if (countitem("ChocolateCake") >= @cake_amount)
+ goto L_Cake;
+ mes "[Meileres the Reinboo]";
+ mes "\"Can you bring me some Chocolate Cakes? Please?";
+ mes "Then I can go home, I can follow your smell to find the way.\"";
+ if (countitem("RedApple") < @apple_amount)
+ goto L_Close;
+ menu
+ "I will see what I can do.",L_Close,
+ "Cakes aren't good for you! But I have some apples.",L_GiveApple;
+
+L_Cake:
+ mes "[Meileres the Reinboo]";
+ mes "\"You have some Chocolate Cakes! Can I have them? Can I have them?\"";
+ if (countitem("RedApple") >= @apple_amount)
+ menu
+ "I have something that is better for you. Apples!",L_GiveApple,
+ "No, I want to keep them.",L_Close,
+ "Ok, here.",L_GiveCake;
+ menu
+ "No, I want to keep them.",L_Close,
+ "Ok, here.",L_GiveCake;
+
+L_GiveCake:
+ if (countitem("ChocolateCake") < @cake_amount)
+ goto L_NoItem;
+ delitem "ChocolateCake", @cake_amount;
+ mes "[Meileres the Reinboo]";
+ mes "\"Yay!\"";
+ mes "The Reinboos munches the Chocolate Cakes.";
+ set xmas11, xmas11 | $@xmas11_secondReinbooDone;
+ goto L_Close;
+
+L_GiveApple:
+ if (countitem("RedApple") < @apple_amount)
+ goto L_NoItem;
+ delitem "RedApple", @apple_amount;
+ mes "[Meileres the Reinboo]";
+ mes "\"Hrm, ok, I'll eat the apples.\"";
+ mes "The Reinboos munches the Apples.";
+ set xmas11, xmas11 | $@xmas11_secondReinbooDone;
+ set xmas11, xmas11 & ~$@xmas11_secondReinboo;
+ goto L_Close;
+
+L_NoItem:
+ mes "[Meileres the Reinboo]";
+ mes "\"Hu? It disappeared!\"";
+ goto L_Close;
+
+L_Good:
+ mes "[Meileres the Reinboo]";
+ mes "\"Hello! I'm about to follow your smell back to Grombadil.\"";
+ goto L_Close;
+
+L_Bad:
+ mes "[Meileres the Reinboo]";
+ mes "\"Uh, my stomache. It hurts. I have to rest a little longer.\"";
+ goto L_Close;
+
+L_NoEvent:
+ mes "The Reinboo just looks at you.";
+ goto L_Close;
+
+L_RewardTime:
+ mes "[Meileres the Reinboo]";
+ mes "\"Phew, I that was short. I nearly didn't make it back in time.";
+ mes "But everything went well and now I came back because this place is interesting.\"";
+ goto L_Close;
+
+L_Close:
+ set @cake_amount, 0;
+ set @apple_amount, 0;
+ close;
+}
+
+018-1.gat,114,41,0|script|Reilemes the Reinboo|170,{
+ set @cake_amount, 3;
+ set @apple_amount, 5;
+
+ 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;
+
+ if ((xmas11 & $@xmas11_thirdReinboo) && (xmas11 & $@xmas11_thirdReinbooDone)) goto L_Bad;
+ if (!(xmas11 & $@xmas11_thirdReinboo) && (xmas11 & $@xmas11_thirdReinbooDone)) goto L_Good;
+ if (xmas11 & $@xmas11_thirdReinboo) goto L_Food;
+ if (xmas11 & $@xmas11_startedReinbooSearch) goto L_Search;
+
+ mes "The reinboo shys away from you. It seems to be frightened.";
+ goto L_Close;
+
+L_Search:
+ mes "The Reinboo comes closer and snuffles on your clothes.";
+ mes "[Reilemes the Reinboo]";
+ mes "\"Did you met Reimeles? He's my best friend. I miss him.\"";
+ menu
+ "Yes, Grombadil sent me to search you.",-,
+ "Hey, stay away from me!",L_Close;
+ mes "[Reilemes the Reinboo]";
+ mes "\"Oh, Grombadil! He's very nervous, right? I should have been home long ago.\"";
+ menu
+ "He is. How did you get lost?",-,
+ "Reimeles misses you too, why are you here?",-;
+ mes "The Reinboo seems embarrassed.";
+ mes "[Reilemes the Reinboo]";
+ mes "\"I got distracted. Some man gave me tasty candy!";
+ mes "He said he had more at his place and told me to come with him.\"";
+ next;
+ mes "\"But there wasn't more tasty candy! He dashed some stinging powder into my face!";
+ mes "My eyes and nose still feel itchy.\"";
+ next;
+ mes "\"That's why I can't find the way back. My nose doesn't remember the smell!\"";
+ next;
+ mes "\"And I'm hungry.\"";
+L_Food:
+ mes "The Reinboo snuffles on you again.";
+ set xmas11, xmas11 | $@xmas11_thirdReinboo;
+ next;
+ if (countitem("WhiteCake") >= @cake_amount)
+ goto L_Cake;
+ mes "[Reilemes the Reinboo]";
+ mes "\"Can you bring me some White Cakes? I love those!";
+ mes "Then I can go home, I can follow your smell to find the way.\"";
+ if (countitem("RedApple") < @apple_amount)
+ goto L_Close;
+ menu
+ "I will see what I can do.",L_Close,
+ "Cakes aren't good for you! But I have some apples.",L_GiveApple;
+
+L_Cake:
+ mes "[Reilemes the Reinboo]";
+ mes "\"You have some White Cakes! I want those! Please, can I have them?\"";
+ if (countitem("RedApple") >= @apple_amount)
+ menu
+ "I have something that is better for you. Apples!",L_GiveApple,
+ "No, I want to keep them.",L_Close,
+ "Ok, here.",L_GiveCake;
+ menu
+ "No, I want to keep them.",L_Close,
+ "Ok, here.",L_GiveCake;
+
+L_GiveCake:
+ if (countitem("WhiteCake") < @cake_amount)
+ goto L_NoItem;
+ delitem "WhiteCake", @cake_amount;
+ mes "[Reilemes the Reinboo]";
+ mes "\"Yay!\"";
+ mes "The Reinboos munches the White Cakes.";
+ set xmas11, xmas11 | $@xmas11_thirdReinbooDone;
+ goto L_Close;
+
+L_GiveApple:
+ if (countitem("RedApple") < @apple_amount)
+ goto L_NoItem;
+ delitem "RedApple", @apple_amount;
+ mes "[Reilemes the Reinboo]";
+ mes "\"Hrm, ok, I'll eat the apples.\"";
+ mes "The Reinboos munches the Apples.";
+ set xmas11, xmas11 | $@xmas11_thirdReinbooDone;
+ set xmas11, xmas11 & ~$@xmas11_thirdReinboo;
+ goto L_Close;
+
+L_NoItem:
+ mes "[Reilemes the Reinboo]";
+ mes "\"Hu? It disappeared!\"";
+ goto L_Close;
+
+L_Good:
+ mes "[Reilemes the Reinboo]";
+ mes "\"Hello! I'm about to follow your smell back to Grombadil and Reimeles.\"";
+ goto L_Close;
+
+L_Bad:
+ mes "[Reilemes the Reinboo]";
+ mes "\"Uh, my stomache. It hurts. I have to rest a little longer.\"";
+ goto L_Close;
+
+L_NoEvent:
+ mes "The Reinboo just looks at you.";
+ goto L_Close;
+
+L_RewardTime:
+ mes "[Reilemes the Reinboo]";
+ mes "\"I nearly was late! But everything went well.";
+ mes "Now I'm playing hide and seek with Reimeles.\"";
+ goto L_Close;
+
+L_Close:
+ set @cake_amount, 0;
+ set @apple_amount, 0;
+ close;
+}
+
+017-1.gat,35,49,0|script|Leiremes the Reinboo|170,{
+ set @cake_amount, 3;
+ set @apple_amount, 5;
+
+ 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;
+
+ if ((xmas11 & $@xmas11_fourthReinboo) && (xmas11 & $@xmas11_fourthReinbooDone)) goto L_Bad;
+ if (!(xmas11 & $@xmas11_fourthReinboo) && (xmas11 & $@xmas11_fourthReinbooDone)) goto L_Good;
+ if (xmas11 & $@xmas11_fourthReinboo) goto L_Food;
+ if (xmas11 & $@xmas11_startedReinbooSearch) goto L_Search;
+
+ mes "The reinboo shys away from you. It seems to be frightened.";
+ goto L_Close;
+
+L_Search:
+ mes "The Reinboo approaches you and snuffles on your clothes.";
+ mes "[Leiremes the Reinboo]";
+ mes "\"I like your smell. You smell like home. Have you been at Santa's place?\"";
+ menu
+ "I was, I'm searching for you.",-,
+ "Wah, a talking Reinboo!",L_Close;
+ mes "[Leiremes the Reinboo]";
+ mes "\"Searching for me? Oh, I'm late, right? I'm so sorry. I didn't mean to cause trouble.\"";
+ menu
+ "How did you get lost?",-,
+ "Well, now I found you. How did come here?",-;
+ mes "The Reinboo looks at you sheepishly.";
+ mes "[Leiremes the Reinboo]";
+ mes "\"I... I did something stupid. There was a man, he was really friendly to me. He gave me candy!";
+ mes "I love candy. It's so tasty! The man said he can give me more at his place.\"";
+ next;
+ mes "\"So I went with him. But he was evil! He didn't give me candy! He dashed some bad itchy powder in my face.";
+ mes "It made me forget the smell of the way home and now I'm lost.\"";
+ next;
+ mes "\"I was wandering around and searched it. But that only made me tired. And hungry. Oh, I wish I had more candy.\"";
+L_Food:
+ mes "The Reinboo snuffles on you again.";
+ set xmas11, xmas11 | $@xmas11_fourthReinboo;
+ next;
+ if (countitem("AppleCake") >= @cake_amount)
+ goto L_Cake;
+ mes "[Leiremes the Reinboo]";
+ mes "\"Can you bring me some Apple Cakes? I like them so much.";
+ mes "After that I will feel better and go home. Because I can follow your smell.\"";
+ if (countitem("RedApple") < @apple_amount)
+ goto L_Close;
+ menu
+ "Ok, hang on.",L_Close,
+ "Apple Cakes? What about apples instead?",L_GiveApple;
+
+L_Cake:
+ mes "[Leiremes the Reinboo]";
+ mes "\"You have some Apple Cakes! Tasty tasty Apple Cakes! Can I have them?\"";
+ if (countitem("RedApple") >= @apple_amount)
+ menu
+ "I have something that is better for you. Apples!",L_GiveApple,
+ "No, I want to keep them.",L_Close,
+ "Ok, here.",L_GiveCake;
+ menu
+ "No, I want to keep them.",L_Close,
+ "Ok, here.",L_GiveCake;
+
+L_GiveCake:
+ if (countitem("AppleCake") < @cake_amount)
+ goto L_NoItem;
+ delitem "AppleCake", @cake_amount;
+ mes "[Leiremes the Reinboo]";
+ mes "\"Hooray!\"";
+ mes "The Reinboos munches the Apple Cakes.";
+ set xmas11, xmas11 | $@xmas11_fourthReinbooDone;
+ goto L_Close;
+
+L_GiveApple:
+ if (countitem("RedApple") < @apple_amount)
+ goto L_NoItem;
+ delitem "RedApple", @apple_amount;
+ mes "[Leiremes the Reinboo]";
+ mes "\"But - but cakes are much more tasty! Bleah, ok.\"";
+ mes "The Reinboos munches the Apples.";
+ set xmas11, xmas11 | $@xmas11_fourthReinbooDone;
+ set xmas11, xmas11 & ~$@xmas11_fourthReinboo;
+ goto L_Close;
+
+L_NoItem:
+ mes "[Leiremes the Reinboo]";
+ mes "\"Hu? It disappeared!\"";
+ goto L_Close;
+
+L_Good:
+ mes "[Leiremes the Reinboo]";
+ mes "\"I'm not hungry anymore. Just a short break, then I'll go home.\"";
+ goto L_Close;
+
+L_Bad:
+ mes "[Leiremes the Reinboo]";
+ mes "\"Uh uh uh. It hurts. I need to rest a little longer.\"";
+ goto L_Close;
+
+L_NoEvent:
+ mes "The Reinboo just looks at you.";
+ goto L_Close;
+
+L_RewardTime:
+ mes "[Leiremes the Reinboo]";
+ mes "\"Ha, it was fun to ride with Santa! I came back here because this place is nice.\"";
+ goto L_Close;
+
+L_Close:
+ set @cake_amount, 0;
+ set @apple_amount, 0;
+ close;
+}
diff --git a/world/map/npc/xmas/2011/santa.txt b/world/map/npc/xmas/2011/santa.txt
new file mode 100644
index 00000000..70e83e7e
--- /dev/null
+++ b/world/map/npc/xmas/2011/santa.txt
@@ -0,0 +1,138 @@
+// This file is part of Christmas Event 2011
+// author: Jenalya
+// Santa's room is open after Christmas
+// gives rewards depending on how much the player helped
+
+030-2.gat,197,62,0|script|Santa|105,{
+
+ 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;
+
+ if (xmas11 & $@xmas11_talkedToChief) goto L_Helping;
+
+ mes "[Santa]";
+ mes "\"Oh, how did you come in? I'm very sorry, but I have to ask you to leave my room.";
+ mes "I'll have time for you after Christmas.\"";
+ warp "030-2.gat", 78, 88;
+ goto L_Close;
+
+L_Helping:
+ mes "[Santa]";
+ mes "\"Hello. I see you're helping with the preparations for Christmas. That's very kind of you.";
+ mes "But I have to ask you to leave my room, I'll have time for you after Christmas.\"";
+ warp "030-2.gat", 78, 88;
+ goto L_Close;
+
+L_NoEvent:
+ mes "[Santa]";
+ mes "\"I'm sorry, we're closing this house around this time of the year.\"";
+ warp "030-1.gat", 99, 55;
+ goto L_Close;
+
+L_RewardTime:
+ callfunc "xmas2011points";
+ if (xmas11 & $@xmas11_SantaReward) goto L_Done;
+
+ mes "[Santa]";
+ mes "\"Welcome to my house!\"";
+
+ if (@helppoints == 0)
+ goto L_NoHelp;
+ getinventorylist;
+ if (@inventorylist_count > 80)
+ goto L_Full_Inv;
+ mes "[Santa]";
+ mes "\"I see you've been helping with the preparations for Christmas.\"";
+ next;
+ if (@helppoints < $@xmas2011_main_rewardcost)
+ goto L_NoMainReward;
+ getitem "ElfNightcap", 1;
+ set @helppoints, @helppoints - $@xmas2011_main_rewardcost;
+ mes "\"Things would've been a disaster without your help! Please have this.";
+ mes "Something a helper of mine really needs after the work is done.\"";
+ next;
+
+L_NoMainReward:
+ if (@helppoints < $@xmas2011_toy_rewardcost)
+ goto L_NoToyReward;
+L_ToyAgain:
+ set @toy_reward, rand(4);
+ if (@toy_reward == 0)
+ getitem "PlushMouboo", 1;
+ if (@toy_reward == 1)
+ getitem "StickReinboo", 1;
+ if (@toy_reward == 2)
+ getitem "Doll", 1;
+ if (@toy_reward == 3)
+ getitem "LeatherBall", 1;
+ set @helppoints, @helppoints - $@xmas2011_toy_rewardcost;
+ if (@helppoints >= $@xmas2011_toy_rewardcost)
+ goto L_ToyAgain;
+ mes "\"I have some toys for you.\"";
+ next;
+
+L_NoToyReward:
+ if (@helppoints < $@xmas2011_gloves_rewardcost)
+ goto L_NoGlovesReward;
+ set @gloves, $@glove_id + rand(10);
+ getitem @gloves, 1;
+ set @helppoints, @helppoints - $@xmas2011_gloves_rewardcost;
+ mes "\"This will keep your hands warm.\"";
+ next;
+
+L_NoGlovesReward:
+ if (@helppoints == 0)
+ goto L_Done;
+ mes "\"Have some candy.\"";
+ next;
+ if (@helppoints < $@xmas2011_gingerbreadman_rewardcost)
+ goto L_NoGBMReward;
+ set @candy_amount, @helppoints/$@xmas2011_gingerbreadman_rewardcost;
+ getitem "GingerBreadMan", @candy_amount;
+ set @helppoints, @helppoints - @candy_amount*$@xmas2011_gingerbreadman_rewardcost;
+L_NoGBMReward:
+ if (@helppoints < $@xmas2011_xmascake_rewardcost)
+ goto L_NoXmasCakeReward;
+ set @candy_amount, @helppoints/$@xmas2011_xmascake_rewardcost;
+ getitem "XmasCake", @candy_amount;
+ set @helppoints, @helppoints - @candy_amount*$@xmas2011_xmascake_rewardcost;
+L_NoXmasCakeReward:
+ if (@helppoints < $@xmas2011_candy_rewardcost)
+ goto L_Done;
+ set @candy_amount, @helppoints/$@xmas2011_candy_rewardcost;
+ getitem "Candy", @candy_amount;
+ set @helppoints, @helppoints - @candy_amount*$@xmas2011_candy_rewardcost;
+
+L_Done:
+ mes "[Santa]";
+ mes "\"Merry Christmas!\"";
+ set xmas11, xmas11 | $@xmas11_SantaReward;
+ goto L_Close;
+
+L_Full_Inv:
+ mes "[Santa]";
+ mes "\"Ho, you carry a lot of things with you. Please come back later.\"";
+ goto L_Close;
+
+L_NoHelp:
+ mes "[Santa]";
+ if (@sabotagepoints > 0)
+ mes "\"You weren't a good kid this year...\"";
+ if (@sabotagepoints > 0)
+ mes "He looks very disappointed.";
+ if (@sabotagepoints == 0)
+ mes "\"Please enjoy your time in my house! Merry Christmas!\"";
+ goto L_Close;
+
+L_Close:
+ set @menu, 0;
+ set @inventorylist_count, 0;
+ set @toy_reward, 0;
+ set @gloves, 0;
+ set @candy_amount, 0;
+ set @sabotagepoints, 0;
+ set @helppoints, 0;
+ close;
+}
diff --git a/world/map/npc/xmas/2011/stickReinboo.txt b/world/map/npc/xmas/2011/stickReinboo.txt
new file mode 100644
index 00000000..0436db9c
--- /dev/null
+++ b/world/map/npc/xmas/2011/stickReinboo.txt
@@ -0,0 +1,179 @@
+// This file is part of Christmas Event 2011
+// author: Jenalya
+// Stick Reinboo states:
+// 1: got order from Akseli
+// 2: Kalevi said that he needs more material
+// 3: Kalevi created the Stick Reinboo
+// 4: gave Stick Reinboo to the bad guy
+// 5: delivered the Stick Reinboo without giving it to the bad guy
+// 6: delivered fake present instead of Stick Reinboo
+
+030-2.gat,31,85,0|script|Akseli|329,{
+
+ 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 @stickreinboo, (xmas11 & $@xmas11_StickReinbooMask) >> $@xmas11_StickReinbooShift;
+
+ if (@stickreinboo > 0) goto L_Ordered;
+ if (xmas11 & $@xmas11_talkedToChief) goto L_Helping;
+
+ mes "[Busy Helper]";
+ mes "\"Hello. Are you doing a sightseeing of Santa's house? That's very nice for you.";
+ mes "We're currently very busy with the preparations for Christmas, so please don't interrupt.\"";
+ goto L_Close;
+
+L_Helping:
+ mes "[Akseli]";
+ mes "\"Ah, hello. Could you do me a small favor?";
+ mes "I have this order for a Stick Reinboo, can you bring it to Kalevi?\"";
+ mes "He gives you some piece of paper.";
+ next;
+ mes "It seems to be some kind of form, but you can't really identify anything on it. It contains a lot of boxes with some numbers scrabbled in and some hard to read words.";
+ set @stickreinboo, 1;
+ set xmas11, (xmas11 & ~($@xmas11_StickReinbooMask) | (@stickreinboo << $@xmas11_StickReinbooShift));
+ menu
+ "Alright, will do that.",L_Close,
+ "Erm, what is this?",-;
+ mes "[Akseli]";
+ mes "\"Not important for you to know. Just bring it to Kalevi.";
+ mes "He's already busy with his paperworks again.";
+ goto L_Close;
+
+L_Ordered:
+ mes "[Akseli]";
+ mes "\"Oh, hello again. Did you already give Kalevi the order?\"";
+ goto L_Close;
+
+L_NoEvent:
+ mes "[Akseli]";
+ 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 "[Akseli]";
+ mes "\"I'm so tired now.\"";
+ goto L_Close;
+
+L_Close:
+ set @stickreinboo, 0;
+ close;
+}
+
+030-2.gat,147,23,0|script|Kalevi|329,{
+
+ 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 @stickreinboo, (xmas11 & $@xmas11_StickReinbooMask) >> $@xmas11_StickReinbooShift;
+
+ set @log_amount, 2;
+ set @leather_amount, 1;
+
+ if (@stickreinboo >= 3) goto L_StickReinbooDone;
+ if (@stickreinboo == 2) goto L_StickReinboo;
+ if (@stickreinboo == 1) goto L_Order;
+ if (xmas11 & $@xmas11_talkedToChief) goto L_Helping;
+
+ mes "This helper seems quite happy, humming a happy melody.";
+ mes "[Busy Helper]";
+ mes "\"Hello there. I can't work at the moment, because we're only allowed to create toys that are explicitely ordered.\"";
+ goto L_Close;
+
+L_Helping:
+ mes "Kalevi gets droopy as he sees you coming near.";
+ mes "[Kalevi]";
+ mes "\"Oh, hello. Do you want anything?\"";
+ menu
+ "Why aren't you working? Everyone else is busy!",-,
+ "No, I'm all fine.",L_Close;
+ mes "[Kalevi]";
+ mes "\"I'm not allowed! We're only allowed to create toys that are ordered. Because of the shortage of material, you know.\"";
+ if (@stickreinboo == 0)
+ goto L_Close;
+L_Order:
+ mes "Kalevi doesn't seem motivated.";
+ menu
+ "Akseli gave me this order here for you!",-,
+ "Nevermind.",L_Close;
+ mes "[Kalevi]";
+ mes "\"He did? Ah, well, ok.\"";
+ mes "He sighs and takes the paper.";
+ next;
+ mes "[Kalevi]";
+ mes "\"Ha, but I don't have the material needed for the Stick Reinboo!";
+ mes "\"I'd need " + @log_amount + " Raw Log and " + @leather_amount + " leather patch. That's hard to get.\"";
+ next;
+ mes "\"So I can't work I guess.\"";
+ set @stickreinboo, 2;
+ callsub S_Update_Var;
+ goto L_Close;
+
+L_StickReinboo:
+ mes "[Kalevi]";
+ mes "\"You're back. As I told you I can't work without the material.\"";
+ menu
+ "Ok, nevermind.",L_Close,
+ "I can get it for you. What do you need again?",-;
+ mes "Kalevi doesn't look pleased.";
+ mes "[Kalevi]";
+ mes "\"I need " + @log_amount + " Raw Log and " + @leather_amount + " leather patch. That's hard to get.\"";
+ menu
+ "I have it!",-,
+ "Ok, I'll bring those.",L_Close;
+ if ((countitem("RawLog") < @log_amount) || (countitem("LeatherPatch") < @leather_amount))
+ goto L_NoItems;
+ delitem "RawLog", @log_amount;
+ delitem "LeatherPatch", @leather_amount;
+ set @stickreinboo, 3;
+ callsub S_Update_Var;
+ getitem "StickReinboo", 1;
+ mes "[Kalevi]";
+ mes "\"Ok, ok, you got me. Let's start.\"";
+ next;
+ mes "He takes the Raw Logs and starts carving and polishing, forming one long stick and a shorter one. Then he takes the Leather Patch and cuts it into certain shaped pieces.";
+ mes "He sews them together, stuffs it and leaves one hole on the bottom and one on each side. There he attaches the sticks he carved. The short one is covered by the ears.";
+ next;
+ mes "After that he adds some details to make it have a face.";
+ mes "[Kalevi]";
+ mes "\"Alright, done. Do me a favor and bring it to Aaron, ok?\"";
+ goto L_Close;
+
+L_StickReinbooDone:
+ mes "[Kalevi]";
+ mes "\"Ok, now I can relax again. Unless you're bringing another order for me?\"";
+ mes "He seems worried that you could bring him more work to do.";
+ goto L_Close;
+
+L_NoEvent:
+ mes "[Kalevi]";
+ 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 "[Kalevi]";
+ mes "\"You know, everyone is complaining how stressfull it was this year.";
+ mes "But I think it wasn't that bad at all.\"";
+ goto L_Close;
+
+L_NoItems:
+ mes "[Kalevi]";
+ mes "\"Ha, don't tell nonsense. You don't have it, so I don't have to start working.\"";
+ goto L_Close;
+
+L_Close:
+ set @log_amount, 0;
+ set @leather_amount, 0;
+ set @stickreinboo, 0;
+ close;
+
+S_Update_Var:
+ set xmas11, (xmas11 & ~($@xmas11_StickReinbooMask) | (@stickreinboo << $@xmas11_StickReinbooShift));
+ return;
+}
diff --git a/world/map/npc/xmas/2011/wrappingPaperHelper.txt b/world/map/npc/xmas/2011/wrappingPaperHelper.txt
new file mode 100644
index 00000000..71c132e5
--- /dev/null
+++ b/world/map/npc/xmas/2011/wrappingPaperHelper.txt
@@ -0,0 +1,147 @@
+// This file is part of Christmas Event 2011
+// author: Jenalya
+// Reino asks for reed bundles and water to make wrapping paper
+// also for some dyes to make them colorful
+// later he can be asked for those papers to wrap boxes
+
+030-2.gat,140,31,0|script|Reino|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 @reed_amount, 2;
+ set @water_amount, 1;
+
+ if (xmas11 & $@xmas11_talkedToChief) goto L_Helping;
+
+ mes "[Busy Helper]";
+ mes "\"Excuse, but please don't interrupt. We're all very busy.\"";
+ goto L_Close;
+
+L_Helping:
+ mes "[Reino]";
+ mes "\"Oh, I see you're here to help. Maybe you can assist me with some problem we have.";
+ mes "We're nearly out of wrapping paper for the present boxes.";
+ mes "That's very very bad. Can you imagine how it would look like if the presents wouldn't have wrapping paper?\"";
+ next;
+ mes "\"So, eh, I can only give you some of the remaining wrapping paper if you bring me the needed material to make new wrapping paper.";
+ mes "For making one roll of wrapping paper, I need " + @reed_amount + " Reed Bundles, " + @water_amount + " Bottle of Water and some dye to make it colored.\"";
+ next;
+L_Again:
+ mes "\"Let's see... This is the regulation of wrapping paper colors and designs for this year. Tell me which you want.\"";
+ mes "He shows you some officialy looking piece of paper.";
+ menu
+ "Red dotted (2 Red Dyes)",L_Red,
+ "Yellow dotted (2 Yellow Dyes)",L_Yellow,
+ "Blue dotted (2 Light Blue Dyes)",L_LightBlue,
+ "Purple striped (1 Purple Dye)",L_Purple,
+ "Red with golden stripes (1 Red Dye and 1 Yellow Dye)",L_RedGolden,
+ "Green with red stripes (1 Green Dye and 1 Red Dye)",L_GreenRed,
+ "Why do you have a regulation for wrapping papers?!",L_Regulation,
+ "I'm on my way.",L_Close;
+
+L_Red:
+ if ((countitem("ReedBundle") < @reed_amount) || (countitem("BottleOfWater") < @water_amount) || (countitem("RedDye") < 1))
+ goto L_NoItems;
+ delitem "ReedBundle", @reed_amount;
+ delitem "BottleOfWater", @water_amount;
+ delitem "RedDye", 2;
+ getitem "RedDottedWrap", 1;
+ mes "[Reino]";
+ mes "\"This one is classical.\"";
+ goto L_MadePaper;
+
+L_Yellow:
+ if ((countitem("ReedBundle") < @reed_amount) || (countitem("BottleOfWater") < @water_amount) || (countitem("YellowDye") < 1))
+ goto L_NoItems;
+ delitem "ReedBundle", @reed_amount;
+ delitem "BottleOfWater", @water_amount;
+ delitem "YellowDye", 2;
+ getitem "YellowDottedWrap", 1;
+ mes "[Reino]";
+ mes "\"Right, bright paper brings good vibes.\"";
+ goto L_MadePaper;
+
+L_LightBlue:
+ if ((countitem("ReedBundle") < @reed_amount) || (countitem("BottleOfWater") < @water_amount) || (countitem("LightBlueDye") < 1))
+ goto L_NoItems;
+ delitem "ReedBundle", @reed_amount;
+ delitem "BottleOfWater", @water_amount;
+ delitem "LightBlueDye", 2;
+ getitem "BlueDottedWrap", 1;
+ mes "[Reino]";
+ mes "\"Plain and simple. Here.\"";
+ goto L_MadePaper;
+
+L_Purple:
+ if ((countitem("ReedBundle") < @reed_amount) || (countitem("BottleOfWater") < @water_amount) || (countitem("PurpleDye") < 1))
+ goto L_NoItems;
+ delitem "ReedBundle", @reed_amount;
+ delitem "BottleOfWater", @water_amount;
+ delitem "PurpleDye", 1;
+ getitem "PurpleStripedWrap", 1;
+ mes "[Reino]";
+ mes "\"Mh, personally I don't like it that much, but here you go.\"";
+ goto L_MadePaper;
+
+L_RedGolden:
+ if ((countitem("ReedBundle") < @reed_amount) || (countitem("BottleOfWater") < @water_amount) || (countitem("RedDye") < 1) || (countitem("YellowDye") < 1))
+ goto L_NoItems;
+ delitem "ReedBundle", @reed_amount;
+ delitem "BottleOfWater", @water_amount;
+ delitem "RedDye", 1;
+ delitem "YellowDye", 1;
+ getitem "RedGoldenStripedWrap", 1;
+ mes "[Reino]";
+ mes "\"Good choice, this is my favourite this year.\"";
+ goto L_MadePaper;
+
+L_GreenRed:
+ if ((countitem("ReedBundle") < @reed_amount) || (countitem("BottleOfWater") < @water_amount) || (countitem("RedDye") < 1) || (countitem("GreenDye") < 1))
+ goto L_NoItems;
+ delitem "ReedBundle", @reed_amount;
+ delitem "BottleOfWater", @water_amount;
+ delitem "RedDye", 1;
+ delitem "GreenDye", 1;
+ getitem "GreenRedStripedWrap", 1;
+ mes "[Reino]";
+ mes "\"Yeah, this is really Christmas styled.\"";
+ goto L_MadePaper;
+
+L_MadePaper:
+ next;
+ mes "\"Do you need more wrapping paper?\"";
+ menu
+ "Yes.",L_Again,
+ "No, I have all I need.",L_Close;
+
+L_Regulation:
+ mes "Reino seems irritated.";
+ mes "[Reino]";
+ mes "\"Well, because, ah - there would be total chaos without regulations!";
+ mes "You know, this Christmas business requires a lot of coordination. Things have to be well-ordered.\"";
+ goto L_Close;
+
+L_NoEvent:
+ mes "[Reino]";
+ 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 "[Reino]";
+ mes "\"I love Christmas time. Even if it was a total chaos this year.\"";
+ goto L_Close;
+
+L_NoItems:
+ mes "[Reino]";
+ mes "\"Oh? It seems you don't have the required items.\"";
+ goto L_Close;
+
+L_Close:
+ set @reed_amount, 0;
+ set @water_amount, 0;
+ close;
+}
diff --git a/world/map/npc/xmas/2011/xmas2011config.txt b/world/map/npc/xmas/2011/xmas2011config.txt
new file mode 100644
index 00000000..d6894d74
--- /dev/null
+++ b/world/map/npc/xmas/2011/xmas2011config.txt
@@ -0,0 +1,194 @@
+-|script|#xmas2011config|-1,{
+OnInit:
+ set $@xmas2011_start_day, 10;
+ set $@xmas2011_reward_start_day, 25;
+ set $@xmas2011_year, 2011;
+ set $@glove_id, 2160;
+
+ set $@xmas11_talkedToChief, 0x1;
+ set $@xmas11_talkedToBadGuy, 0x2;
+
+ set $@xmas11_startedReinbooSearch, 0x4;
+ set $@xmas11_firstReinboo, 0x8;
+ set $@xmas11_firstReinbooDone, 0x10;
+ set $@xmas11_secondReinboo, 0x20;
+ set $@xmas11_secondReinbooDone, 0x40;
+ set $@xmas11_thirdReinboo, 0x80;
+ set $@xmas11_thirdReinbooDone, 0x100;
+ set $@xmas11_fourthReinboo, 0x200;
+ set $@xmas11_fourthReinbooDone, 0x400;
+
+ set $@xmas11_Decoration, 0x800;
+ set $@xmas11_DecorationDone, 0x1000;
+ set $@xmas11_Bedding, 0x2000;
+ set $@xmas11_BeddingDone, 0x4000;
+ set $@xmas11_Potion, 0x8000;
+ set $@xmas11_PotionDone, 0x10000;
+
+ set $@xmas11_PlushMoubooMask, 0xE0000;
+ set $@xmas11_PlushMoubooShift, 17;
+
+ set $@xmas11_StickReinbooMask, 0x700000;
+ set $@xmas11_StickReinbooShift, 20;
+
+ set $@xmas11_DollMask, 0x3800000;
+ set $@xmas11_DollShift, 23;
+
+ set $@xmas11_BallMask, 0x1C000000;
+ set $@xmas11_BallShift, 26;
+
+ set $@xmas11_BadGuyReward, 0x20000000;
+ set $@xmas11_SantaReward, 0x40000000;
+
+// 0x80000000
+
+ set $@xmas2011_reinboopoints, 10;
+ set $@xmas2011_beddingpoints, 10;
+ set $@xmas2011_glitterpoints, 10;
+ set $@xmas2011_potionpoints, 10;
+ set $@xmas2011_plushmouboopoints, 10;
+ set $@xmas2011_stickreinboopoints, 10;
+ set $@xmas2011_ballpoints, 10;
+ set $@xmas2011_dollpoints, 10;
+
+ set $@xmas2011_totalpoints, 4*$@xmas2011_reinboopoints + $@xmas2011_beddingpoints + $@xmas2011_glitterpoints + $@xmas2011_potionpoints + $@xmas2011_plushmouboopoints + $@xmas2011_stickreinboopoints + $@xmas2011_ballpoints + $@xmas2011_dollpoints;
+
+ set $@xmas2011_main_rewardcost, 70;
+ set $@xmas2011_toy_rewardcost, 30;
+ set $@xmas2011_gloves_rewardcost, 8;
+ set $@xmas2011_gingerbreadman_rewardcost, 5;
+ set $@xmas2011_xmascake_rewardcost, 3;
+ set $@xmas2011_candy_rewardcost, 1;
+}
+
+// calculates the points for helping and sabotating
+function|script|xmas2011points|{
+ set @plushmouboo, (xmas11 & $@xmas11_PlushMoubooMask) >> $@xmas11_PlushMoubooShift;
+ set @stickreinboo, (xmas11 & $@xmas11_StickReinbooMask) >> $@xmas11_StickReinbooShift;
+ set @ball, (xmas11 & $@xmas11_BallMask) >> $@xmas11_BallShift;
+ set @doll, (xmas11 & $@xmas11_DollMask) >> $@xmas11_DollShift;
+ set @helppoints, 0;
+ set @sabotagepoints, 0;
+
+ if ((xmas11 & $@xmas11_firstReinbooDone) && !(xmas11 & $@xmas11_firstReinboo))
+ set @helppoints, @helppoints + $@xmas2011_reinboopoints;
+ if ((xmas11 & $@xmas11_firstReinbooDone) && (xmas11 & $@xmas11_firstReinboo))
+ set @sabotagepoints, @sabotagepoints + $@xmas2011_reinboopoints;
+
+ if ((xmas11 & $@xmas11_secondReinbooDone) && !(xmas11 & $@xmas11_secondReinboo))
+ set @helppoints, @helppoints + $@xmas2011_reinboopoints;
+ if ((xmas11 & $@xmas11_secondReinbooDone) && (xmas11 & $@xmas11_secondReinboo))
+ set @sabotagepoints, @sabotagepoints + $@xmas2011_reinboopoints;
+
+ if ((xmas11 & $@xmas11_thirdReinbooDone) && !(xmas11 & $@xmas11_thirdReinboo))
+ set @helppoints, @helppoints + $@xmas2011_reinboopoints;
+ if ((xmas11 & $@xmas11_thirdReinbooDone) && (xmas11 & $@xmas11_thirdReinboo))
+ set @sabotagepoints, @sabotagepoints + $@xmas2011_reinboopoints;
+
+ if ((xmas11 & $@xmas11_fourthReinbooDone) && !(xmas11 & $@xmas11_fourthReinboo))
+ set @helppoints, @helppoints + $@xmas2011_reinboopoints;
+ if ((xmas11 & $@xmas11_fourthReinbooDone) && (xmas11 & $@xmas11_fourthReinboo))
+ set @sabotagepoints, @sabotagepoints + $@xmas2011_reinboopoints;
+
+ if ((xmas11 & $@xmas11_PotionDone) && !(xmas11 & $@xmas11_Potion))
+ set @helppoints, @helppoints + $@xmas2011_potionpoints;
+ if ((xmas11 & $@xmas11_PotionDone) && (xmas11 & $@xmas11_Potion))
+ set @sabotagepoints, @sabotagepoints + $@xmas2011_potionpoints;
+
+ if ((xmas11 & $@xmas11_BeddingDone) && !(xmas11 & $@xmas11_Bedding))
+ set @helppoints, @helppoints + $@xmas2011_beddingpoints;
+ if ((xmas11 & $@xmas11_BeddingDone) && (xmas11 & $@xmas11_Bedding))
+ set @sabotagepoints, @sabotagepoints + $@xmas2011_beddingpoints;
+
+ if ((xmas11 & $@xmas11_DecorationDone) && !(xmas11 & $@xmas11_Decoration))
+ set @helppoints, @helppoints + $@xmas2011_glitterpoints;
+ if ((xmas11 & $@xmas11_DecorationDone) && (xmas11 & $@xmas11_Decoration))
+ set @sabotagepoints, @sabotagepoints + $@xmas2011_glitterpoints;
+
+ if (@plushmouboo == 5)
+ set @helppoints, @helppoints + $@xmas2011_plushmouboopoints;
+ if (@plushmouboo == 6)
+ set @sabotagepoints, @sabotagepoints + $@xmas2011_plushmouboopoints;
+
+ if (@stickreinboo == 5)
+ set @helppoints, @helppoints + $@xmas2011_stickreinboopoints;
+ if (@stickreinboo == 6)
+ set @sabotagepoints, @sabotagepoints + $@xmas2011_stickreinboopoints;
+
+ if (@ball == 5)
+ set @helppoints, @helppoints + $@xmas2011_ballpoints;
+ if (@ball == 6)
+ set @sabotagepoints, @sabotagepoints + $@xmas2011_ballpoints;
+
+ if (@doll == 5)
+ set @helppoints, @helppoints + $@xmas2011_dollpoints;
+ if (@doll == 6)
+ set @sabotagepoints, @sabotagepoints + $@xmas2011_dollpoints;
+
+ set @plushmouboo, 0;
+ set @stickreinboo, 0;
+ set @ball, 0;
+ set @doll, 0;
+ return;
+}
+
+function|script|xmas2011debug|{
+ menu
+ "i'm fine",L_Close,
+ "show my points",L_Points,
+ "show variable",L_Var,
+ "restart",L_Restart,
+ "reset",-;
+ set xmas11, 0;
+ close;
+L_Restart:
+ set xmas11, 0;
+ set xmas11, xmas11 | $@xmas11_talkedToChief;
+ close;
+
+L_Points:
+ callfunc "xmas2011points";
+ mes "Good points: " + @helppoints;
+ mes "Bad points: " + @sabotagepoints;
+ close;
+
+L_Var:
+ mes "Talked to Chief: " + ((xmas11 & 0x1));
+ mes "Talked to Bad Guy: " + ((xmas11 & 0x2) >> 1);
+ mes "Started Reinboo: " + ((xmas11 & 0x4) >> 2);
+ mes "R1 Bit 0: " + ((xmas11 & 0x8) >> 3);
+ mes "R1 Bit 1: " + ((xmas11 & 0x10) >> 4);
+ mes "R2 Bit 0: " + ((xmas11 & 0x20) >> 5);
+ mes "R2 Bit 1: " + ((xmas11 & 0x40) >> 6);
+ mes "R3 Bit 0: " + ((xmas11 & 0x80) >> 7);
+ mes "R3 Bit 1: " + ((xmas11 & 0x100) >> 8);
+ mes "R4 Bit 0: " + ((xmas11 & 0x200) >> 9);
+ mes "R4 Bit 1: " + ((xmas11 & 0x400) >> 10);
+ mes "Dec Bit 0: " + ((xmas11 & 0x800) >> 11);
+ mes "Dec Bit 1: " + ((xmas11 & 0x1000) >> 12);
+ mes "Bed Bit 0: " + ((xmas11 & 0x2000) >> 13);
+ mes "Bed Bit 1: " + ((xmas11 & 0x4000) >> 14);
+ mes "Pot Bit 0: " + ((xmas11 & 0x8000) >> 15);
+ mes "Pot Bit 1" + ((xmas11 & 0x10000) >> 16);
+ mes "plushmouboo b0: " + ((xmas11 & 0x20000) >> 17);
+ mes "plushmouboo b1: " + ((xmas11 & 0x40000) >> 18);
+ mes "plushmouboo b2: " + ((xmas11 & 0x80000) >> 19);
+ mes "stickreinboo b0: " + ((xmas11 & 0x100000) >> 20);
+ mes "stickreinboo b1: " + ((xmas11 & 0x200000) >> 21);
+ mes "stickreinboo b1: " + ((xmas11 & 0x400000) >> 22);
+ mes "doll b0: " + ((xmas11 & 0x800000) >> 23);
+ mes "doll b1: " + ((xmas11 & 0x1000000) >> 24);
+ mes "doll b2: " + ((xmas11 & 0x2000000) >> 25);
+ mes "ball b0: " + ((xmas11 & 0x4000000) >> 26);
+ mes "ball b1: " + ((xmas11 & 0x8000000) >> 27);
+ mes "ball b2: " + ((xmas11 & 0x10000000) >> 28);
+ mes "bad guy reward: " + ((xmas11 & 0x20000000) >> 29);
+ mes "santa reward: " + ((xmas11 & 0x40000000) >> 30);
+ mes "not used: " + ((xmas11 & 0x80000000) >> 31);
+ close;
+
+L_Close:
+ set @helppoints, 0;
+ set @sabotagepoints, 0;
+ close;
+}