summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwushin <pasekei@gmail.com>2013-12-25 09:08:06 -0600
committerwushin <pasekei@gmail.com>2013-12-26 08:27:31 -0600
commitcd71949def7c2c9b86991b92f4462136671757a3 (patch)
tree1122db272deff33e017afd9011e6c92ffd3eea59
parent91498af8d7e3f347ef5bcc3a9b1dc7d91d52fd61 (diff)
downloadserverdata-cd71949def7c2c9b86991b92f4462136671757a3.tar.gz
serverdata-cd71949def7c2c9b86991b92f4462136671757a3.tar.bz2
serverdata-cd71949def7c2c9b86991b92f4462136671757a3.tar.xz
serverdata-cd71949def7c2c9b86991b92f4462136671757a3.zip
Annual Xmas Event
m---------client-data0
-rw-r--r--world/map/data/019-3.wlkbin18748 -> 17668 bytes
-rw-r--r--world/map/data/020-1.wlkbin18948 -> 18948 bytes
-rw-r--r--world/map/data/030-2.wlkbin28604 -> 28604 bytes
-rw-r--r--world/map/data/030-3.wlkbin0 -> 17668 bytes
-rw-r--r--world/map/data/030-4.wlkbin0 -> 4904 bytes
-rw-r--r--world/map/data/resnametable.txt2
-rw-r--r--world/map/db/item_db.txt15
-rw-r--r--world/map/db/mob_db.txt8
-rw-r--r--world/map/news.d/27-xmas-event.txt30
-rw-r--r--world/map/npc/001-2/omar.txt3
-rw-r--r--world/map/npc/019-1/_import.txt1
-rw-r--r--world/map/npc/019-1/_mobs.txt6
-rw-r--r--world/map/npc/019-1/mobmanager.txt40
-rw-r--r--world/map/npc/019-1/santa_helper.txt58
-rw-r--r--world/map/npc/019-3/_mobs.txt4
-rw-r--r--world/map/npc/019-3/_warps.txt7
-rw-r--r--world/map/npc/021-1/hideandseek.txt13
-rw-r--r--world/map/npc/025-1/rossy.txt3
-rw-r--r--world/map/npc/030-1/_mobs.txt22
-rw-r--r--world/map/npc/030-1/_warps.txt1
-rw-r--r--world/map/npc/030-2/_import.txt13
-rw-r--r--world/map/npc/030-2/_warps.txt1
-rw-r--r--world/map/npc/030-2/avalia.txt221
-rw-r--r--world/map/npc/030-2/basic_npcs.txt81
-rw-r--r--world/map/npc/030-2/bedding_helper.txt102
-rw-r--r--world/map/npc/030-2/chief_helper.txt90
-rw-r--r--world/map/npc/030-2/eljas.txt212
-rw-r--r--world/map/npc/030-2/empty_boxes_helper.txt68
-rw-r--r--world/map/npc/030-2/gaurds.txt33
-rw-r--r--world/map/npc/030-2/glitter_helper.txt99
-rw-r--r--world/map/npc/030-2/present_helper.txt87
-rw-r--r--world/map/npc/030-2/roasted_acrons_helper.txt82
-rw-r--r--world/map/npc/030-2/shipping_helper.txt119
-rw-r--r--world/map/npc/030-2/storage_helper.txt104
-rw-r--r--world/map/npc/030-2/wrapping_paper_helper.txt142
-rw-r--r--world/map/npc/030-3/_import.txt6
-rw-r--r--world/map/npc/030-3/_mobs.txt9
-rw-r--r--world/map/npc/030-3/_warps.txt4
-rw-r--r--world/map/npc/030-3/orum_homunculus.txt468
-rw-r--r--world/map/npc/030-4/_import.txt7
-rw-r--r--world/map/npc/030-4/_mobs.txt9
-rw-r--r--world/map/npc/030-4/_warps.txt3
-rw-r--r--world/map/npc/030-4/mana_battery.txt384
-rw-r--r--world/map/npc/030-4/mapflags.txt1
-rw-r--r--world/map/npc/031-1/_mobs.txt14
-rw-r--r--world/map/npc/031-3/_mobs.txt7
-rw-r--r--world/map/npc/034-1/_mobs.txt8
-rw-r--r--world/map/npc/_import.txt2
-rw-r--r--world/map/npc/annuals/fathertime.txt19
-rw-r--r--world/map/npc/annuals/xmas/barriers.txt161
-rw-r--r--world/map/npc/annuals/xmas/config.txt301
-rw-r--r--world/map/npc/annuals/xmas/core.txt239
-rw-r--r--world/map/npc/annuals/xmas/debug.txt235
-rw-r--r--world/map/npc/annuals/xmas/helpers.txt48
-rw-r--r--world/map/npc/annuals/xmas/list.txt102
-rw-r--r--world/map/npc/annuals/xmas/mobmanager.txt99
-rw-r--r--world/map/npc/annuals/xmas/reagents.txt142
-rw-r--r--world/map/npc/annuals/xmas/states.txt55
-rw-r--r--world/map/npc/annuals/xmas/tree_beard.txt107
-rw-r--r--world/map/npc/functions/mob_points.txt12
-rw-r--r--world/map/npc/scripts.conf13
62 files changed, 4026 insertions, 96 deletions
diff --git a/client-data b/client-data
-Subproject afe28a5840f53787a91333691ee519939b9fe4e
+Subproject ae98c57b6d7d6ec999ed767e5c58e880e405516
diff --git a/world/map/data/019-3.wlk b/world/map/data/019-3.wlk
index 7de8b743..196ea5ec 100644
--- a/world/map/data/019-3.wlk
+++ b/world/map/data/019-3.wlk
Binary files differ
diff --git a/world/map/data/020-1.wlk b/world/map/data/020-1.wlk
index 5fb767f1..7ee25813 100644
--- a/world/map/data/020-1.wlk
+++ b/world/map/data/020-1.wlk
Binary files differ
diff --git a/world/map/data/030-2.wlk b/world/map/data/030-2.wlk
index 66c431f8..814882de 100644
--- a/world/map/data/030-2.wlk
+++ b/world/map/data/030-2.wlk
Binary files differ
diff --git a/world/map/data/030-3.wlk b/world/map/data/030-3.wlk
new file mode 100644
index 00000000..0364cb31
--- /dev/null
+++ b/world/map/data/030-3.wlk
Binary files differ
diff --git a/world/map/data/030-4.wlk b/world/map/data/030-4.wlk
new file mode 100644
index 00000000..1094754b
--- /dev/null
+++ b/world/map/data/030-4.wlk
Binary files differ
diff --git a/world/map/data/resnametable.txt b/world/map/data/resnametable.txt
index 552a135b..4868fb22 100644
--- a/world/map/data/resnametable.txt
+++ b/world/map/data/resnametable.txt
@@ -76,6 +76,8 @@
029-3.gat#029-3.wlk#
030-1.gat#030-1.wlk#
030-2.gat#030-2.wlk#
+030-3.gat#030-3.wlk#
+030-4.gat#030-4.wlk#
031-1.gat#031-1.wlk#
031-2.gat#031-2.wlk#
031-3.gat#031-3.wlk#
diff --git a/world/map/db/item_db.txt b/world/map/db/item_db.txt
index 42227b27..75527618 100644
--- a/world/map/db/item_db.txt
+++ b/world/map/db/item_db.txt
@@ -420,9 +420,22 @@
902, BlueRoseHat, Blue Rose Hat, 5, 5000, 1000, 0, 0, 1, 0, 8, 0, 2, 256, 0, 0, 0, {}, {}
903, SlingShot, Sling Shot, 4, 500, 50, 10, 5, 0, 3, 0, 0, 2, 34, 1, 1, 11, {}, {set @LauncherType, AMMO_SLING; callfunc "CheckLauncher";}
904, SlingBullet, Sling Bullet, 10, 1, 0, 1, 5, 0, 0, 0, 0, 2, 32768, 0, 0, 0, {}, {set @AmmoType, AMMO_SLING; callfunc "CheckAmmo";}
-
// Add new entries above here. For dyed entries, add to the bottom of the 2000s.
+1183, AmberChristmasSweater, Amber Christmas Sweater, 5, 2000, 1000, 35, 0, 6, 0, -12, 0, 2, 512, 0, 0, 0, {}, {}
+1184, FunkyChristmasSweater, Funky Christmas Sweater, 5, 2000, 1000, 35, 0, 6, 0, -12, 0, 2, 512, 0, 0, 0, {}, {}
+1185, PinkChristmasSweater, Pink Christmas Sweater, 5, 8000, 4000, 30, 0, 5, 0, 0, 0, 2, 512, 0, 0, 0, {}, {}
+1186, DarkChristmasSweater, Dark Christmas Sweater, 5, 2000, 1000, 35, 0, 6, 0, -12, 0, 2, 512, 0, 0, 0, {}, {}
+1187, BlueChristmasSweater, Blue Christmas Sweater, 5, 8000, 4000, 30, 0, 5, 0, 0, 0, 2, 512, 0, 0, 0, {}, {}
+1188, RedStockings, Red Stockings, 5, 7000, 2000, 10, 0, 1, 0, 2, 0, 2, 64, 0, 0, 0, {}, {}
+1189, PollettEgg, PollettEgg, 0, 250, 25, 4, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, {itemheal 75, 10;}, {}
+1190, NutcrackerHat, NutcrackerHat, 5, 1000, 500, 20, 0, 5, 0, 2, 0, 2, 256, 0, 0, 0, {}, {}
+1191, WhiteWrap, White Wrap, 3, 50, 25, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, {}, {}
+1192, YellowWrap, Yellow Wrap, 3, 50, 25, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, {}, {}
+1193, BlueWrap, Blue Wrap, 3, 50, 25, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, {}, {}
+1194, PurpleWrap, Purple Wrap, 3, 50, 25, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, {}, {}
+1195, GreenWrap, Green Wrap, 3, 50, 25, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, {}, {}
+//1196, Open
1197, SkeletonCharm, Skeleton Charm, 5, 0, 0, 10, 0, 0, 0, 0, 0, 2, 128, 0, 0, 0, {}, { callfunc "CheckMunro"; }
1198, JackOSoul, Jack O Soul, 3, 100000, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, {}, {}
1199, Arrow, Arrow, 10, 2, 1, 1, 20, 0, 0, 0, 0, 2, 32768, 0, 0, 0, {}, {set @AmmoType, AMMO_BOW; callfunc "CheckAmmo";}
diff --git a/world/map/db/mob_db.txt b/world/map/db/mob_db.txt
index 8e336d48..663360e0 100644
--- a/world/map/db/mob_db.txt
+++ b/world/map/db/mob_db.txt
@@ -94,7 +94,7 @@
1082, Serqet, Serqet, 10, 100, 0, 0, 2, 1, 10, 15, 0, 5, 1, 1, 1, 0, 15, 5, 1, 1, 1, 3, 20, 129, 2000, 1872, 672, 480, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
1083, HuntsmanSpider, HuntsmanSpider, 30, 1500, 0, 0, 363, 1, 125, 150, 10, 45, 20, 15, 10, 10, 45, 10, 1, 1, 1, 0, 45, 175, 575, 1250, 672, 480, 638, 100, 526, 500, 640, 300, 518, 1000, 719, 500, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 30
1084, CrotcherScorpion, CrotcherScorpion, 25, 1200, 0, 0, 86, 1, 75, 175, 15, 45, 15, 30, 10, 10, 25, 25, 1, 1, 1, 0, 45, 133, 750, 1350, 672, 480, 523, 300, 518, 1000, 509, 300, 512, 300, 535, 500, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 30
-1085, IceSkull, IceSkull, 180, 5000, 0, 0, 412, 2, 75, 175, 35, 15, 30, 30, 20, 20, 25, 60, 1, 1, 1, 3, 21, 141, 600, 1600, 672, 480, 631, 1000, 4026, 5000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 30
+1085, IceSkull, IceSkull, 180, 7000, 0, 0, 412, 2, 75, 400, 40, 15, 30, 30, 20, 20, 25, 34, 1, 1, 1, 3, 21, 141, 600, 1600, 672, 480, 632, 500, 510, 1000, 862, 5000, 648, 1000, 876, 35, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 30
1086, FeyElement, FeyElement, 50, 5000, 0, 12500, 901, 5, 50, 125, 25, 50, 20, 70, 10, 20, 80, 1, 1, 1, 1, 0, 84, 165, 330, 740, 672, 400, 834, 5000, 680, 1000, 680, 1000, 681, 1000, 681, 1000, 682, 1000, 682, 1000, 683, 1000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 50
1087, Larvern, Larvern, 20, 550, 0, 0, 26, 1, 50, 200, 30, 65, 35, 20, 50, 0, 70, 20, 1, 1, 1, 0, 25, 139, 1500, 1500, 672, 480, 836, 2000, 518, 1000, 807, 300, 806, 300, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 30
1088, Hyvern, Hyvern, 40, 2250, 0, 0, 346, 1, 50, 125, 0, 10, 10, 45, 5, 0, 35, 35, 1, 1, 1, 0, 85, 133, 250, 800, 672, 480, 835, 2000, 518, 1000, 657, 600, 529, 3000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 30
@@ -103,7 +103,7 @@
1091, BlueSlime, BlueSlime, 40, 2000, 0, 0, 77, 1, 100, 150, 20, 40, 40, 30, 50, 10, 50, 40, 1, 1, 1, 0, 61, 131, 1200, 1872, 672, 480, 4026, 200, 4005, 20, 501, 500, 862, 700, 863, 100, 864, 500, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 20
1092, SlimeBlast, SlimeBlast, 10, 100, 0, 0, 8, 1, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 1, 1, 1, 0, 61, 175, 250, 1872, 672, 480, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 20
1093, WhiteSlime, WhiteSlime, 20, 200, 0, 0, 15, 1, 80, 120, 10, 10, 20, 30, 10, 10, 30, 20, 1, 1, 1, 0, 61, 137, 500, 1872, 672, 480, 4026, 200, 4002, 20, 541, 500, 863, 100, 864, 200, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 20
-1094, Reinboo, Reinboo, 35, 1100, 0, 0, 29, 2, 40, 75, 35, 5, 15, 5, 15, 0, 40, 10, 2, 2, 1, 3, 20, 129, 600, 1872, 672, 480, 512, 1000, 736, 1200, 737, 1200, 738, 1200, 739, 1200, 869, 50, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 30
+1094, Reinboo, Reinboo, 35, 1100, 0, 0, 29, 2, 40, 75, 35, 5, 15, 5, 15, 0, 40, 10, 2, 2, 1, 3, 20, 129, 600, 1872, 672, 480, 512, 1000, 736, 1200, 737, 1200, 738, 1200, 739, 1200, 869, 50, 4042, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 30
1095, WhiteBell, WhiteBell, 1, 1, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 3, 22, 0, 800, 800, 672, 480, 861, 5000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
1096, SoulSnake, SoulSnake, 115, 850, 0, 0, 56, 1, 75, 90, 4, 6, 20, 11, 10, 10, 35, 10, 1, 1, 1, 0, 20, 137, 900, 1300, 672, 480, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 30
1097, SoulEater, SoulEater, 90, 6800, 0, 0, 1467, 1, 129, 354, 12, 10, 35, 18, 3, 8, 71, 65, 1, 1, 1, 0, 29, 175, 340, 1800, 672, 950, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 30
@@ -120,5 +120,9 @@
1108, AngryFireGoblin, AngryFireGoblin, 30, 320, 0, 0, 4, 1, 25, 40, 0, 10, 3, 3, 3, 2, 10, 50, 1, 1, 1, 3, 23, 133, 800, 1872, 672, 480, 505, 800, 501, 150, 518, 800, 502, 150, 521, 70, 522, 10, 701, 500, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 30
1109, AngrySeaSlime, AngrySeaSlime, 80, 1200, 0, 0, 23, 1, 40, 70, 13, 17, 3, 30, 3, 0, 35, 35, 1, 1, 1, 0, 41, 135, 1500, 1872, 672, 480, 535, 800, 657, 800, 518, 500, 510, 1000, 700, 100, 1199, 5000, 568, 100, 541, 50, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
1110, AngryGreenSlime, AngryGreenSlime, 60, 1000, 0, 0, 126, 1, 100, 160, 20, 30, 20, 30, 10, 10, 30, 30, 1, 1, 1, 0, 21, 175, 1200, 1872, 672, 480, 502, 200, 4004, 20, 501, 100, 521, 250, 522, 200, 526, 500, 503, 500, 535, 750, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 20
+1111, CandiedSlime, CandiedSlime, 50, 800, 0, 800, 250, 3, 50, 50, 20, 30, 20, 30, 10, 10, 30, 30, 1, 1, 1, 0, 21, 175, 1200, 1872, 672, 480, 510, 1000, 509, 1000, 515, 200, 516, 200, 538, 200, 512, 200, 508, 500, 514, 750, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 20
+1112, Santaboo, Santaboo, 50, 2200, 0, 0, 150, 2, 80, 125, 50, 10, 25, 10, 25, 0, 60, 30, 2, 2, 1, 3, 20, 129, 600, 1872, 672, 480, 512, 1000, 736, 1200, 737, 1200, 738, 1200, 739, 1200, 511, 50, 4042, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 30
+1113, Pollett, Pollett, 30, 500, 0, 0, 7, 1, 6, 10, 1, 5, 1, 2, 1, 0, 20, 25, 1, 1, 1, 3, 20, 129, 800, 1600, 672, 480, 4026, 1000, 4023, 500, 700, 300, 862, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 40
+1114, Nutcracker, Nutcracker, 110, 6000, 0, 0, 1300, 1, 81, 281, 20, 42, 40, 20, 10, 5, 60, 40, 1, 1, 1, 0, 29, 133, 400, 872, 672, 900, 569, 1000, 660, 750, 539, 750, 503, 250, 640, 200, 4004, 200, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 30,
//ID, Name, Jname, LV, HP, SP, EXP, JEXP, Range1, ATK1, ATK2, DEF, MDEF, STR, AGI, VIT, INT, DEX, LUK, Range2, Range3, Scale, Race, Element,Mode, Speed, Adelay, Amotion,Dmotion,Drop1id,Drop1per, Drop2id,Drop2%, Drop3id,Drop3%, Drop4id,Drop4%, Drop5id,Drop5%, Drop6id,Drop6%, Drop7id,Drop7%, Drop8id,Drop8%, Item1, Item2, MEXP, ExpPer, MVP1id, MVP1per,MVP2id, MVP2per,MVP3id, MVP3per,mutationcount,mutationstrength
diff --git a/world/map/news.d/27-xmas-event.txt b/world/map/news.d/27-xmas-event.txt
new file mode 100644
index 00000000..85e36372
--- /dev/null
+++ b/world/map/news.d/27-xmas-event.txt
@@ -0,0 +1,30 @@
+{title:Christmas Season in The Mana World}
+{date:2013-12-25}
+
+Happy Holidays!
+
+This year has been horrible for Santa.
+Nothing turned out as it was intended, in fact he didn't
+even make it at the usual date.
+
+Gladly, Avalia, Santa's utterly attractive apprentice stepped in
+to make Christmas happen for all of the children and lonely
+people around the mana world. Go to his workshop and see if
+you can help to make the magic of christmas happen,
+
+... or make it a complete disaster,
+Orum has some helpers hidden in Nivalis who will guide your
+way sabotaging christmas.
+
+This release is very late, so we are going to change reward
+and event time accordingly.
+
+The good thing is that you will now be able to visit
+Santa's Inn throughout the year.
+Cassy breathed life into all those reinboos of last
+years Holidays.
+Fothers Candied Slimes are going to cause the sweetest nightmares
+you have ever had. Not sure if you are cruel enough to kill
+a Pollett.
+
+{author: The Mana World Development Team}
diff --git a/world/map/npc/001-2/omar.txt b/world/map/npc/001-2/omar.txt
index 65f3e2d1..f5159436 100644
--- a/world/map/npc/001-2/omar.txt
+++ b/world/map/npc/001-2/omar.txt
@@ -178,6 +178,9 @@ S_update_var:
001-2.gat,76,59,0|script|Kadiya|174,
{
+ set $@child_number, 7;
+ callfunc "XmasList";
+
callfunc "ElanoreFix";
set @Q_MASK, NIBBLE_3_MASK;
set @Q_SHIFT, NIBBLE_3_SHIFT;
diff --git a/world/map/npc/019-1/_import.txt b/world/map/npc/019-1/_import.txt
index cf294dcd..c86b158e 100644
--- a/world/map/npc/019-1/_import.txt
+++ b/world/map/npc/019-1/_import.txt
@@ -3,6 +3,5 @@
map: 019-1.gat
npc: npc/019-1/_mobs.txt
npc: npc/019-1/_warps.txt
-npc: npc/019-1/mobmanager.txt
npc: npc/019-1/santa_helper.txt
npc: npc/019-1/snowman.txt
diff --git a/world/map/npc/019-1/_mobs.txt b/world/map/npc/019-1/_mobs.txt
index c638f1b0..1e6403db 100644
--- a/world/map/npc/019-1/_mobs.txt
+++ b/world/map/npc/019-1/_mobs.txt
@@ -4,6 +4,7 @@
019-1.gat,0,0,0,0|monster|Fluffy|1020,50,100000,30000,Mob019-1::On1020
019-1.gat,0,0,0,0|monster|Reinboo|1094,4,100000,30000,Mob019-1::On1094
019-1.gat,0,0,0,0|monster|WhiteBell|1095,5,100000,30000,Mob019-1::On1095
+019-1.gat,0,0,0,0|monster|Santaboo|1112,4,100000,30000,Mob019-1::On1112
019-1.gat,0,0,0|script|Mob019-1|-1,
@@ -23,5 +24,10 @@ On1095:
callfunc "MobPoints";
end;
+On1112:
+ set @mobID, 1112;
+ callfunc "MobPoints";
+ end;
+
end;
}
diff --git a/world/map/npc/019-1/mobmanager.txt b/world/map/npc/019-1/mobmanager.txt
deleted file mode 100644
index 22917bea..00000000
--- a/world/map/npc/019-1/mobmanager.txt
+++ /dev/null
@@ -1,40 +0,0 @@
-// Spawns mobs
-
-019-1.gat,0,0,0|script|SpawnManager|-1,
-{
- end; // just to be secure
-
-OnInit:
- set $@019_1_SANTASLIME_MONSTER_MAX_NUMBER,15;
- set $@019_1_SANTASLIME_MOMSTER_ID,1015;
- set $@019_1_SANTASLIME_MONSTER_SPAWN_X1,32;
- set $@019_1_SANTASLIME_MONSTER_SPAWN_Y1,31;
- set $@019_1_SANTASLIME_MONSTER_SPAWN_X2,111;
- set $@019_1_SANTASLIME_MONSTER_SPAWN_Y2,101;
- set $@019_1_SANTASLIME_month,gettime(6);
- set $@019_1_SANTASLIME_monster_number,0;
- if (debug >= 2) end;
- initnpctimer;
- if ($@019_1_SANTASLIME_month == 12 || $@019_1_SANTASLIME_month == 1 || $@019_1_SANTASLIME_month == 2) goto L_Init_Spawn;
- end;
-
-L_Init_Spawn:
- areamonster "019-1.gat", $@019_1_SANTASLIME_MONSTER_SPAWN_X1, $@019_1_SANTASLIME_MONSTER_SPAWN_Y1, $@019_1_SANTASLIME_MONSTER_SPAWN_X2, $@019_1_SANTASLIME_MONSTER_SPAWN_Y2, "Santa Slime", $@019_1_SANTASLIME_MOMSTER_ID, $@019_1_SANTASLIME_MONSTER_MAX_NUMBER, "SpawnManager::OnMonsterDeath";
- set $@monster_number,$@019_1_SANTASLIME_MONSTER_MAX_NUMBER;
- end;
-
-L_Spawn:
- areamonster "019-1.gat", $@019_1_SANTASLIME_MONSTER_SPAWN_X1, $@019_1_SANTASLIME_MONSTER_SPAWN_Y1, $@019_1_SANTASLIME_MONSTER_SPAWN_X2, $@019_1_SANTASLIME_MONSTER_SPAWN_Y2, "Santa Slime", $@019_1_SANTASLIME_MOMSTER_ID, 1, "SpawnManager::OnMonsterDeath";
- set $@019_1_SANTASLIME_monster_number,$@019_1_SANTASLIME_monster_number+1;
- end;
-
-OnTimer20000:
- initnpctimer;
- set $@019_1_SANTASLIME_month,gettime(6);
- if (($@019_1_SANTASLIME_month == 12 || $@019_1_SANTASLIME_month == 1 || $@019_1_SANTASLIME_month == 2) && $@019_1_SANTASLIME_monster_number < $@019_1_SANTASLIME_MONSTER_MAX_NUMBER) goto L_Spawn;
- end;
-
-OnMonsterDeath:
- set $@019_1_SANTASLIME_monster_number,$@019_1_SANTASLIME_monster_number-1;
- end;
-}
diff --git a/world/map/npc/019-1/santa_helper.txt b/world/map/npc/019-1/santa_helper.txt
index 758a1b0a..76ce9422 100644
--- a/world/map/npc/019-1/santa_helper.txt
+++ b/world/map/npc/019-1/santa_helper.txt
@@ -1,11 +1,14 @@
// Author: accoring to git history probably Jaxad
+// and extended by wushin to be included in the annual
// quest made seasonal and adapted to new scripting standards by Jenalya
019-1.gat,74,75,0|script|Santa's Helper|105,
{
callfunc "ClearVariables";
- if (FLAGS & FLAG_SANTAS_HELPER) goto L_Done;
- if ((gettime(6) == 12) || ((gettime(6) == 1) && (gettime(5) < 7))) goto L_Quest;
+ callfunc "XmasStates";
+
+ if (($@xmas_time) && (@xmas_sh_done)) goto L_Done;
+ if ($@xmas_time) goto L_Quest;
mes "[Santa's Helper]";
mes "\"Ah, isn't it peaceful here? Around Christmas time we always have problems with some slimy monsters.";
@@ -17,10 +20,6 @@
goto L_Close;
L_Quest:
- set @purple_amount, 25;
- set @blue_amount, 20;
- set @green_amount, 5;
-
mes "[Santa's Helper]";
mes "\"Hello my young friend.";
mes "Would you like to help me?\"";
@@ -30,44 +29,48 @@ L_Quest:
mes "If you help me, I'll give you something very nice\"";
next;
-L_M:
+L_Menu:
menu
- "I have some present boxes", L_Y,
- "Hmm, see you later", L_N,
- "What you need exactly?", L_R;
+ "I have some present boxes", L_Yes,
+ "Hmm, see you later", L_No,
+ "What you need exactly?", L_Help;
-L_Y:
+L_Yes:
mes "[Santa's Helper]";
mes "\"Hmm, let me check what you have.\"";
next;
- if (countitem("PurplePresentBox") < @purple_amount)
+ if (countitem("PurplePresentBox") < $@xmas_sh_purple_amount)
goto L_NoItem;
- if (countitem("BluePresentBox") < @blue_amount)
+ if (countitem("BluePresentBox") < $@xmas_sh_blue_amount)
goto L_NoItem;
- if (countitem("GreenPresentBox") < @green_amount)
+ if (countitem("GreenPresentBox") < $@xmas_sh_green_amount)
goto L_NoItem;
getinventorylist;
- if (@inventorylist_count > 99)
+ set @SantasHelper_Reward$, $@SantasHelper_Annual_Reward$[ rand(getarraysize($@SantasHelper_Annual_Reward$)) ];
+ if ((@inventorylist_count > 99) || (checkweight(@SantasHelper_Reward$, 1) == 0))
goto L_TooMany;
mes "[Santa's Helper]";
mes "\"Great! Here is something for you\"";
- delitem "PurplePresentBox", @purple_amount;
- delitem "BluePresentBox", @blue_amount;
- delitem "GreenPresentBox", @green_amount;
- getitem "TurtleneckSweater", 1;
- set FLAGS, FLAGS | FLAG_SANTAS_HELPER;
+ delitem "PurplePresentBox", $@xmas_sh_purple_amount;
+ delitem "BluePresentBox", $@xmas_sh_blue_amount;
+ delitem "GreenPresentBox", $@xmas_sh_green_amount;
+ getitem @SantasHelper_Reward$, 1;
+ set @SantasHelper_Reward$, "";
+ set XMASTIME, XMASTIME | $@xmas_sh_bit;
+ set @karma_bonus, $@xmas_karma_bonus;
+ callfunc "XmasNice";
goto L_Close;
-L_R:
+L_Help:
mes "[Santa's Helper]";
mes "\"I need:";
- mes @purple_amount + " Purple Present Boxes";
- mes @blue_amount + " Blue Present Boxes";
- mes @green_amount + " Green Present Boxes\"";
+ mes $@xmas_sh_purple_amount + " Purple Present Boxes";
+ mes $@xmas_sh_blue_amount + " Blue Present Boxes";
+ mes $@xmas_sh_green_amount + " Green Present Boxes\"";
next;
- goto L_M;
+ goto L_Menu;
-L_N:
+L_No:
mes "[Santa's Helper]";
mes "\"Enjoy your holidays and I wish you a happy Christmas!\"";
goto L_Close;
@@ -89,8 +92,5 @@ L_TooMany:
goto L_Close;
L_Close:
- set @purple_amount, 0;
- set @blue_amount, 0;
- set @green_amount, 0;
close;
}
diff --git a/world/map/npc/019-3/_mobs.txt b/world/map/npc/019-3/_mobs.txt
index ea68f656..eca884fd 100644
--- a/world/map/npc/019-3/_mobs.txt
+++ b/world/map/npc/019-3/_mobs.txt
@@ -1,8 +1,8 @@
// This file is generated automatically. All manually changes will be removed when running the Converter.
// Snow Cave mobs
-019-3.gat,0,4,0,0|monster|Moggun|1061,10,100000,30000,Mob019-3::On1061
-019-3.gat,0,4,0,0|monster|Bat|1017,50,100000,30000,Mob019-3::On1017
+019-3.gat,0,0,0,0|monster|Moggun|1061,10,100000,30000,Mob019-3::On1061
+019-3.gat,0,0,0,0|monster|Bat|1017,50,100000,30000,Mob019-3::On1017
019-3.gat,0,0,0|script|Mob019-3|-1,
diff --git a/world/map/npc/019-3/_warps.txt b/world/map/npc/019-3/_warps.txt
index b5734a42..dd971457 100644
--- a/world/map/npc/019-3/_warps.txt
+++ b/world/map/npc/019-3/_warps.txt
@@ -1,6 +1,7 @@
// This file is generated automatically. All manually changes will be removed when running the Converter.
// Snow Cave warps
-019-3.gat,40,102|warp|To Snow Field|-1,-1,019-1.gat,37,74
-019-3.gat,98,29|warp|To Snow Field|-1,-1,019-1.gat,96,39
-019-3.gat,57,49|warp|To Deeper Snow Cave|0,-1,019-4.gat,70,25
+019-3.gat,40,98|warp|To Snow Field|-1,-1,019-1.gat,37,74
+019-3.gat,98,25|warp|To Snow Field|-1,-1,019-1.gat,96,39
+019-3.gat,57,45|warp|To Deeper Snow Cave|0,-1,019-4.gat,70,25
+019-3.gat,80,99|warp|To Frozen Lake|-1,-1,030-3.gat,54,70
diff --git a/world/map/npc/021-1/hideandseek.txt b/world/map/npc/021-1/hideandseek.txt
index fb789340..2514dd12 100644
--- a/world/map/npc/021-1/hideandseek.txt
+++ b/world/map/npc/021-1/hideandseek.txt
@@ -24,6 +24,9 @@ OnInit:
021-1.gat,87,66,0|script|Ayasha|258,
{
+ set $@child_number, 0;
+ callfunc "XmasList";
+
set @state, ((QUEST_NorthTulimshar & $@hideandseekNT_MASK) >> $@hideandseekNT_SHIFT);
set @EXP, 75;
@@ -84,6 +87,8 @@ L_Close:
021-1.gat,63,107,0|script|Latif|262,
{
+ set $@child_number, 1;
+ callfunc "XmasList";
set @state, ((QUEST_NorthTulimshar & $@hideandseekNT_MASK) >> $@hideandseekNT_SHIFT);
set @EXP, 15;
@@ -139,6 +144,8 @@ L_Close:
021-1.gat,123,116,0|script|Charda|260,
{
+ set $@child_number, 2;
+ callfunc "XmasList";
set @state, ((QUEST_NorthTulimshar & $@hideandseekNT_MASK) >> $@hideandseekNT_SHIFT);
set @EXP, 15;
@@ -191,6 +198,8 @@ L_Close:
021-1.gat,78,87,0|script|Faris|259,
{
+ set $@child_number, 3;
+ callfunc "XmasList";
set @state, ((QUEST_NorthTulimshar & $@hideandseekNT_MASK) >> $@hideandseekNT_SHIFT);
set @EXP, 25;
@@ -239,6 +248,8 @@ L_Close:
021-1.gat,98,25,0|script|Rasin|263,
{
+ set $@child_number, 4;
+ callfunc "XmasList";
set @state, ((QUEST_NorthTulimshar & $@hideandseekNT_MASK) >> $@hideandseekNT_SHIFT);
set @EXP, 15;
@@ -278,6 +289,8 @@ L_Close:
021-1.gat,155,25,0|script|Ghada|265,
{
+ set $@child_number, 5;
+ callfunc "XmasList";
set @state, ((QUEST_NorthTulimshar & $@hideandseekNT_MASK) >> $@hideandseekNT_SHIFT);
set @EXP, 15;
diff --git a/world/map/npc/025-1/rossy.txt b/world/map/npc/025-1/rossy.txt
index e6b5e8d4..234759d3 100644
--- a/world/map/npc/025-1/rossy.txt
+++ b/world/map/npc/025-1/rossy.txt
@@ -2,6 +2,9 @@
025-1.gat,80,88,0|script|Rossy|114,
{
+ set $@child_number, 6;
+ callfunc "XmasList";
+
set @Cherry_Amount, 10;
set @Cherry_EXP, 2000;
diff --git a/world/map/npc/030-1/_mobs.txt b/world/map/npc/030-1/_mobs.txt
index 62ab5d53..e253b738 100644
--- a/world/map/npc/030-1/_mobs.txt
+++ b/world/map/npc/030-1/_mobs.txt
@@ -1,25 +1,31 @@
// This file is generated automatically. All manually changes will be removed when running the Converter.
// Romantic Place mobs
-030-1.gat,0,0,0,0|monster|Squirrel|1038,10,100000,30000,Mob030-1::On1038
-030-1.gat,0,0,0,0|monster|Fluffy|1020,15,100000,30000,Mob030-1::On1020
+030-1.gat,0,0,0,0|monster|Pollett|1113,7,100000,30000,Mob030-1::On1113
030-1.gat,0,0,0,0|monster|WhiteBell|1095,4,100000,30000,Mob030-1::On1095
+030-1.gat,71,67,0,0|monster|Santaboo|1112,2,100000,30000,Mob030-1::On1112
+030-1.gat,71,67,0,0|monster|Reinboo|1094,2,100000,30000,Mob030-1::On1094
030-1.gat,0,0,0|script|Mob030-1|-1,
{
-On1020:
- set @mobID, 1020;
+On1094:
+ set @mobID, 1094;
callfunc "MobPoints";
end;
-On1038:
- set @mobID, 1038;
+On1095:
+ set @mobID, 1095;
callfunc "MobPoints";
end;
-On1095:
- set @mobID, 1095;
+On1112:
+ set @mobID, 1112;
+ callfunc "MobPoints";
+ end;
+
+On1113:
+ set @mobID, 1113;
callfunc "MobPoints";
end;
diff --git a/world/map/npc/030-1/_warps.txt b/world/map/npc/030-1/_warps.txt
index d5a7e8c7..896804d8 100644
--- a/world/map/npc/030-1/_warps.txt
+++ b/world/map/npc/030-1/_warps.txt
@@ -3,3 +3,4 @@
030-1.gat,61,27|warp|To Snow Field|2,-1,019-1.gat,61,101
030-1.gat,109,29|warp|To Snow Field|-1,-1,019-1.gat,109,103
+030-1.gat,99,53|warp|To Christmas Inn|-1,-1,030-2.gat,88,50
diff --git a/world/map/npc/030-2/_import.txt b/world/map/npc/030-2/_import.txt
index 9c5c854d..e2ca2bfa 100644
--- a/world/map/npc/030-2/_import.txt
+++ b/world/map/npc/030-2/_import.txt
@@ -3,3 +3,16 @@
map: 030-2.gat
npc: npc/030-2/_mobs.txt
npc: npc/030-2/_warps.txt
+npc: npc/030-2/avalia.txt
+npc: npc/030-2/basic_npcs.txt
+npc: npc/030-2/bedding_helper.txt
+npc: npc/030-2/chief_helper.txt
+npc: npc/030-2/eljas.txt
+npc: npc/030-2/empty_boxes_helper.txt
+npc: npc/030-2/gaurds.txt
+npc: npc/030-2/glitter_helper.txt
+npc: npc/030-2/present_helper.txt
+npc: npc/030-2/roasted_acrons_helper.txt
+npc: npc/030-2/shipping_helper.txt
+npc: npc/030-2/storage_helper.txt
+npc: npc/030-2/wrapping_paper_helper.txt
diff --git a/world/map/npc/030-2/_warps.txt b/world/map/npc/030-2/_warps.txt
index edcb7e1b..98dd5ce0 100644
--- a/world/map/npc/030-2/_warps.txt
+++ b/world/map/npc/030-2/_warps.txt
@@ -15,3 +15,4 @@
030-2.gat,94,73|warp|To Third Floor|0,-1,030-2.gat,41,104
030-2.gat,102,73|warp|To Fifth Floor|0,-1,030-2.gat,127,104
030-2.gat,127,105|warp|To Fourth Floor|0,-1,030-2.gat,102,74
+030-2.gat,78,87|warp|To Private Room|-1,-1,030-2.gat,194,67
diff --git a/world/map/npc/030-2/avalia.txt b/world/map/npc/030-2/avalia.txt
new file mode 100644
index 00000000..1cb58e37
--- /dev/null
+++ b/world/map/npc/030-2/avalia.txt
@@ -0,0 +1,221 @@
+// Annual Xmas
+// Author: cinderweb, wushin
+
+030-2.gat,198,61,0|script|Avalia|356,
+{
+ callfunc "XmasStates";
+
+ if(($@xmas_time) && !(@xmas_side))
+ goto L_XmasMain;
+ goto L_OffSeason;
+
+L_OffSeason:
+ mes "[Avalia]";
+ mes "\"What are you doing in here? Get out!\"";
+ warp "030-2.gat",88,80;
+ close;
+
+L_XmasMain:
+ if(@xmas_reward_done_state) goto L_Thanks;
+ if(@xmas_reward1_done_state) goto L_Thanks;
+ if(@xmas_reward_start_state) goto L_Reward;
+ if(@xmas_reward2_done_state) goto L_Reward;
+ if(@xmas_boss_door_state) goto L_Quick;
+ if(@xmas_reagent_done_state) goto L_PowerReagents;
+ if(@xmas_reagent_start_state) goto L_PowerReagents;
+ if(@xmas_helper_done_state) goto L_HelperQuest;
+ if(@xmas_helper_start_state) goto L_HelperQuest;
+ if(@xmas_list_deliver) goto L_ListReturn;
+ goto L_OffSeason;
+
+L_ListReturn:
+ mes "[Avalia]";
+ mes "\"This had better be important, I have got enough to worry about.\"";
+ menu
+ "Sorry for interrupting, but I have been sent up here with the List", -;
+ mes "She stares blankly at you for a bit...";
+ next;
+ mes "\"YAHOO!!\"";
+ next;
+ mes "\"One problem down, only a few more to go.\"";
+ next;
+ mes "\"Since you have already been so helpful, I was wondering if you could continue to do so?\"";
+ mes "\"I do have the power to reward you handsomely.\"";
+ next;
+ mes "\"You see this nutcracker here beside me? He is different from the rest. He had a will of his own. It started shortly after we installed the new power core.\"";
+ next;
+ mes "\"At first, it was just magical research that had me keep him close to me. As time wore on, mine and his interactions became more intimate. I was hoping to get my research done before the Holidays.\"";
+ next;
+ mes "\"I wanted to show Santa and ask to if he knew how to help make it permanent, but Someone didn't approve. Took away our central spell power core. Now all the nutcrackers are back to being mindless automatons. Now the Christmas Sages must use magic to animate them.\"";
+ next;
+ mes "\"Please you must help me find a way to restore our power core before Christmas. I want to show Santa Millis, so he can give him life permanently for me.\"";
+ mes "\"First I need time to do some more reaserch. Which means I need to spend less time helping with the holidays. Can you check with the helpers and make sure everything is going smoothly.\"";
+ menu
+ "Sure.", L_Start;
+
+L_Start:
+ mes "\"Ok, go check in with Chief Warrick. You might have to persist a bit but he will let you help.\"";
+ mes "\"Once you have completed this task come back and talk to me. As he reports to me.\"";
+ set @xmas_state, $@xmas_helpers_start_state;
+ callfunc "XmasSetState";
+ goto L_Close;
+
+L_HelperQuest:
+ mes "[Avalia]";
+ mes "\"Welcome Back!\"";
+ mes "\"So how are the Holiday Preparations coming along?\"";
+ menu
+ "It's a mess but they got things handle.", L_Continue,
+ "I'd better get back to helping.", L_Close;
+
+L_Continue:
+ callfunc "XmasHelperPoints";
+ callfunc "XmasStates";
+ if(@xmas_helper_done_state)
+ goto L_ManaBattery;
+ goto L_NotHelpEnough;
+
+L_NotHelpEnough:
+ mes "\"Hrmm... I'm still getting bugged. You better go back there and see whats going on.\"";
+ goto L_Close;
+
+L_ManaBattery:
+ mes "\"Now that we are caught up on the holidays and I've finished my research, I know what is needed to make the spell permanent.\"";
+ next;
+ callfunc "ListReagents";
+ mes "\"When you have gathered the required materials please come back and see me.\"";
+ set @xmas_state, $@xmas_reagents_start;
+ callfunc "XmasSetState";
+ callfunc "XmasXpReward";
+ goto L_Close;
+
+L_IngredientList:
+ callfunc "ListReagents";
+ mes "\"When you have gathered the required materials please come back and see me.\"";
+ goto L_Close;
+
+L_PowerReagents:
+ mes "[Avalia]";
+ mes "\"Welcome Back!\"";
+ mes "\"Have you gotten the reagents?\"";
+ menu
+ "Yes.", L_CheckReagents,
+ "What were they again?", L_IngredientList,
+ "No.", L_NotEnough;
+
+L_CheckReagents:
+ callfunc "CheckReagents";
+ callfunc "XmasStates";
+ if(!(@xmas_reagent_done_state))
+ goto L_NotEnough;
+ callfunc "DeleteReagents";
+ mes "\"Huzzah!, you have all the required components!\"";
+ mes "\"Now I can create a ManaBattery to power the Nutcrackers from a central location.\"";
+ mes "\"Our sages will now be free to perform other tasks. Oh boy the holidays are going to get easy again!\"";
+ mes "\"Stand back, this spell could backfire.\"";
+ next;
+ mes "You watch as she puts equal amounts of emerald powder into each of the empty bottles.";
+ mes "She methodically crushes up the shock sweet and speads it amongst the empty bottles.";
+ mes "She posisitions the four bottles in a stand so all the openings are mostly facing each other.";
+ mes "She Begins to chant.";
+ next;
+ mes "[Avalia]";
+ mes "O";
+ next;
+ mes "wat";
+ next;
+ mes "goo";
+ next;
+ mes "siam";
+ next;
+ mes "The bottles begin to pulse with mana.";
+ mes "She continues to chant";
+ next;
+ mes "[Avalia]";
+ mes "Aye";
+ next;
+ mes "Am";
+ next;
+ mes "Knot";
+ next;
+ mes "Phunee";
+ next;
+ mes "Mana surges to life in the bottles making a peel of thunder.";
+ next;
+ mes "[Avalia]";
+ mes "\"Phew! That takes alot out of a person.\"";
+ mes "\"I'm in no condition to go anywhere.\"";
+ mes "\"Take the Mana Battery and install it in the warehouse.\"";
+ mes "\"It's found behind Chief Warrick\"";
+ set @xmas_state, $@xmas_boss_door_open_state;
+ callfunc "XmasSetState";
+ callfunc "XmasXpReward";
+ goto L_Close;
+
+L_NotEnough:
+ mes "\"I need all the reagents before Santa visits. Come back and see me when you have them.\"";
+ goto L_Close;
+
+L_Quick:
+ mes "[Avalia]";
+ mes "\"What are you still doing here?\"";
+ mes "\"Quickly, to the warehouse.\"";
+ goto L_Close;
+
+L_Reward:
+ mes "[Avalia]";
+ mes "\"Thanks for all the help.\"";
+ mes "\"Take this as a token of my gratitude.\"";
+ if @xmas_reward2_done_state
+ set @xmas_state, $@xmas_reward_done;
+ if @xmas_reward_start_state
+ set @xmas_state, $@xmas_reward1_done;
+ callfunc "XmasSetState";
+ callfunc "XmasMainXpBpReward";
+ goto L_Close;
+
+L_Thanks:
+ mes "[Avalia]";
+ mes "\"Please feel free to continue to help us while we prepare your reward.\"";
+ goto L_Close;
+
+L_ThankYou:
+ mes "\"We can't thank you enough for restoring the nutcrackers humanity.\"";
+ goto L_Close;
+
+L_Close:
+ close;
+}
+
+030-2.gat,190,64,0|script|Milis|330,
+{
+ callfunc "XmasStates";
+
+ if($@xmas_time)
+ goto L_XmasMain;
+ goto L_OffSeason;
+
+L_OffSeason:
+ mes "[Milis]";
+ mes "\"What are you doing in here, get out!\"";
+ warp "030-2.gat",88,80;
+ close;
+
+L_XmasMain:
+ if(@xmas_reward_start_state)
+ goto L_Reward;
+ goto L_NoResponse;
+
+L_Reward:
+ mes "[Milis]";
+ mes "\"Thanks for you help! I a REAL MAN, once again.\"";
+ goto L_Close;
+
+L_NoResponse:
+ mes "[Milis]";
+ mes "...";
+ goto L_Close;
+
+L_Close:
+ close;
+}
diff --git a/world/map/npc/030-2/basic_npcs.txt b/world/map/npc/030-2/basic_npcs.txt
new file mode 100644
index 00000000..f3a25f6b
--- /dev/null
+++ b/world/map/npc/030-2/basic_npcs.txt
@@ -0,0 +1,81 @@
+// Added for flavor
+// author: Jenalya, wushin, Chayenne
+
+// In the office
+
+030-2.gat,37,81,0|script|Oswal|328,
+{
+ mes "[Oswal]";
+ mes "\"Welcome. I hope you enjoy your visit in Santa's residence. You already saw the workshop where the Christmas presents are crafted, right?\"";
+ next;
+ mes "\"Well, here you are in the office. We're taking care of various administrative tasks. Some are related to Christmas, but we also need to keep the everyday business running.";
+ mes "Santa, as one of the most powerful Sages, has a lot of issues to pay attention to.\"";
+ close;
+}
+
+030-2.gat,37,85,0|script|Taito|328,
+{
+ mes "[Taito]";
+ mes "\"Hello. I'm sorry, but I'm very busy at the moment and want to concentrate. If you have any questions, ask one of the other helpers.\"";
+ close;
+}
+
+030-2.gat,31,77,0|script|Rikhard|329,
+{
+ mes "[Rikhard]";
+ mes "\"I'm really glad that this year's Christmas preparations are going well. You know, last year nearly everything went wrong, so we all had to work really hard on that, and the everyday issues had to be neglected.\"";
+ next;
+ mes "\"But there are very important topics we have to take care on as Santa's helpers. The Sages have an important role in the politics of Kaizei.\"";
+ next;
+ mes "\"As an example, currently I'm working on analyzing a trade regulation proposal from Tulimshar's Wizard Council. I can't get into the details about this, obviously. But, let me tell you, those Tulimshar people try to get everything under their control.\"";
+ next;
+ mes "\"It's part of our work to maintain Kaizei's independency. In my opinion the Sages should be much more reluctant about this anyway. But well, I'm only a mere helper, this isn't up to me. I can only do my best to deliver an analysis as accurate as possible.\"";
+ next;
+ mes "\"Which is why I should go back to work now.\"";
+ close;
+}
+
+030-2.gat,31,85,0|script|Akseli|329,
+{
+ mes "[Akseli]";
+ mes "\"Ah, a visitor! Do you enjoy your time in Santa's residence?\"";
+ menu
+ "Yes, it's really interesting.", L_Interesting,
+ "It's ok.", L_Rage,
+ "I'm confused, it's much bigger than from the outside.", -;
+ mes "[Akseli]";
+ mes "\"Ah, yes, that's a magic technique almost all of the Sages use. The house is located in a shifted dimension.\"";
+ goto L_Close;
+
+L_Interesting:
+ mes "[Akseli]";
+ mes "\"Good to hear that! Go look around, talk with the other guys and girls, we have an open house policy all year.\"";
+ goto L_Close;
+
+L_Rage:
+ mes "[Akseli]";
+ mes "\"tsss... you young people can't get no satisfaction eh?\"";
+ goto L_Close;
+
+L_Close:
+ close;
+}
+
+// In the workshop
+
+030-2.gat,78,34,0|script|Aaron|328,
+{
+ mes "[Aaron]";
+ mes "\"Welcome to Santa's famous Christmas workshop. Feel free to have a look around and talk to the craftsmen.\"";
+ next;
+ mes "\"You have to know, Santa is a great promoter for skilled craftsmen. He's always looking out for talented persons who can join our team and get an excellent apprenticeship here.\"";
+ close;
+}
+
+030-2.gat,154,33,0|script|Iivo|329,
+{
+ mes "You see a helper cutting some leather pieces. He looks very focused on his work. Then he notices you.";
+ mes "[Iivo]";
+ mes "\"Hu? Oh, hello. Feel free to watch.\"";
+ close;
+}
diff --git a/world/map/npc/030-2/bedding_helper.txt b/world/map/npc/030-2/bedding_helper.txt
new file mode 100644
index 00000000..62fa6b34
--- /dev/null
+++ b/world/map/npc/030-2/bedding_helper.txt
@@ -0,0 +1,102 @@
+// Annual Xmas
+// author: Jenalya, wushin, Chayenne
+// Osmo asks for some White Fur which is used for bedding some presents in the boxes
+// can be sabotaged by given Cloth instead
+
+030-2.gat,37,77,0|script|Osmo|328,
+{
+ callfunc "XmasStates";
+
+ if($@xmas_time)
+ goto L_XmasMain;
+ goto L_OffSeason;
+
+L_OffSeason:
+ mes "[Osmo]";
+ mes "\"It's nice to relax and not have to worry about Xmas.\"";
+ mes "\"All that rush to gather those furs kills me every year.\"";
+ goto L_Close;
+
+L_XmasMain:
+ if (XMASTIME & $@xmas_helper_bit_bed_ends) goto L_Done;
+ if (XMASTIME & $@xmas_helper_bit_bed_starts) goto L_Bedding;
+ if (@xmas_helper_bit) goto L_Helping;
+
+ mes "[Osmo]";
+ mes "\"What? Uh, excuse me, I have some work to do.\"";
+ goto L_Close;
+
+L_Helping:
+ mes "[Osmo]";
+ mes "\"You came in at just the right moment. I was informed that our bedding material for fragile presents is nearly depleted.";
+ mes "Could you bring me " + $@xmas_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 unprotected from any pushes.\"";
+ set XMASTIME, XMASTIME | $@xmas_helper_bit_bed_starts;
+ goto L_Close;
+
+L_Bedding:
+ mes "[Osmo]";
+ mes "\"Ah, you're back. Do you have the " + $@xmas_bedding_amount + " White Fur needed as bedding for fragile presents?\"";
+ if ((countitem("WhiteFur") >= $@xmas_bedding_amount) && (countitem("CottonCloth") >= $@xmas_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") >= $@xmas_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") >= $@xmas_bedding_amount)
+ menu
+ "Sure, here it is. (Give the Cotton Cloth.)",L_Cloth,
+ "No, I'm still working on that.",L_Close;
+ if ((countitem("WhiteFur") < $@xmas_bedding_amount) && (countitem("CottonCloth") < $@xmas_bedding_amount))
+ menu
+ "No.", L_Close;
+ goto L_Close;
+
+L_Fur:
+ if (countitem("WhiteFur") < $@xmas_bedding_amount)
+ goto L_NoItems;
+ delitem "WhiteFur", $@xmas_bedding_amount;
+ set XMASTIME, XMASTIME | $@xmas_helper_bit_bed_ends;
+ set @karma_bonus, $@xmas_karma_bonus;
+ callfunc "XmasNice";
+ callfunc "XmasXpReward";
+ mes "[Osmo]";
+ mes "\"Wonderful! Thanks for your effort.\"";
+ goto L_Close;
+
+L_Cloth:
+ if (countitem("CottonCloth") < $@xmas_bedding_amount)
+ goto L_NoItems;
+ delitem "CottonCloth", $@xmas_bedding_amount;
+ set XMASTIME, XMASTIME &~ $@xmas_helper_bit_bed_starts;
+ set XMASTIME, XMASTIME | $@xmas_helper_bit_bed_ends;
+ set @karma_bonus, $@xmas_karma_bonus;
+ callfunc "XmasNaughty";
+ callfunc "XmasXpReward";
+ 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 (!(@xmas_helper_bedding))
+ mes "\"The Fur you brought me isn't working very well.\"";
+ if (@xmas_helper_bedding)
+ mes "\"Thanks for helping out with the bedding material.\"";
+ goto L_Close;
+
+L_NoItems:
+ mes "[Osmo]";
+ mes "\"Where do you have it? Is this a joke?\"";
+ goto L_Close;
+
+L_Close:
+ close;
+}
diff --git a/world/map/npc/030-2/chief_helper.txt b/world/map/npc/030-2/chief_helper.txt
new file mode 100644
index 00000000..3cecfd6a
--- /dev/null
+++ b/world/map/npc/030-2/chief_helper.txt
@@ -0,0 +1,90 @@
+// Annual Xmas
+// author: Jenalya, wushin
+// Warrick is the Chief of Santa's helpers
+
+030-2.gat,127,42,0|script|Chief Warrick|329,
+{
+ callfunc "XmasStates";
+
+ if($@xmas_time)
+ goto L_XmasMain;
+ goto L_OffSeason;
+
+L_OffSeason:
+ mes "[Chief Warrick]";
+ mes "\"Things run a lot smoother in the offseason. Why don't you check back when it gets closer to the holiday?\"";
+ goto L_Close;
+
+L_XmasMain:
+ if (@xmas_helper_bit)
+ goto L_HelpStatus;
+ if (@xmas_helper_start_state)
+ goto L_Helping;
+ if (@xmas_list_deliver)
+ goto L_Avalia;
+ goto L_NoHelp;
+
+L_Helping:
+ mes "[Chief Warrick]";
+ 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
+ "Availa Sent me. She said you should have me help out.",-;
+ mes "Warrick sighs.";
+ next;
+ mes "[Chief Warrick]";
+ mes "\"Everything is going wrong, we're missing ingredients for the Christmas candy and material for the toys.";
+ mes "The lists got lost, we are running low on supplies, everything is in utter confusion.";
+ mes "And to make matters worse some of the presents 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.";
+ next;
+ 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 XMASTIME, XMASTIME | $@xmas_helper_bit;
+ goto L_Close;
+
+L_HelpStatus:
+ mes "[Chief Warrick]";
+ if (@xmas_karma)
+ mes "\"It seems we're catching up with the tasks to do, thanks to your help.\"";
+ if (!(@xmas_karma))
+ mes "\"I hope you're doing well.\"";
+ if (@xmas_all_helpers)
+ mes "\"The helpers are happy for the extra help.\"";
+ if (!(@xmas_all_helpers))
+ mes "\"My workers are so stressed.\"";
+ if (@xmas_all_lists)
+ mes "\"I think all the children will be happy this year.\"";
+ if (!(@xmas_all_lists))
+ mes "\"I wonder how this season will turn out.\"";
+ goto L_Close;
+
+L_Avalia:
+ mes "\"Wow, this can't be. The Missing Lists. You should go see Avalia right away. She can be found on the other side of the work shop. To the Room to the West of the Nutcracker.\"";
+ 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;
+}
diff --git a/world/map/npc/030-2/eljas.txt b/world/map/npc/030-2/eljas.txt
new file mode 100644
index 00000000..beaefaad
--- /dev/null
+++ b/world/map/npc/030-2/eljas.txt
@@ -0,0 +1,212 @@
+// Annual Xmas and Year round info
+// Author: Jenalya, wushin
+
+030-2.gat,87,41,0|script|Eljas|328,5,1,
+{
+ callfunc "XmasStates";
+ callfunc "ThrowOutTheBum";
+
+L_Start:
+ if($@xmas_time)
+ goto L_XmasMain;
+ goto L_OffSeason;
+
+L_XmasMain:
+ if (@xmas_state > $@xmas_list_deliver_state)
+ goto L_OffSeason;
+ if (@xmas_list_deliver)
+ goto L_SeeChief;
+ if (@xmas_list_complete)
+ goto L_HaveList1;
+ if (@xmas_list_both)
+ goto L_HaveList1;
+ if (@xmas_list_path1)
+ goto L_HaveList2;
+ if (@xmas_list_path2)
+ goto L_NeedList1;
+ goto L_NeedList2;
+
+L_Broken:
+ mes "If you somehow reached this label this means the quest is broken, your quest state is reset to zero, however you do not have to collect lists again.";
+ set @xmas_state, 0;
+ callfunc "XmasSetState";
+ goto L_Close;
+
+L_HaveList1:
+ mes "[Eljas]";
+ mes "\"Hello! Welcome to the Christmas Inn. We work all year around to make the magic happen.\"";
+ next;
+ mes "\"What brings you here?\"";
+ next;
+ mes "...";
+ menu
+ "What were the childrens names again?", L_ListNames,
+ "Look, I have Santa's List.", L_SantasList,
+ "I have Santa's List.(follow Orum and his evil deeds)", L_SantasFakeList,
+ "Christmas?", L_Christmas,
+ "I am interested in magical research.", L_Research,
+ "Nothing, I have to go.", L_Close;
+ goto L_Close;
+
+L_HaveList2:
+ mes "Mmmmh he probably won't notice what lists you will bring him (Did you ever notice that he does not move at all?)";
+ mes "Haven't you always wondered what happens if you simply cheat?";
+ mes "Well ... It's a story as ancient as mankind.";
+ mes "If you break the rules that are tied to an environment you live in, you are likely to be punished";
+ mes "by them. So be careful what you do next, you might regret it...";
+ next;
+ menu
+ "What were the childrens names again?", L_ListNames,
+ "Look, I have Santa's List.", L_SantasList,
+ "I have Santa's List. (replace every wish with \"Christmas would die\" )", L_SantasFakeList,
+ "Christmas?", L_Christmas,
+ "I am interested in magical research.", L_Research,
+ "Nothing, I have to go.", L_Close;
+ goto L_Close;
+
+L_NeedList1:
+ mes "[Eljas]";
+ mes "\"Hello! Welcome to the Christmas Inn. We work all year around to make the magic of the holidays happen.\"";
+ next;
+ mes "\"So what brings you here my dear?\"";
+ menu
+ "Mmh? Nothing, I have to go.", L_Close,
+ "I heard you need help with some Wish lists?", -;
+ mes "\"True...\"";
+ next;
+ mes "\"It appears we are missing some of the wish list from the children from all over the Mana World.\"";
+ mes "\"Let me check here...\"";
+ next;
+ mes "\"Ah ha, here we go.\"";
+ mes "\"The missing wish lists are:";
+ callfunc "XmasListList";
+ mes "\"If you can find these children, please bring their lists back to me.\"";
+ mes "\"Thank you for helping out!\"";
+ mes "He looks up from his notes and gives you a broad smile";
+
+ set @xmas_state, $@xmas_list_both_state;
+ callfunc "XmasSetState";
+ goto L_Close;
+
+
+L_NeedList2:
+ mes "[Eljas]";
+ mes "\"Hello! Welcome to the Christmas Inn. We work all year around to make the magic of the holidays happen.\"";
+ next;
+ mes "\"So what brings you here my dear?\"";
+ menu
+ "Do you need any help this year?", L_StartQuest,
+ "Mmh? Nothing, I have to go.", L_Close;
+
+L_OffSeason:
+ mes "[Eljas]";
+ mes "\"Hello! Welcome to the Christmas Inn. We work all year around to make the magic of the holidays happen.\"";
+ next;
+ mes "\"And what brings you here?\"";
+ menu
+ "Christmas.", L_Christmas,
+ "Magical research.", L_Research,
+ "Och, nothing. I have to go.", L_Close;
+
+L_StartQuest:
+ mes "\"Why yes! Of course we do!\"";
+ next;
+ mes "\"It appears we are missing some of the wish list from the children from all over the Mana World.\"";
+ mes "\"Let me check here...\"";
+ next;
+ mes "\"Ah ha, here we go.\"";
+ mes "\"The missing wish lists are:";
+ callfunc "XmasListList";
+ mes "\"If you can find these children, please bring their lists back to me.\"";
+ mes "\"Thank you for helping out!\"";
+ mes "He looks up from his notes and gives you a broad smile";
+ next;
+ set @xmas_state, $@xmas_list_path1_state;
+ callfunc "XmasSetState";
+ goto L_Close;
+
+L_ListNames:
+ mes "He checks a piece of paper on his desk...";
+ mes "\"Mmh... the missing lists are:";
+ callfunc "XmasListList";
+ mes "\"If you can find these children, please bring their lists back.\"";
+ goto L_Close;
+
+L_SantasList:
+ callfunc "XmasCheckList";
+ callfunc "XmasStates";
+ if(!(@xmas_list_complete))
+ goto L_NotComplete;
+ mes "\"Awesome! Now please take those lists to Chief Warrick on the next floor.\"";
+ set @karma_bonus, @xmas_list_count;
+ callfunc "XmasNice";
+ set @xmas_state, $@xmas_list_deliver_state;
+ callfunc "XmasSetState";
+ callfunc "XmasXpReward";
+ goto L_Close;
+
+L_SantasFakeList:
+ callfunc "XmasCheckList";
+ callfunc "XmasStates";
+ if(!(@xmas_list_complete))
+ goto L_NotComplete;
+ mes "\"Wait a second... whats that aura...\"";
+ mes "\"THESE ARE NOT THE REAL LISTS!\"";
+ mes "\"Guards! Toss this naughty one outside!\"";
+ next;
+ set @karma_bonus, @xmas_list_count;
+ callfunc "XmasNaughty";
+ callfunc "XmasSetSide";
+ callfunc "XmasThrowOut";
+ set @xmas_state, $@xmas_list_deliver_state;
+ callfunc "XmasSetState";
+ callfunc "XmasXpReward";
+ goto L_NotWelcome;
+
+L_NotComplete:
+ mes "\"Hrmm... Even I can tell that you did not bring all the lists we are missing.\"";
+ goto L_ListNames;
+
+L_SeeChief:
+ mes "\"Please take those lists to Chief Warrick on the next floor.\"";
+ goto L_Close;
+
+L_Christmas:
+ mes "\"All year round we work hard to make toys and repair our help for each years event.\"";
+ mes "\"Ask Chief Warrick on the next floor, He is the shop foreman, people are always looking to him to find extra help.\"";
+ next;
+ goto L_Close;
+
+L_Research:
+ mes "\"Well, the most astonishing discovery in our recent researches is a complex combination of Transmutation, Astral and Nature Magic to animate wooden figurines.\"";
+ mes "\"Did you notice the Guards around the house? Originally those were simple nutcrackers, carved out of wood by our talented carpenters.\"";
+ next;
+ mes "\"With the results of our magic researches, we were able to transform them into animated beings, acting rudimentary self-determined and capable to perform simple tasks.\"";
+ mes "\"At the moment we can keep them animated for an unlimited time, as long as the caster stays in range.\"";
+ next;
+ mes "\"If you want to learn more about the magic used speak with Avalia she is on the 4th floor in her private room.\"";
+ next;
+ goto L_Close;
+
+L_NotWelcome:
+ mes "... You hear a voice calling your name ... ";
+ mes "[Orum's Homunculus]";
+ mes "\"Come See me in the caves below.\"";
+ mes "\"go north till you reach the snoman. Then head into the cave to the east.\"";
+ warp "030-1",99,55;
+ close;
+
+L_Close:
+ mes"\"Goodbye\"";
+ close;
+
+L_End:
+ end;
+
+OnTouch:
+ callfunc "XmasStates";
+ callfunc "ThrowOutTheBum";
+ if((@xmas_list_gather) || !($@xmas_time))
+ goto L_End;
+ goto L_Start;
+}
diff --git a/world/map/npc/030-2/empty_boxes_helper.txt b/world/map/npc/030-2/empty_boxes_helper.txt
new file mode 100644
index 00000000..248fb9d1
--- /dev/null
+++ b/world/map/npc/030-2/empty_boxes_helper.txt
@@ -0,0 +1,68 @@
+// Annual Xmas
+// author: Jenalya, wushin
+// 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,
+{
+ callfunc "XmasStates";
+
+ if($@xmas_time)
+ goto L_XmasMain;
+ goto L_OffSeason;
+
+L_OffSeason:
+ mes "[Urmas]";
+ mes "\"It's nice to not need to find logs in such a hurry. I always seem to have problems every year.\"";
+ goto L_Close;
+
+L_XmasMain:
+ if (@xmas_helper_bit) goto L_Helping;
+
+ mes "[Urmas]";
+ 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 seasonal helpers. Ok, listen to me.";
+ mes "\"We have a shortage 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. I have only a few boxes left.";
+ mes "Bring me some wood, so I can make new boxes out of it.";
+ mes $@xmas_log_amount + " Raw Logs will do for one box.\"";
+ mes "";
+ if (countitem("RawLog") < $@xmas_log_amount)
+ mes "\"But I see you do not have enough with you anyway. Come back with some material please.\"";
+ if (countitem("RawLog") < $@xmas_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 * $@xmas_log_amount))
+ goto L_NoItems;
+ getinventorylist;
+ if (@inventorylist_count > 100)
+ goto L_FullInv;
+ delitem "RawLog", (@amount * $@xmas_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_FullInv:
+ mes "\"You need some space to put the empty boxes.\"";
+ goto L_Close;
+
+L_NoItems:
+ mes "[Urmas]";
+ mes "\"Eh? Are you kidding?\"";
+ goto L_Close;
+
+L_Close:
+ set @amount, 0;
+ close;
+}
diff --git a/world/map/npc/030-2/gaurds.txt b/world/map/npc/030-2/gaurds.txt
new file mode 100644
index 00000000..c0f30e76
--- /dev/null
+++ b/world/map/npc/030-2/gaurds.txt
@@ -0,0 +1,33 @@
+// Annual Xmas Bouncers
+
+030-2.gat,85,43,0|script|Valjas|330,
+{
+ callfunc "XmasStates";
+ callfunc "ThrowOutTheBum";
+ mes "[Valjas]";
+ mes "\"...\"";
+ close;
+}
+
+030-2.gat,89,43,0|script|Halas|330,
+{
+ callfunc "XmasStates";
+ callfunc "ThrowOutTheBum";
+ mes "[Halas]";
+ mes "\"...\"";
+ close;
+}
+
+030-2.gat,89,84,0|script|Kilis|330,5,2,
+{
+ callfunc "XmasStates";
+ callfunc "ThrowOutTheBum";
+ mes "[Kilis]";
+ mes "\"...\"";
+ close;
+
+OnTouch:
+ callfunc "XmasStates";
+ callfunc "ThrowOutTheBum";
+ end;
+}
diff --git a/world/map/npc/030-2/glitter_helper.txt b/world/map/npc/030-2/glitter_helper.txt
new file mode 100644
index 00000000..c4ee84bb
--- /dev/null
+++ b/world/map/npc/030-2/glitter_helper.txt
@@ -0,0 +1,99 @@
+// Annual Xmas
+// author: Jenalya, wushin
+// Veneri 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
+
+030-2.gat,31,81,0|script|Veneri|328,
+{
+ callfunc "XmasStates";
+
+ if($@xmas_time)
+ goto L_XmasMain;
+ goto L_OffSeason;
+
+L_OffSeason:
+ mes "[Veneri]";
+ mes "\"I should take this time off to go see the doctor in Hurnscald about whether or not I have glitter lung.\"";
+ goto L_Close;
+
+L_XmasMain:
+ if (XMASTIME & $@xmas_helper_bit_glitter_ends) goto L_Done;
+ if (XMASTIME & $@xmas_helper_bit_glitter_starts) goto L_Powder;
+ if (@xmas_helper_bit) goto L_Helping;
+
+ mes "[Veneri]";
+ mes "\"Mh? Excuse me, I'm very busy right now.\"";
+ goto L_Close;
+
+L_Helping:
+ mes "[Veneri]";
+ mes "\"Hello. We have some problems here. Something went wrong with the shipment of the ingredients for our decoration glitter.";
+ mes "Would you be so kind and get me " + $@xmas_red_amount + " Ruby Powders and " + $@xmas_yellow_amount + " Topaz Powders?\"";
+ next;
+ mes "[Veneri]";
+ mes "\"This material has proven to have the quality we need to make our christmas magic last until it can sparkle under every christmas tree. Sadly we made some bad experience in the past. Please make sure you only bring class A powders.\"";
+ set XMASTIME, XMASTIME | $@xmas_helper_bit_glitter_starts;
+ goto L_Close;
+
+L_Powder:
+ mes "[Veneri]";
+ mes "\"Welcome back. Do you have the " + $@xmas_red_amount + " Ruby Powders and " + $@xmas_yellow_amount + " Topaz Powders needed for the decoration glitter?\"";
+ if ((countitem("RubyPowder") >= $@xmas_red_amount) && (countitem("TopazPowder") >= $@xmas_yellow_amount) && (countitem("RedPowder") >= $@xmas_red_amount) && (countitem("YellowPowder") >= $@xmas_yellow_amount))
+ menu
+ "Yeah, here it is. (Give the gem powders.)",L_GemPowders,
+ "Sure, here you go. (Give the fake powders.)",L_FakePowders,
+ "No, I am still working on that.",L_Close;
+ if ((countitem("RubyPowder") >= $@xmas_red_amount) && (countitem("TopazPowder") >= $@xmas_yellow_amount))
+ menu
+ "Yeah, here it is. (Give the gem powders.)",L_GemPowders,
+ "No, I am still working on that.",L_Close;
+ if ((countitem("RedPowder") >= $@xmas_red_amount) && (countitem("YellowPowder") >= $@xmas_yellow_amount))
+ menu
+ "Sure, here it is. (Give the fake powders.)",L_FakePowders,
+ "No, I am still working on that.",L_Close;
+ goto L_Close;
+
+L_GemPowders:
+ if ((countitem("RubyPowder") < $@xmas_red_amount) || (countitem("TopazPowder") < $@xmas_yellow_amount))
+ goto L_NoItems;
+ delitem "RubyPowder", $@xmas_red_amount;
+ delitem "TopazPowder", $@xmas_yellow_amount;
+ set XMASTIME, XMASTIME | $@xmas_helper_bit_glitter_ends;
+ set @karma_bonus, $@xmas_karma_bonus;
+ callfunc "XmasNice";
+ callfunc "XmasXpReward";
+ mes "[Veneri]";
+ mes "\"Excellent! Thank you very much.\"";
+ goto L_Close;
+
+L_FakePowders:
+ if ((countitem("RedPowder") < $@xmas_red_amount) || (countitem("YellowPowder") < $@xmas_yellow_amount))
+ goto L_NoItems;
+ delitem "RedPowder", $@xmas_red_amount;
+ delitem "YellowPowder", $@xmas_yellow_amount;
+ set XMASTIME, XMASTIME | $@xmas_helper_bit_glitter_ends;
+ set XMASTIME, XMASTIME &~ $@xmas_helper_bit_glitter_starts;
+ set @karma_bonus, $@xmas_karma_bonus;
+ callfunc "XmasNaughty";
+ callfunc "XmasXpReward";
+ mes "It seems like he didn't notice that the powder you gave him is bogus.";
+ mes "[Veneri]";
+ mes "\"Excellent! Thank you very much.\"";
+ goto L_Close;
+
+L_Done:
+ mes "[Veneri]";
+ if (!(@xmas_helper_glitter))
+ mes "\"Even after your help, the powder still isn't working right. Maybe it got wet.\"";
+ if (@xmas_helper_glitter)
+ mes "\"Thanks for bringing the powders.\"";
+ goto L_Close;
+
+L_NoItems:
+ mes "[Veneri]";
+ mes "\"Eh? Are you kidding?\"";
+ goto L_Close;
+
+L_Close:
+ close;
+}
diff --git a/world/map/npc/030-2/present_helper.txt b/world/map/npc/030-2/present_helper.txt
new file mode 100644
index 00000000..9637b778
--- /dev/null
+++ b/world/map/npc/030-2/present_helper.txt
@@ -0,0 +1,87 @@
+// Annual Xmas
+// Author: wushin
+// Present Reclaimation
+
+030-2.gat,47,82,0|script|Jonanthan|328,
+{
+ callfunc "XmasStates";
+
+ if($@xmas_time)
+ goto L_XmasMain;
+ goto L_OffSeason;
+
+L_OffSeason:
+ mes "[Jonathan]";
+ mes "\"Hello! Welcome to the reclamation department.\"";
+ mes "\"Lucky all the presents stolen have been replaced. Save any you find. You never know what we will need to replace next year.\"";
+ goto L_Close;
+
+L_XmasMain:
+ mes "[Jonathan]";
+ mes "\"Hello! Welcome to the reclamation department.\"";
+
+ if(@xmas_helper_bit) goto L_Helping;
+
+ mes "\"We are incredibly busy right now, monsters have stolen some of our presents.\"";
+ mes "\"I must go inform Chief Warrick immediately.\"";
+ goto L_Close;
+
+L_Helping:
+ mes "\"Here we take back any presents stolen from us by those nasty creatures.\"";
+ next;
+
+L_Main:
+ mes "\"Did you find any presents you would like to return?\"";
+ next;
+ menu
+ "No, I just wanted to say hello.",-,
+ $@xmas_present_amount + " Purple present boxes.",L_Purple,
+ $@xmas_present_amount + " Blue present boxes.",L_Blue,
+ $@xmas_present_amount + " Green present boxes.",L_Green,
+ $@xmas_present_amount + " Yellow present boxes.",L_Yellow,
+ $@xmas_present_amount + " White present boxes.",L_White;
+ goto L_Close;
+
+L_Purple:
+ set @karma_bonus, $@xmas_karma_bonus;
+ set @present_name$, "PurplePresentBox";
+ goto L_RewardIncrease;
+
+L_Blue:
+ set @karma_bonus, $@xmas_karma_bonus;
+ set @present_name$, "BluePresentBox";
+ goto L_RewardIncrease;
+
+L_Green:
+ set @karma_bonus, $@xmas_karma_bonus;
+ set @present_name$, "GreenPresentBox";
+ goto L_RewardIncrease;
+
+L_Yellow:
+ set @karma_bonus, 2;
+ set @present_name$, "YellowPresentBox";
+ goto L_RewardIncrease;
+
+L_White:
+ set @karma_bonus, 2;
+ set @present_name$, "WhitePresentBox";
+ goto L_RewardIncrease;
+
+L_RewardIncrease:
+ if ($@xmas_present_amount > countitem(@present_name$))
+ goto L_NotEnough;
+ mes "\"Oh, thank you!\"";
+ delitem @present_name$, $@xmas_present_amount;
+ callfunc "XmasNice";
+ goto L_Close;
+
+L_NotEnough:
+ mes "\"I am sorry, but you don't have enough presents to return.\"";
+ goto L_Main;
+
+L_Close:
+ mes "\"See You later!\"";
+ set @present_name$, "";
+ close;
+}
+
diff --git a/world/map/npc/030-2/roasted_acrons_helper.txt b/world/map/npc/030-2/roasted_acrons_helper.txt
new file mode 100644
index 00000000..61975e2c
--- /dev/null
+++ b/world/map/npc/030-2/roasted_acrons_helper.txt
@@ -0,0 +1,82 @@
+// Annual Xmas
+// author: Jenalya, wushin
+
+030-2.gat,89,23,0|script|Verneri|334,
+{
+ callfunc "XmasStates";
+
+ if((@xmas_state >= $@xmas_helpers_start_state) && ($@xmas_time))
+ goto L_XmasMain;
+ goto L_OffSeason;
+
+L_OffSeason:
+ mes "[Verneri]";
+ mes "\"Nothing like the getting past the holiday rush to make you dread next season.\"";
+ goto L_Close;
+
+L_XmasMain:
+ mes "[Verneri]";
+ mes "\"Hm? I'm currently having a break. It's really nice here at the fireplace, isn't it?\"";
+ next;
+ mes "\"Ah, I remember when I was a child we used to roast acorns at the fireplace. We dunked them into Iron Potion and then put them over the fire for a while. That gave a tasty icing.\"";
+ menu
+ "Let's roast some.", -,
+ "Children's stuff...", L_Close;
+
+ mes "[Verneri]";
+ mes "\"Well, if you get some Acorns and Iron Potions, we can do that.\"";
+ mes "\"With one Iron Potion we can ice about " + $@xmas_acorn_amount + " Acorns.\"";
+ next;
+ mes "[Verneri]";
+ mes "\"Do you have everything we need? Shall we start?\"";
+ menu
+ "Sure!", L_Roast,
+ "I need to get the ingredients.", L_Close;
+
+L_Roast:
+ if (countitem("Acorn") < $@xmas_acorn_amount || countitem("IronPotion") < $@xmas_iron_potion_amount)
+ goto L_NoItems;
+
+ getinventorylist;
+ if (@inventorylist_count > 100)
+ goto L_FullInv;
+ delitem "IronPotion", $@xmas_iron_potion_amount;
+ delitem "Acorn", $@xmas_acorn_amount;
+
+ mes "Verneri takes the Iron Potion and the Acorns from you. He pours the potion into some bowl and adds the Acorns.";
+ mes "Then he puts the bowl over the fire, stirring it every now and then. After a while it starts to smell really tasty.";
+ next;
+ mes "[Verneri]";
+ mes "\"Here we are! Let me take one of them, ok?\"";
+ mes "He carefully takes one of the roasted acorns and eats it.";
+ next;
+
+ mes "[Verneri]";
+ mes "\"Ouch, hot. But tasty! Some of them might be burnt, I'll throw those away.\"";
+ set XMASTIME, XMASTIME | $@xmas_helper_bit_acorns;
+ set @karma_bonus, $@xmas_karma_bonus;
+ callfunc "XmasNice";
+ getitem "RoastedAcorn", rand($@xmas_acorn_amount);
+ menu
+ "Let's roast some more.", L_Roast,
+ "Thank you.", L_Close;
+
+L_RoastAcornAgain:
+ mes "[Verneri]";
+ mes "\"Hello again. Do you want to roast some more acorns? They're delicious, right? Maybe we should do this every year.\"";
+ menu
+ "Not now.", L_Close,
+ "Yes, I brought the ingredients.", L_Roast;
+
+L_FullInv:
+ mes "\"You need some space to put the roasted acorns.\"";
+ goto L_Close;
+
+L_NoItems:
+ mes "[Verneri]";
+ mes "\"You need to bring at least one Iron Potion and " + $@xmas_acorn_amount + " Acorns.\"";
+ goto L_Close;
+
+L_Close:
+ close;
+}
diff --git a/world/map/npc/030-2/shipping_helper.txt b/world/map/npc/030-2/shipping_helper.txt
new file mode 100644
index 00000000..573ed2fc
--- /dev/null
+++ b/world/map/npc/030-2/shipping_helper.txt
@@ -0,0 +1,119 @@
+// Annual Xmas
+// Author: Jenalya, wushin
+
+030-2.gat,30,88,0|script|Mo|328,
+{
+ set $@npc_name$, "Mo";
+ callfunc "helpersPacking";
+ close;
+}
+
+030-2.gat,33,88,0|script|Lorrie|329,
+{
+ set $@npc_name$, "Lorrie";
+ callfunc "helpersPacking";
+ close;
+}
+
+030-2.gat,37,88,0|script|Curlee|329,
+{
+ set $@npc_name$, "Curlee";
+ callfunc "helpersPacking";
+ close;
+}
+
+function|script|helpersPacking|,
+{
+ callfunc "XmasStates";
+
+ if($@xmas_time)
+ goto L_XmasMain;
+ goto L_OffSeason;
+
+L_OffSeason:
+ mes "[" + $@npc_name$ + "]";
+ mes "\"Boy it sure is grand to goof off all day with no presents to wrap.\"";
+ goto L_Close;
+
+L_XmasMain:
+ mes "[" + $@npc_name$ + "]";
+ mes "Hello, hello, hello!";
+
+ if(@xmas_helper_bit) goto L_Helping;
+
+ mes "\"Real busy now, gotta go or the boss will have my head. Back to work knuckleheads!\"";
+ goto L_Close;
+
+L_Helping:
+ mes "\"I am " + $@npc_name$ + ". We are in charge of getting all the presents together, but we messed up and now all our supplies are ruined. Can you help us out?\"";
+ mes "\"We need wrapping paper and empty boxes! We can provide the gifts!\"";
+ next;
+
+L_Main:
+ mes "\"Do you have any supplies we can use?\"";
+ next;
+ menu
+ "What? err... I just wanted to say hello.",-,
+ "Purple Wrapping Paper and an empty box.",L_Purple,
+ "Blue Wrapping Paper and an empty box.",L_Blue,
+ "Green Wrapping Paper and an empty box.",L_Green,
+ "Yellow Wrapping Paper and an empty box.",L_Yellow,
+ "White Wrapping Paper and an empty box.",L_White;
+ goto L_Close;
+
+L_Purple:
+ set @wrap$, "PurpleWrap";
+ set @present_name$, "PurplePresentBox";
+ goto L_Gift;
+
+L_Blue:
+ set @wrap$, "BlueWrap";
+ set @present_name$, "BluePresentBox";
+ goto L_Gift;
+
+L_Green:
+ set @wrap$, "GreenWrap";
+ set @present_name$, "GreenPresentBox";
+ goto L_Gift;
+
+L_Yellow:
+ set @wrap$, "YellowWrap";
+ set @present_name$, "YellowPresentBox";
+ goto L_Gift;
+
+L_White:
+ set @wrap$, "WhiteWrap";
+ set @present_name$, "WhitePresentBox";
+ goto L_Gift;
+
+L_Gift:
+ if ($@xmas_wrap_amount > countitem(@wrap$))
+ goto L_NotEnough;
+ if ($@xmas_empty_box_amount > countitem("OpenPresentBox"))
+ goto L_NotEnough;
+ getinventorylist;
+ if ((@inventorylist_count == 100) || (checkweight(@present_name$, $@xmas_wrap_reward) == 0))
+ goto L_FullInv;
+ delitem "OpenPresentBox", $@xmas_empty_box_amount;
+ delitem @wrap$, $@xmas_wrap_amount;
+ getitem @present_name$, $@xmas_ship_present_amount;
+ goto L_Give;
+
+L_Give:
+ mes "\"Ok, here is the present. Make sure to drop these off at the warehouse.\"";
+ goto L_Main;
+
+L_NotEnough:
+ mes "\"O wiseguy, huh? Why don't you come back when you got all the supplies you knucklehead.\"";
+ goto L_Main;
+
+L_FullInv:
+ mes "\"Where you going to put this? In your ear? Come back when you have more space in your inventory.\"";
+ goto L_Main;
+
+L_Close:
+ mes "\"Ok, back to work you two, we have to make up lost time for your antics.\"";
+ set @wrap$, "";
+ set @present_name$, "";
+ close;
+}
diff --git a/world/map/npc/030-2/storage_helper.txt b/world/map/npc/030-2/storage_helper.txt
new file mode 100644
index 00000000..37f7ee2d
--- /dev/null
+++ b/world/map/npc/030-2/storage_helper.txt
@@ -0,0 +1,104 @@
+// Annual Christmas
+// author: Jenalya, wushin
+
+030-2.gat,25,35,0|script|Vellamo|328,
+{
+ callfunc "XmasStates";
+
+ if($@xmas_time)
+ goto L_XmasMain;
+ goto L_OffSeason;
+
+L_OffSeason:
+ mes "[Vellamo]";
+ mes "\"Candy Stock is built back up. Though... the more we store the more they want...\"";
+ goto L_Close;
+
+L_XmasMain:
+ if (XMASTIME & $@xmas_helper_bit_storage) goto L_Candy;
+ if (@xmas_helper_bit) goto L_Helping;
+
+ mes "[Vellamo]";
+ mes "\"Sorry, too busy to chat right now. The chief has got me working overtime for the holidays.\"";
+ close;
+
+L_Helping:
+ mes "[Vellamo]";
+ mes "\"Oh, hello. Visitors usually don't come down here in the basement. Here we store several things, materials for the presents, the finished presents, supplies.\"";
+ menu
+ "Nice. I have to go.", L_Close,
+ "Do you need help with anything?", -;
+ mes "[Vellamo]";
+ mes "\"Oh? You want to help us? Actually, there is one thing you could do. Did you see those weird slimes out there on the snow fields? Argh, I hate those creatures, last year they invaded the entire basement...\"";
+ next;
+ mes "\"However, this year they tried again, but I was able to hold them off. They just managed to devour most of our candy supplies.\"";
+ next;
+ mes "\"So in case you find some of the Candies, feel free to bring them back. Ismo will give you some reward for them.\"";
+ set XMASTIME, XMASTIME | ($@xmas_helper_bit_storage);
+ goto L_Close;
+
+L_Candy:
+ mes "[Vellamo]";
+ mes "\"Ah, welcome back. When you have found some of the candy, please give it to Ismo.\"";
+ goto L_Close;
+
+L_Close:
+ close;
+}
+
+030-2.gat,33,29,0|script|Ismo|329,
+{
+ callfunc "XmasStates";
+
+ if(($@xmas_time) && (XMASTIME & $@xmas_helper_bit_storage))
+ goto L_Helping;
+ goto L_OffSeason;
+
+L_OffSeason:
+ mes "[Ismo]";
+ mes "\"Hello. I'm helping Vellamo. He's the storage administrator.\"";
+ goto L_Close;
+
+L_Helping:
+ mes "[Ismo]";
+ mes "\"Did you get back some candy from the slimes?\"";
+ next;
+ menu
+ "Give " + $@xmas_good_friendly_name$, L_GoodCandy,
+ "Give " + $@xmas_bad_friendly_name$ + "(What? how mean!).", L_BadCandy;
+
+L_BadCandy:
+ set @dq_level, $@xmas_bad_level;
+ set @dq_cost, $@xmas_bad_cost;
+ set @dq_count, $@xmas_bad_count;
+ set @dq_name$, $@xmas_bad_name$;
+ set @dq_friendly_name$, $@xmas_bad_friendly_name$;
+ set @dq_money, $@xmas_bad_money;
+ set @dq_exp, $@xmas_bad_exp;
+
+ callfunc "DailyQuest";
+ if (countitem(@dq_name$) < @dq_count)
+ goto L_Close;
+ set @karma_bonus, $@xmas_karma_bonus;
+ callfunc "XmasNaughty";
+ goto L_Close;
+
+L_GoodCandy:
+ set @dq_level, $@xmas_good_level;
+ set @dq_cost, $@xmas_good_cost;
+ set @dq_count, $@xmas_good_count;
+ set @dq_name$, $@xmas_good_name$;
+ set @dq_friendly_name$, $@xmas_good_friendly_name$;
+ set @dq_money, $@xmas_good_money;
+ set @dq_exp, $@xmas_good_exp;
+
+ callfunc "DailyQuest";
+ if (countitem(@dq_name$) < @dq_count)
+ goto L_Close;
+ set @karma_bonus, $@xmas_karma_bonus;
+ callfunc "XmasNice";
+ goto L_Close;
+
+L_Close:
+ close;
+}
diff --git a/world/map/npc/030-2/wrapping_paper_helper.txt b/world/map/npc/030-2/wrapping_paper_helper.txt
new file mode 100644
index 00000000..48e23f45
--- /dev/null
+++ b/world/map/npc/030-2/wrapping_paper_helper.txt
@@ -0,0 +1,142 @@
+// author: Jenalya, wushin
+// 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,
+{
+ callfunc "XmasStates";
+
+ if($@xmas_time)
+ goto L_XmasMain;
+ goto L_OffSeason;
+
+L_OffSeason:
+ mes "[Reino]";
+ mes "\"Hrmm... I forgot what the real color of my hand was... \"";
+ goto L_Close;
+
+L_XmasMain:
+ if (@xmas_helper_bit) goto L_Helping;
+
+ mes "[Reino]";
+ mes "\"Excuse me, 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 a 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 if the presents didn'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 " + $@xmas_reed_amount + " Reed Bundles, " + $@xmas_water_amount + " Bottle of Water and some dye to make it colored.\"";
+ next;
+L_Again:
+ mes "\"Let's see... These are the regulations for wrapping paper colors and designs for this year. Tell me which you want.\"";
+ mes "He shows you an official looking piece of paper.";
+ menu
+ "White dotted (" + $@xmas_poa_amount +" Piles of Ash)", L_White,
+ "Yellow dotted (" + $@xmas_wrap_yellow_amount + " Yellow Dyes)", L_Yellow,
+ "Blue dotted (" + $@xmas_wrap_ltblue_amount + " Light Blue Dyes)", L_Blue,
+ "Purple striped (" + $@xmas_wrap_purple_amount + " Purple Dye)", L_Purple,
+ "Green (" + $@xmas_wrap_green_amount + " Green Dye)", L_Green,
+ "Why do you have a regulation for wrapping papers?!", L_Regulation,
+ "I'm on my way.",L_Close;
+
+L_White:
+getinventorylist;
+ if (@inventorylist_count == 100 || (checkweight("WhiteWrap", $@xmas_wrap_reward) == 0))
+ goto L_FullInv;
+ if ((countitem("ReedBundle") < $@xmas_reed_amount) || (countitem("BottleOfWater") < $@xmas_water_amount) || (countitem("PileOfAsh") < $@xmas_poa_amount))
+ goto L_NoItems;
+ delitem "ReedBundle", $@xmas_reed_amount;
+ delitem "BottleOfWater", $@xmas_water_amount;
+ delitem "PileOfAsh", $@xmas_poa_amount;
+ getitem "WhiteWrap", $@xmas_wrap_reward;
+ mes "[Reino]";
+ mes "\"This one is classical.\"";
+ goto L_MadePaper;
+
+L_Yellow:
+ getinventorylist;
+ if (@inventorylist_count == 100 || (checkweight("YellowWrap", $@xmas_wrap_reward) == 0))
+ goto L_FullInv;
+ if ((countitem("ReedBundle") < $@xmas_reed_amount) || (countitem("BottleOfWater") < $@xmas_water_amount) || (countitem("YellowDye") < $@xmas_wrap_yellow_amount))
+ goto L_NoItems;
+ delitem "ReedBundle", $@xmas_reed_amount;
+ delitem "BottleOfWater", $@xmas_water_amount;
+ delitem "YellowDye", $@xmas_wrap_yellow_amount;
+ getitem "YellowWrap", $@xmas_wrap_reward;
+ mes "[Reino]";
+ mes "\"Right, bright paper brings good vibes.\"";
+ goto L_MadePaper;
+
+L_Blue:
+ getinventorylist;
+ if (@inventorylist_count == 100 || (checkweight("BlueWrap", $@xmas_wrap_reward) == 0))
+ goto L_FullInv;
+ if ((countitem("ReedBundle") < $@xmas_reed_amount) || (countitem("BottleOfWater") < $@xmas_water_amount) || (countitem("LightBlueDye") < $@xmas_wrap_ltblue_amount))
+ goto L_NoItems;
+ delitem "ReedBundle", $@xmas_reed_amount;
+ delitem "BottleOfWater", $@xmas_water_amount;
+ delitem "LightBlueDye", $@xmas_wrap_ltblue_amount;
+ getitem "BlueWrap", $@xmas_wrap_reward;
+ mes "[Reino]";
+ mes "\"Plain and simple. Here.\"";
+ goto L_MadePaper;
+
+L_Purple:
+ getinventorylist;
+ if (@inventorylist_count == 100 || (checkweight("PurpleWrap", $@xmas_wrap_reward) == 0))
+ goto L_FullInv;
+ if ((countitem("ReedBundle") < $@xmas_reed_amount) || (countitem("BottleOfWater") < $@xmas_water_amount) || (countitem("PurpleDye") < $@xmas_wrap_purple_amount))
+ goto L_NoItems;
+ delitem "ReedBundle", $@xmas_reed_amount;
+ delitem "BottleOfWater", $@xmas_water_amount;
+ delitem "PurpleDye", $@xmas_wrap_purple_amount;
+ getitem "PurpleWrap", $@xmas_wrap_reward;
+ mes "[Reino]";
+ mes "\"Mh, personally I don't like it that much, but here you go.\"";
+ goto L_MadePaper;
+
+L_Green:
+ getinventorylist;
+ if (@inventorylist_count == 100 || (checkweight("GreenWrap", $@xmas_wrap_reward) == 0))
+ goto L_FullInv;
+ if ((countitem("ReedBundle") < $@xmas_reed_amount) || (countitem("BottleOfWater") < $@xmas_water_amount) || (countitem("GreenDye") < $@xmas_wrap_green_amount))
+ goto L_NoItems;
+ delitem "ReedBundle", $@xmas_reed_amount;
+ delitem "BottleOfWater", $@xmas_water_amount;
+ delitem "GreenDye", $@xmas_wrap_green_amount;
+ getitem "GreenWrap", $@xmas_wrap_reward;
+ 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_FullInv:
+ mes "\"You need some space to put the wrapping paper.\"";
+ goto L_Close;
+
+L_NoItems:
+ mes "[Reino]";
+ mes "\"Oh? It seems you don't have the required items.\"";
+ goto L_Close;
+
+L_Close:
+ close;
+}
diff --git a/world/map/npc/030-3/_import.txt b/world/map/npc/030-3/_import.txt
new file mode 100644
index 00000000..2903d1e5
--- /dev/null
+++ b/world/map/npc/030-3/_import.txt
@@ -0,0 +1,6 @@
+// Map 030-3: The Frozen Lake
+// This file is generated automatically. All manually changes will be removed when running the Converter.
+map: 030-3.gat
+npc: npc/030-3/_mobs.txt
+npc: npc/030-3/_warps.txt
+npc: npc/030-3/orum_homunculus.txt
diff --git a/world/map/npc/030-3/_mobs.txt b/world/map/npc/030-3/_mobs.txt
new file mode 100644
index 00000000..813981c6
--- /dev/null
+++ b/world/map/npc/030-3/_mobs.txt
@@ -0,0 +1,9 @@
+// This file is generated automatically. All manually changes will be removed when running the Converter.
+// The Frozen Lake mobs
+
+
+
+030-3.gat,0,0,0|script|Mob030-3|-1,
+{
+ end;
+}
diff --git a/world/map/npc/030-3/_warps.txt b/world/map/npc/030-3/_warps.txt
new file mode 100644
index 00000000..4f72e87d
--- /dev/null
+++ b/world/map/npc/030-3/_warps.txt
@@ -0,0 +1,4 @@
+// This file is generated automatically. All manually changes will be removed when running the Converter.
+// The Frozen Lake warps
+
+030-3.gat,54,69|warp|To Snow Cave|-1,-1,019-3.gat,80,97
diff --git a/world/map/npc/030-3/orum_homunculus.txt b/world/map/npc/030-3/orum_homunculus.txt
new file mode 100644
index 00000000..7ca921e8
--- /dev/null
+++ b/world/map/npc/030-3/orum_homunculus.txt
@@ -0,0 +1,468 @@
+// Annual Xmas
+// Author: Wushin
+
+019-3.gat,79,26,0|script|#OrumTelepathy1|45,3,3,
+{
+ callfunc "XmasStates";
+
+ if($@xmas_time)
+ goto L_XmasMain;
+ goto L_End;
+
+L_XmasMain:
+ if((@xmas_state == $@xmas_list_deliver_state) && !(@xmas_knows_route))
+ goto L_Telepathy;
+ goto L_End;
+
+L_Telepathy:
+ mes "[Orum's Homunculus]";
+ mes "\"Not that way!\"";
+ mes "\"Use the southernmost exit.\"";
+ close;
+
+L_End:
+ end;
+}
+
+019-3.gat,104,63,0|script|#OrumTelepathy2|45,1,1,
+{
+ callfunc "XmasStates";
+
+ if($@xmas_time)
+ goto L_XmasMain;
+ goto L_End;
+
+L_XmasMain:
+ if((@xmas_state == $@xmas_list_deliver_state) && !(@xmas_knows_route))
+ goto L_Telepathy;
+ goto L_End;
+
+L_Telepathy:
+ mes "[Orum's Homunculus]";
+ mes "\"That is the long way!\"";
+ mes "\"Just go south from here to the southernmost exit.\"";
+ close;
+
+L_End:
+ end;
+}
+
+019-3.gat,102,91,0|script|#OrumTelepathy3|45,3,3,
+{
+ callfunc "XmasStates";
+
+ if($@xmas_time)
+ goto L_XmasMain;
+ goto L_End;
+
+L_XmasMain:
+ if((@xmas_state == $@xmas_list_deliver_state) && !(@xmas_knows_route))
+ goto L_Telepathy;
+ goto L_End;
+
+L_Telepathy:
+ mes "[Orum's Homunculus]";
+ mes "\"Ok. You are getting closer, I can feel it!\"";
+ mes "\"You are heading in the right direction - to the southern most exit.\"";
+ close;
+
+L_End:
+ end;
+}
+
+019-3.gat,81,57,0|script|#OrumTelepathy4|45,3,3,
+{
+ callfunc "XmasStates";
+
+ if($@xmas_time)
+ goto L_XmasMain;
+ goto L_End;
+
+L_XmasMain:
+ if((@xmas_state == $@xmas_list_deliver_state) && !(@xmas_knows_route))
+ goto L_Telepathy;
+ goto L_End;
+
+L_Telepathy:
+ mes "[Orum's Homunculus]";
+ mes "\"Ok, you are getting closer, I can feel it.!\"";
+ mes "\"Go take the south west path towards the brazier.\"";
+ close;
+
+L_End:
+ end;
+}
+
+030-3.gat,62,74,0|script|#OrumTelepathy5|45,1,1,
+{
+ callfunc "XmasStates";
+
+ if($@xmas_time)
+ goto L_XmasMain;
+ goto L_End;
+
+L_XmasMain:
+ if((@xmas_state == $@xmas_list_deliver_state) && !(@xmas_knows_route))
+ goto L_Telepathy;
+ goto L_End;
+
+L_Telepathy:
+ mes "[Orum's Homunculus]";
+ mes "\"Wrong way!\"";
+ mes "\"I'm in the northwestern corner.\"";
+ close;
+
+L_End:
+ end;
+}
+
+030-3.gat,48,73,0|script|#OrumTelepathy6|45,1,1,
+{
+ callfunc "XmasStates";
+
+ if($@xmas_time)
+ goto L_XmasMain;
+ goto L_End;
+
+L_XmasMain:
+ if((@xmas_state == $@xmas_list_deliver_state) && !(@xmas_knows_route))
+ goto L_Telepathy;
+ goto L_End;
+
+L_Telepathy:
+ mes "[Orum's Homunculus]";
+ mes "\"Wrong Way!\"";
+ mes "\"I am in the northwestern corner.\"";
+ close;
+
+L_End:
+ end;
+}
+
+030-3.gat,55,52,0|script|#OrumTelepathy7|45,1,1,
+{
+ callfunc "XmasStates";
+
+ if($@xmas_time)
+ goto L_XmasMain;
+ goto L_End;
+
+L_XmasMain:
+ if((@xmas_state == $@xmas_list_deliver_state) && !(@xmas_knows_route))
+ goto L_Telepathy;
+ goto L_End;
+
+L_Telepathy:
+ mes "[Orum's Homunculus]";
+ mes "\"Wrong Way!\"";
+ mes "\"I am in the northwestern corner.\"";
+ close;
+
+L_End:
+ end;
+}
+
+030-3.gat,28,28,0|script|Orum's Homunculus|385,
+{
+ callfunc "XmasStates";
+
+ if($@xmas_time)
+ goto L_XmasMain;
+ goto L_OffSeason;
+
+L_OffSeason:
+ mes "Orums Homunculus looks up, inspects you briefly, and looks away again.";
+ end;
+
+L_XmasMain:
+ if !(@xmas_knows_route) goto L_SetPath;
+ if((@xmas_list_deliver) && !(@xmas_side)) goto L_OffSeason;
+ if((@xmas_reward_done_state) && (@xmas_side)) goto L_Thanks;
+ if((@xmas_reward1_done_state) && (@xmas_side)) goto L_Thanks;
+ if((@xmas_reward2_done_state) && (@xmas_side)) goto L_Reward;
+ if((@xmas_reward_start_state) && (@xmas_side)) goto L_Reward;
+ if((@xmas_boss_door_state) && (@xmas_side)) goto L_Quick;
+ if((@xmas_reagent_done_state) && (@xmas_side)) goto L_PowerReagents;
+ if((@xmas_reagent_start_state) && (@xmas_side)) goto L_PowerReagents;
+ if((@xmas_helper_done_state) && (@xmas_side)) goto L_HelperQuest;
+ if((@xmas_helper_start_state) && (@xmas_side)) goto L_HelperQuest;
+ if(@xmas_list_deliver) goto L_ListReturn;
+ if(@xmas_list_complete) goto L_SantasList;
+ if(@xmas_list_both) goto L_HaveList2;
+ if(@xmas_list_path1) goto L_QuestStart1;
+ if(@xmas_list_path2) goto L_HaveList2;
+ if($@xmas_time) goto L_QuestStart2;
+ goto L_OffSeason;
+
+L_SetPath:
+ set @xmas_knows_route, 1;
+ callfunc "XmasSetRoute";
+ goto L_XmasMain;
+
+L_QuestStart1:
+ mes "[Orum's Homunculus]";
+ mes "\"Greetings traveler, Do you have any time to help me out?\"";
+ menu
+ "No. I really have to go.", L_Close,
+ "Sure, I'm listening.", -;
+ mes "\"Good. You may have heard that some of the children's wish lists are missing.\"";
+ mes "\"I sent a courier out to get their lists, but they have yet to return.\"";
+ next;
+ mes "\"Let's see the following children's lists are still missing:\"";
+ callfunc "XmasListList";
+ mes "\"Would you please go and take a look what happened to them? If you can get hold of a list, report back. We surely know how to \"amend\" these things properly...\"";
+ set @xmas_state, $@xmas_list_both_state;
+ callfunc "XmasSetState";
+ goto L_Close;
+
+L_QuestStart2:
+ mes "[Orum's Homunculus]";
+ mes "\"Greetings traveler, Do you have any time to help me out?\"";
+ menu
+ "No. I really have to go.", L_Close,
+ "Sure, I'm listening.", -;
+ mes "\"Good. You may have heard that some of the children's wish lists are missing.\"";
+ mes "\"I sent a courier out to get their lists, but they have yet to return.\"";
+ next;
+ mes "\"Let's see the following children's lists are missing:\"";
+ callfunc "XmasListList";
+ mes "\"Would you please go and take a look what happened to them? If you get a list, report back.\"";
+ set @xmas_state, $@xmas_list_path2_state;
+ callfunc "XmasSetState";
+ goto L_Close;
+
+L_HaveList2:
+ mes "[Orum's Homunculus]";
+ mes "\"Have you got the missing lists?\"";
+ menu
+ "What were those names again?", L_ListNames,
+ "Yes.", L_SantasList,
+ "No.", L_Close;
+
+L_ListNames:
+ mes "\"The missing children's names are;\"";
+ callfunc "XmasListList";
+ mes "\"Go now, and come back when you have the lists.\"";
+ goto L_Close;
+
+L_NotComplete:
+ mes "\"This doesn't seem like enough names to work with. Come back when you have more.\"";
+ goto L_Close;
+
+L_SantasList:
+ callfunc "XmasCheckList";
+ callfunc "XmasStates";
+ if(!(@xmas_list_complete))
+ goto L_NotComplete;
+ mes "\"Take the altered list to Elijas.\"";
+ menu
+ "I don't know, this sounds kind of naughty.",-;
+ mes "\"Do my bidding or I'll have no more words with you.\"";
+ goto L_Close;
+
+L_ListReturn:
+ mes "[Orum's Homunculus]";
+ mes "\"This had better be important, I've got enough to worry about.\"";
+ menu
+ "Sorry for interrupting, but I've come down here because I delivered the fake list", -;
+ mes "he stares blankly at you for a bit... ";
+ next;
+ mes "\"MUHAHAHAHAHAHAA!!\"";
+ next;
+ mes "\"I see. Mighty naughty, I bet they tossed you out?\"";
+ mes "\"I was wondering if you would have any interest in continuing to do so?\"";
+ mes "\"I do have the power to reward you handsomely for your naughtiness.\"";
+ next;
+ mes "\"You see the Christmas Inn and it's insufferable happiness and joy they spread makes dark magic users sick.\"";
+ mes "\"Well this year I struck back. I managed to make it inside and snatch their mana battery that powers their precious nutcrackers. Then ruin their back stock with the nutcrackers powered down.\"";
+ next;
+ mes "\"The sages showed up and had me tossed out. It seems like they also created some kind of barrier to toss our kind, saying those of a truely evil heart, out.\"";
+ mes "\"They may have blocked my aura, but surely didn't crush my spirit. Mainly because those fools didn't discover the portal I created into the Inn's basement.\"";
+ next;
+ mes "\"Muhahahaha\"";
+ next;
+ mes "\"I have more plans for both later. First, we need to slow the Christmas Inn down.\"";
+ mes "\"We can't let them free time to fix their problems. We need to press our advantage.\"";
+ next;
+ mes "\"I will need you to gather some items for me. They are required to make the helpers job a living hell.\"";
+ next;
+ mes "\"Lets see... To replace the glitter I need you to get me " + ($@xmas_red_amount + $@xmas_yellow_amount) + " Piles of Ash, " + $@xmas_red_amount + " Red Dyes and " + $@xmas_yellow_amount + " Yellow Dyes\"";
+ mes "\"Bring them here and I can instruct you how to mix them into fake glitter, a powder that will make them believe they have what they need but really they don't. It will loose it's shine before it arrives. They are way to self absorbed to notice the difference. And even if they notice... It will be too late!\"";
+ next;
+ mes "He bursts into a devilish laughter...";
+ next;
+ mes "\"mmh... To replace the packing material we also need to get some Cotton Cloth.\"";
+ mes "He makes a strange frown and clenches his teeth. It seems like he is talking to himself, not to you.";
+ mes "\"Yes... That will rattle of few cages, when the presents rattle and the gifts break.\"";
+ next;
+ mes "\"You can also give them " + $@xmas_bad_friendly_name$ + " for their candy storage.\"";
+ mes "\"Be assured my minion that will take a good bite out of their holiday cheer.\"";
+ next;
+ mes "\"Excellent.\"";
+ mes "\"Now listen:\"";
+ next;
+ mes "\"So far my basement portal has remained undetected:";
+ mes "Head to the east in this cave to find it.\"";
+ mes "\"Once there smash your fist into the small crack and you will be teleported into the basement of the inn.\"";
+ mes "\"Let me fake the mark Chief Warrick uses to identify his helpers. Don't get to close to the gaurds they might spot you.\"";
+ mes "\"Now, prove yourself, gather the required items and go back to the Inn to sabotage Santa's Helpers.\"";
+ callfunc "XmasSetSide";
+ set XMASTIME, XMASTIME | $@xmas_helper_bit;
+ set XMASTIME, XMASTIME | $@xmas_basement_passage;
+ set @xmas_state, $@xmas_helpers_start_state;
+ callfunc "XmasSetState";
+ goto L_Close;
+
+L_HelperQuest:
+ mes "[Orum's Homunculus]";
+ mes "\"Welcome back!\"";
+ mes "\"How is the sabotage coming along?\"";
+ menu
+ "What is this all about again?", L_HelpHelpers,
+ "They keep throwing me out.", L_HelpPassage,
+ "I need some powders made.", L_MakePowders,
+ "It's a mess.", L_Continue,
+ "I'd better break some things.", L_Close;
+
+L_HelpHelpers:
+ mes "\"I will need you to gather some items for me. They are required to make the helpers job a living hell.\"";
+ next;
+ mes "\"Lets see... To replace the glitter I need you to get me " + ($@xmas_red_amount + $@xmas_yellow_amount) + " Piles of Ash, " + $@xmas_red_amount + " Red Dyes and " + $@xmas_yellow_amount + " Yellow Dyes\"";
+ mes "\"Bring them here and I can instruct you how to mix them into fake glitter, a powder that will make them believe they have what they need but really they don't. It will loose it's shine before it arrives. They are way to self absorbed to notice the difference. And even if they notice... It will be too late!\"";
+ next;
+ mes "He bursts into a devilish laughter...";
+ next;
+ mes "\"mmh... To replace the packing material we also need to get some Cotton Cloth.\"";
+ mes "He makes a strange frown and clenches his teeth. It seems like he is talking to himself, not to you.";
+ mes "\"Yes... That will rattle of few cages, when the presents rattle and the gifts break.\"";
+ next;
+ mes "\"You can also give them " + $@xmas_bad_friendly_name$ + " for their candy storage.\"";
+ mes "\"Be assured my minion that will take a good bite out of their holiday cheer.\"";
+ next;
+ goto L_HelperQuest;
+
+L_HelpPassage:
+ mes "\"As I told you, I installed a passage to the Inn's basement:";
+ mes "Head to the east in this cave to find it.\"";
+ mes "\"Once there, smash your fist into the small crack and you will be teleported into the basement of the inn.\"";
+ goto L_Close;
+
+L_MakePowders:
+ callfunc "BadPowderMake";
+ goto L_Close;
+
+L_Continue:
+ callfunc "XmasHelperPoints";
+ callfunc "XmasStates";
+ if(@xmas_helper_done_state)
+ goto L_ManaBattery;
+ goto L_NotHelpEnough;
+
+L_NotHelpEnough:
+ mes "\"Hrmm... I'm still seeing too much activity up there. You better wreck some more havoc otherwise they might restore the power before us.\"";
+ goto L_Close;
+
+L_ManaBattery:
+ mes "\"Now that we set back the holiday, It's time for the next step in my plan.\"";
+ next;
+ callfunc "ListReagents";
+ mes "\"When you have gathered the required materials please come back and see me.\"";
+ set @xmas_state, $@xmas_reagents_start;
+ callfunc "XmasSetState";
+ callfunc "XmasXpReward";
+ goto L_Close;
+
+L_IngredientList:
+ callfunc "ListReagents";
+ mes "\"When you have gathered the required materials please come back and see me.\"";
+ goto L_Close;
+
+L_PowerReagents:
+ mes "[Orum's Homunculus]";
+ mes "\"Have you gotten the reagents?\"";
+ menu
+ "Yes.", L_CheckReagents,
+ "What were they again?", L_IngredientList,
+ "No.", L_NotEnough;
+
+L_CheckReagents:
+ callfunc "CheckReagents";
+ callfunc "XmasStates";
+ if(!(@xmas_reagent_done_state))
+ goto L_NotEnough;
+ callfunc "DeleteReagents";
+ mes "\"YES! you have all the required components!\"";
+ mes "\"Now I can create a mind link to the mana battery and control the nutcrackers\"";
+ next;
+ mes "You watch as he puts equal amounts of emerald powder into each of the iron potions.";
+ mes "He methodically crushes up the dark crystal and speads it amongst the potions.";
+ mes "He positions the four potions in a stand so all the openings are mostly facing each other.";
+ mes "He begins to chant.";
+ next;
+ mes "[Orum's Homunculus]";
+ mes "O";
+ next;
+ mes "wat";
+ next;
+ mes "goo";
+ next;
+ mes "siam";
+ next;
+ mes "The potions begin to pulse with mana.";
+ mes "He continues to chant";
+ next;
+ mes "[Orum's Homunculus]";
+ mes "Aye";
+ next;
+ mes "Am";
+ next;
+ mes "Knot";
+ next;
+ mes "Phunee";
+ next;
+ mes "Mana surges to life in the potions";
+ next;
+ mes "\"Phew! That takes alot out of a person.\"";
+ mes "\"I'm in no condition to go anywhere.\"";
+ next;
+ mes "\"Take the Mana Battery and install it in the warehouse.\"";
+ mes "\"It's found behind Chief Warrick\"";
+ set @xmas_state, $@xmas_boss_door_open_state;
+ callfunc "XmasSetState";
+ callfunc "XmasXpReward";
+ goto L_Close;
+
+L_Quick:
+ mes "[Orum's Homunculus]";
+ mes "\"What are you still doing here?\"";
+ mes "\"Quickly, to the warehouse.\"";
+ goto L_Close;
+
+L_Reward:
+ mes "[Orum's Homunculus]";
+ mes "\"Revenge is a dish best served cold..\"";
+ if @xmas_reward2_done_state
+ set @xmas_state, $@xmas_reward_done;
+ if @xmas_reward_start_state
+ set @xmas_state, $@xmas_reward1_done;
+
+ callfunc "XmasSetState";
+ callfunc "XmasMainXpBpReward";
+ goto L_Close;
+
+L_Thanks:
+ mes "[Orum's Homunculus]";
+ mes "\"Please feel free to continue to sabotage whats left of the Inn while I prepare your reward.\"";
+ goto L_Close;
+
+L_NotEnough:
+ mes "\"Come back with the components or don't come back at all.\"";
+ goto L_Close;
+
+L_ThankYou:
+ mes "\"Now I'm the one in power of the Inn. You did well my minion.\"";
+ goto L_Close;
+
+L_Close:
+ close;
+}
diff --git a/world/map/npc/030-4/_import.txt b/world/map/npc/030-4/_import.txt
new file mode 100644
index 00000000..e6f34a77
--- /dev/null
+++ b/world/map/npc/030-4/_import.txt
@@ -0,0 +1,7 @@
+// Map 030-4: Christmas Inn Warehouse
+// This file is generated automatically. All manually changes will be removed when running the Converter.
+map: 030-4.gat
+npc: npc/030-4/_mobs.txt
+npc: npc/030-4/_warps.txt
+npc: npc/030-4/mana_battery.txt
+npc: npc/030-4/mapflags.txt
diff --git a/world/map/npc/030-4/_mobs.txt b/world/map/npc/030-4/_mobs.txt
new file mode 100644
index 00000000..141e900b
--- /dev/null
+++ b/world/map/npc/030-4/_mobs.txt
@@ -0,0 +1,9 @@
+// This file is generated automatically. All manually changes will be removed when running the Converter.
+// Christmas Inn Warehouse mobs
+
+
+
+030-4.gat,0,0,0|script|Mob030-4|-1,
+{
+ end;
+}
diff --git a/world/map/npc/030-4/_warps.txt b/world/map/npc/030-4/_warps.txt
new file mode 100644
index 00000000..cc5721bb
--- /dev/null
+++ b/world/map/npc/030-4/_warps.txt
@@ -0,0 +1,3 @@
+// This file is generated automatically. All manually changes will be removed when running the Converter.
+// Christmas Inn Warehouse warps
+
diff --git a/world/map/npc/030-4/mana_battery.txt b/world/map/npc/030-4/mana_battery.txt
new file mode 100644
index 00000000..cc9576ad
--- /dev/null
+++ b/world/map/npc/030-4/mana_battery.txt
@@ -0,0 +1,384 @@
+// Annual Xmas Battle
+// Author: Jenalya, shamelessly adapted by Chayenne, wushin
+
+// Variables:
+// @xmas_battle_side: if set its "naughty path" if not set "nice path"
+// XmasBattleStatus:
+// 0 battle not started
+// 1 battle easy good
+// 2 battle hard good
+// 3 battle easy bad
+// 4 battle hard bad
+// basically its this:
+// Announcements depend on wether starter was naughty/nice path
+// mobs are not yet balanced, they also depend on battle mode
+// only nutcrackers need to be killed ( I hope )
+
+// player gets state set to finished for winning the battle once and mode bit set on easy/hard accordingly
+// every player *is* allowed to restart the quest ONCE himself if he hasnt started it himself yet
+
+//TODO Balance mobs for level 50/candor (with assistance, i dont care if a speed archer cant solo that thing)
+//TODO Add an icreasing particle effect to the chest, move it half a tile right
+// and make it one of those lab tables from the slime quests
+
+030-4.gat,32,21,0|script|AniManOMat|400,
+{
+ set $@XmasBattleStatusClone, 0;
+ callfunc "XmasStates";
+ set @xmas_battle_side, 0;
+ if (@xmas_side)
+ set @xmas_battle_side, 1;
+ if ($@XmasBattleStatus)
+ goto L_BattleInProgress;
+ if (@xmas_state < $@xmas_boss_door_open_state)
+ goto L_ThrowOut;
+ if ((@xmas_boss_start) && (@xmas_state > $@xmas_boss_door_open_state))
+ goto L_Helper;
+ if (@xmas_state == $@xmas_boss_door_open_state)
+ goto L_InitiateBattle;
+ goto L_InitiateBattle;
+
+L_InitiateBattle:
+ callfunc "XmasSetBossStart";
+ if(@xmas_battle_side)
+ goto L_BattleBad;
+ goto L_BattleGood;
+
+L_BattleBad:
+ mes "[Orum's Homunculus]";
+ mes "\"So this is where this whole shallow charade will end...\"";
+ mes "\"Good. Are you ready to get this over with?\"";
+ menu
+ "Huh? Sure, why not.", -,
+ "Wait a sec.", L_Close,
+ "Well... since you ask... I prefer to leave now, this is way to dangerous. I have responsibities.", L_Coward;
+ mes "[Orums Homunculus]";
+ mes "\"Okay now listen closely, at least for once.\"";
+ mes "\"Put the mana battery into that vessel in front of you.\"";
+ next;
+ menu
+ "Ok.", -,
+ "No way, I prefer to leave. Now!", L_Coward,
+ "Give me a second, I need to consider my options.", L_Close;
+ mes "You carefully install the Mana Battery as good as you can manage.";
+ mes "As you bend over, you notice a strong sulphur odour coming from the crate";
+ next;
+ mes "[Orum]";
+ mes "\"Ok. now this should be enough.\"";
+ mes "\"Get out of here, before the bomb explodes!.\"";
+ menu
+ "Agreed.", L_StartBad,
+ "You know what? If I pull this lever this should become HUGE! (Beware! that's dangerous)", L_StartBadHard;
+
+L_BattleGood:
+ mes "You stare into a box that even through your unexperienced eyes looks less than secure to harbour such a powerful device as the mana battery is.";
+ menu
+ "Ok, this should be where the battery belongs.", L_StartGood,
+ "No WAY! I am not going to put my life in danger", L_Close,
+ "Ok that does it, I am going to leave! I cannot be responsible for blowing up the entire mana world.", L_Coward,
+ "I studied magic and this looks all wrong. (Beware! that's dangerous)", L_StartGoodHard;
+ goto L_Close;
+
+L_StartGood:
+ if ($@XmasBattleStatus)
+ goto L_BattleInProgress;
+ set $@XmasBattleStatus, 1;
+ goto L_Start;
+ goto L_Close;
+
+L_StartGoodHard:
+ if ($@XmasBattleStatus)
+ goto L_BattleInProgress;
+ callsub S_CheckHardReq;
+ delitem $@xmas_boss_req$[ @xmas_battle_side ], $@xmas_boss_amount[ @xmas_battle_side ];
+ mes "You pour a handfull of " + $@xmas_boss_req$[@xmas_battle_side] + " over the Mana Battery.";
+ set $@XmasBattleStatus, 2;
+ goto L_Start;
+
+L_StartBad:
+ if ($@XmasBattleStatus)
+ goto L_BattleInProgress;
+ set $@XmasBattleStatus, 3;
+ goto L_Start;
+
+L_StartBadHard:
+ if ($@XmasBattleStatus)
+ goto L_BattleInProgress;
+ callsub S_CheckHardReq;
+ delitem $@xmas_boss_req$[ @xmas_battle_side ], $@xmas_boss_amount[ @xmas_battle_side ];
+ mes "You pour a handfull of " + $@xmas_boss_req$[@xmas_battle_side] + " over the Mana Battery.";
+ set $@XmasBattleStatus, 4;
+ goto L_Start;
+
+L_Start:
+ set $@XmasBattleStatusClone, $@XmasBattleStatus;
+ mes "You struggle a little with your task, since the mana battery doesn't seem to fit in as smooth as you expected it.";
+ next;
+ mes "W00t!";
+ next;
+ mes "Now it is glowing wildly";
+ next;
+ mes "it seems like this will not turn out as planned, Look this Guard of Honour is going crazy!";
+ next;
+ npctalk "The Guards are out of control!";
+ set $@XmasBossRound, 0;
+ set $@XmasBossPlayerCount, getmapusers("030-4.gat");
+ areamonster "030-4.gat", 20, 21, 40, 40, "", 1114, 1, "AniManOMat::OnGuardDeath";
+ initnpctimer;
+ goto L_Close;
+
+L_ThrowOut:
+ // if the player didnt get a bomb yet
+ mes "This looks dangerous. Come back when you are prepared";
+ warp "030-2",151,25;
+ next;
+ goto L_Close;
+
+L_Coward:
+ //Player chose to cancel
+ mes "What a pitty now you still have a bomb in your hands but...";
+ mes "As you wish.";
+ next;
+ warp "030-2",151,25;
+ goto L_Close;
+
+L_Helper:
+ //Player used up his own chance to start
+ mes "mmh the AniManOMat is empty again, maybe we should try with a different mana battery.";
+ menu
+ "No I prefer to leave now, get me out of here.", L_Quit,
+ "Wait let me check if i can fix this ...(Beware!)", L_Repeat,
+ "Why would I do that? Aaaah... Nevermind.", -;
+ goto L_Close;
+
+L_Repeat:
+ //Player wants to try again on hard mode again
+ callsub S_CheckHardReq;
+ delitem $@xmas_boss_req$[ @xmas_battle_side ], $@xmas_boss_amount[ @xmas_battle_side ];
+ set $@XmasBattleStatus, (2 * (@xmas_battle_side)) + 2;
+ goto L_Start;
+
+L_Quit:
+ warp "030-2",151,25;
+ goto L_Close;
+
+L_BattleInProgress:
+ mes "The mana battery looks like it is about to explode. You better take cover!";
+ goto L_Close;
+
+L_Close:
+ callsub S_ClearVariables;
+ close;
+
+ // per NPC logic
+OnTimer5000:
+ setnpctimer 0;
+ if ($@XmasBattleStatus) goto L_CaveLogic;
+
+L_Return_1:
+ set $@XmasBossPlayerCount, 0;
+ areatimer "030-4.gat", 0, 0, 60, 60, 10, "AniManOMat::OnTick";
+ end;
+
+L_CaveLogic:
+ if ($@XmasBossPlayerCount < 1)
+ goto L_AllDead;
+ set $@BombTimer, $@BombTimer + 5; // Advance 5 seconds
+ if (mobcount("030-4.gat", "AniManOMat::OnGuardDeath") <= 0)
+ goto L_NextWave;
+ if ($@BombTimer >= 120)
+ goto L_NextWave;
+ goto L_Return_1;
+
+L_NextWave:
+ set $@BombTimer, 0;
+ set $@XmasBossRound, $@XmasBossRound + 1;
+ if (($@XmasBossRound > 10) && (mobcount("030-4.gat", "AniManOMat::OnGuardDeath") < 0))
+ goto L_Finished;
+ // Break/LastChance(s)
+ if (($@XmasBossRound > 10) && ($@XmasBossRound <= 12))
+ goto L_Return_1;
+ //KillerWaves
+ if ($@XmasBossRound > 12)
+ areamonster "030-4.gat", 0, 0, 50, 50, "", 1114, $@XmasBossRound*2 + $@XmasBossPlayerCount*3, "AniManOMat::OnGuardDeath";
+ //Normal Waves 1 to 10
+ // Guard Amount doubles if on hard mode
+ set $@GuardAmount, 1 + (8 + ($@XmasBossRound) + (2 * $@XmasBossPlayerCount)) / 8;
+ set $@SkullAmount, 1 + ($@GuardAmount * $@GuardAmount) / 4;
+
+ if ($@GuardAmount > 15)
+ set $@GuardAmount, 15;
+
+ //Obliatory Guard Of Honour in the Southern Hallway
+ areamonster "030-4.gat", 30, 43, 39, 49, "", 1114, $@GuardAmount, "AniManOMat::OnGuardDeath";
+ //CopperSlimes, I love Copper Slimes anywhere anytime
+ areamonster "030-4.gat", 20, 21, 49, 49, "", 1098, rand(2,7), "AniManOMat::All1";
+ //IceSkulls for hard mode in room 3 and 4
+ if ($@XmasBattleStatus == 2 || $@XmasBattleStatus == 4)
+ areamonster "030-4.gat", 20, 32, 28, 39, "", 1085, $@SkullAmount / 2, "AniManOMat::OnGuardDeath";
+ if ($@XmasBattleStatus == 2 || $@XmasBattleStatus == 4)
+ areamonster "030-4.gat", 41, 32, 49, 39, "", 1085, $@SkullAmount / 2 + 1, "AniManOMat::OnGuardDeath";
+ //Angry Sea Slimes for Easy Mode in Nice Version in Room 3,4,5,6
+ if ($@XmasBattleStatus == 1)
+ areamonster "030-4.gat", 20, 32, 28, 49, "", 1109, $@SkullAmount, "AniManOMat::OnGuardDeath";
+ if ($@XmasBattleStatus == 1)
+ areamonster "030-4.gat", 41, 32, 49, 49, "", 1109, $@SkullAmount, "AniManOMat::OnGuardDeath";
+ //Candied Slimes for Nice Mode in Rooms 1 and 2
+ if ($@XmasBattleStatus == 1 || $@XmasBattleStatus == 2)
+ areamonster "030-4.gat", 20, 21, 28, 28, "", 1111, ($@XmasBossRound / 2) + 1, "AniManOMat::OnGuardDeath";
+ if ($@XmasBattleStatus == 1 || $@XmasBattleStatus == 2)
+ areamonster "030-4.gat", 41, 21, 49, 28, "", 1111, ($@XmasBossRound / 2) + 2, "AniManOMat::OnGuardDeath";
+ //Bluepars for Easy mode in Naughty Variant in Rooms 3,4,5,6
+ if ($@XmasBattleStatus == 3)
+ areamonster "030-4.gat", 20, 32, 28, 49, "", 1107, $@SkullAmount, "AniManOMat::OnGuardDeath";
+ if ($@XmasBattleStatus == 3)
+ areamonster "030-4.gat", 41, 32, 49, 49, "", 1107, $@SkullAmount, "AniManOMat::OnGuardDeath";
+ // Wicked Mushrooms for Naughty Mode in Rooms 1 and 2
+ if ($@XmasBattleStatus == 3 || $@XmasBattleStatus == 4)
+ areamonster "030-4.gat", 20, 21, 28, 28, "", 1106, $@XmasBossRound + ($@XmasBossRound / 2), "AniManOMat::OnGuardDeath";
+ if ($@XmasBattleStatus == 3 || $@XmasBattleStatus == 4)
+ areamonster "030-4.gat", 41, 21, 49, 28, "", 1106, $@XmasBossRound, "AniManOMat::OnGuardDeath";
+
+ set $@msgnumber, (2 * $@XmasBossRound) + (($@XmasBattleStatus - 1) >> 1);
+ set $@msg$, $@XmasBossMes$[ $@msgnumber ];
+ set $@msgnumber, 0;
+ if ($@XmasBossRound > 10) goto L_Return_1;
+ callsub S_Announce;
+ goto L_Return_1;
+
+OnTick:
+ if (isdead()) end;
+ set $@XmasBossPlayerCount, $@XmasBossPlayerCount + 1;
+ end;
+
+OnAll1:
+ end;
+
+OnGuardDeath:
+ end;
+
+L_AllDead:
+ set $@msg$, $@xmas_final_announce$[ ($@XmasBattleStatus - 1) / 2 ];
+ callsub S_Announce;
+ goto L_CleanUp;
+
+L_Finished:
+ set $@msg$, $@xmas_final_announce$[ (($@XmasBattleStatus - 1) / 2) + 2 ];
+ callsub S_Announce;
+ goto L_CleanUp;
+
+L_CleanUp:
+ areatimer "030-4.gat", 0, 0, 50, 50, 10, "AniManOMat::OnReward";
+ set $@XmasBattleStatus, 0;
+ set $@XmasBossPlayerCount, 0;
+ set $@XmasBossRound, 0;
+ set $@BombTimer, 0;
+ set $@GuardAmount, 0;
+ set $@SkullAmount, 0;
+ killmonster "030-4.gat", "AniManOMat::OnGuardDeath";
+ stopnpctimer;
+ setnpctimer 0;
+ end;
+
+OnReward:
+ if (isdead())
+ end;
+ if (($@XmasBattleStatusClone % 2) == 0)
+ set XMASTIME, XMASTIME | $@xmas_boss_hero_bit;
+ set @bonus, (BaseLevel/3);
+ set DailyQuestBonus, DailyQuestBonus + @bonus;
+ message strcharinfo(0), "You feel a temporary rush of power and zest for action. " + @bonus + " daily bonus gained.";
+ set @xmas_state, (XMASTIME & NIBBLE_0_MASK) >> NIBBLE_0_SHIFT;
+ if (@xmas_state != $@xmas_boss_door_open_state )
+ goto L_End;
+ set @xmas_state, $@xmas_reward_start;
+ callfunc "XmasSetState";
+ set @xmas_state, 0;
+ set @karma_bonus, $@xmas_boss_bonus;
+ message strcharinfo(0), "Wow, what happened here?.";
+ goto L_End;
+
+L_End:
+ if ((($@XmasBattleStatus - 1) / 2) == 0) goto L_EndNice;
+ goto L_EndNaughty;
+
+L_EndNaughty:
+ callfunc "XmasNaughty";
+ callsub S_ClearVariables;
+ end;
+
+L_EndNice:
+ callfunc "XmasNice";
+ callsub S_ClearVariables;
+ end;
+
+OnInit:
+ set $@XmasBattleStatus, 0;
+ setarray $@XmasBossMes$,
+ "", // unused
+ "", // unused
+ "Scrrreeeeeeeeeeeeeeeeeeeeeaaaaaaaaaaaaaaaaaaaaatch",
+ "Scrrreeeeeeeeeeeeeeeeeeeeeaaaaaaaaaaaaaaaaaaaaatch",
+ "Santa : HELP!",
+ "Orums Homunculus : I think they know what we are up to!",
+ "Avalia : Oh no! This is going to blow up",
+ "Orums Homunculus : The Door is locked you idiot, fight for your life.",
+ "Avalia : Guards of Honor I demand you: STOP!",
+ "Orums Homunculus : Okay, this is somewhat funny... why are they coming back?!?",
+ "Avalia : You brave fighters! Deactivate the nutcrackers! they are out of control!",
+ "Orums Homunculus : The good news is: if we make it this time we will never have to do that again!",
+ "Avalia : Oh boy we are so screwed.",
+ "Orums Homunculus : Report: I am an Idiot",
+ "Avalia : Quick, we need to kill the nutcrackers, before they ruin everything we've been working for.",
+ "Orums Homunculus : Strange they are getting more and not less.",
+ "Avalia : Oh no, they are too powerful. Fight my warriors, Fight for the spirit of Christmas.",
+ "Orums Homunculus : If I was smart enough to stop talking, it would have happened already..",
+ "Avalia : I cannot believe it, this is makeing them stronger. More and more of them are comeing.",
+ "Orums Homunculus : I think we are almost done, the bomb should explode any second.",
+ "Avalia : Those poor creatures. Just kill them all.",
+ "Orums Homunculus : A N Y S E C O N D.",
+ "Avalia : Oh well... just try again, I trust in you.",
+ "Orum's Homunculus : just lol.",
+ "Avalia : Wow! You saved christmas.",
+ "Orum's Homunculus : Yep, it's over... and strange enough you survived.";
+
+ setarray $@xmas_final_announce$,
+ "Avalia : Oh no, not only did you slay half my Guard of Honour, but also the issue was not fixed, try to install the battery again!",
+ "Orum's Homunculus : Boy are you lame. So what now? The battery is still not placed! Go try again!",
+ "Avalia : W00t you actually made it through. I think now that the manabattery lost some of its abundant power this seems to have given those nutcrackers that didn't go crazy a good boost of life energy. Thank you for your help all and come see me for a reward.",
+ "Orum's Homunculus : Good. They are dead. Now GET OUT OF THERE, this bomb is dangerous!";
+ end;
+
+S_Announce:
+ mapannounce "030-4.gat", $@msg$, 0;
+ mapannounce "030-3.gat", $@msg$, 0;
+ mapannounce "030-2.gat", $@msg$, 0;
+ mapannounce "030-1.gat", $@msg$, 0;
+ set $@msg$, "";
+ return;
+
+S_CheckHardReq:
+ if (BaseLevel < $@BossHardLevel)
+ goto L_NotHighEnough;
+ if (countitem($@xmas_boss_req$[ @xmas_battle_side ]) < $@xmas_boss_amount[ @xmas_battle_side ])
+ goto L_NotEnoughItems;
+ goto L_Return;
+
+L_NotEnoughItems:
+ mes "Nono, you need to bring " + $@xmas_boss_amount[ @xmas_battle_side ] + " " + $@xmas_boss_req$[ @xmas_battle_side ] + "s.";
+ goto L_Close;
+
+L_NotHighEnough:
+ mes "\"Err no sweetie, you don't. just do it the normal way.\"";
+ goto L_Close;
+
+L_Return:
+ return;
+
+S_ClearVariables:
+ set @xmas_battle_side, 0;
+ set @bonus, 0;
+ set @xmas_state, 0;
+ set @karma_bonus, 0;
+ return;
+}
diff --git a/world/map/npc/030-4/mapflags.txt b/world/map/npc/030-4/mapflags.txt
new file mode 100644
index 00000000..65954bfc
--- /dev/null
+++ b/world/map/npc/030-4/mapflags.txt
@@ -0,0 +1 @@
+030-4.gat|mapflag|nosave|030-2,151,25
diff --git a/world/map/npc/031-1/_mobs.txt b/world/map/npc/031-1/_mobs.txt
index 829254ec..2e60b09d 100644
--- a/world/map/npc/031-1/_mobs.txt
+++ b/world/map/npc/031-1/_mobs.txt
@@ -1,8 +1,8 @@
// This file is generated automatically. All manually changes will be removed when running the Converter.
// Nivalis Port mobs
-031-1.gat,0,0,0,0|monster|Squirrel|1038,10,100000,30000,Mob031-1::On1038
-031-1.gat,0,0,0,0|monster|Fluffy|1020,15,100000,30000,Mob031-1::On1020
+031-1.gat,0,0,0,0|monster|Fluffy|1020,10,100000,30000,Mob031-1::On1020
+031-1.gat,0,0,0,0|monster|Pollett|1113,7,100000,30000,Mob031-1::On1113
031-1.gat,76,26,10,5|monster|WhiteSlime|1093,7,100000,30000,Mob031-1::On1093
031-1.gat,0,0,0,0|monster|WhiteBell|1095,4,100000,30000,Mob031-1::On1095
@@ -14,11 +14,6 @@ On1020:
callfunc "MobPoints";
end;
-On1038:
- set @mobID, 1038;
- callfunc "MobPoints";
- end;
-
On1093:
set @mobID, 1093;
callfunc "MobPoints";
@@ -29,5 +24,10 @@ On1095:
callfunc "MobPoints";
end;
+On1113:
+ set @mobID, 1113;
+ callfunc "MobPoints";
+ end;
+
end;
}
diff --git a/world/map/npc/031-3/_mobs.txt b/world/map/npc/031-3/_mobs.txt
index 4fdd83b6..1966e225 100644
--- a/world/map/npc/031-3/_mobs.txt
+++ b/world/map/npc/031-3/_mobs.txt
@@ -28,7 +28,7 @@
031-3.gat,209,199,12,17|monster|Yeti|1072,2,100000,30000,Mob031-3::On1072
031-3.gat,193,216,12,17|monster|Yeti|1072,1,100000,30000,Mob031-3::On1072
031-3.gat,213,282,66,43|monster|Bat|1017,5,100000,30000,Mob031-3::On1017
-031-3.gat,213,282,66,43|monster|Bat|1017,5,100000,30000,Mob031-3::On1017
+031-3.gat,213,282,66,43|monster|Pollett|1113,5,100000,30000,Mob031-3::On1113
031-3.gat,199,200,45,14|monster|Bat|1017,13,100000,30000,Mob031-3::On1017
031-3.gat,209,199,12,17|monster|Yeti|1072,2,100000,30000,Mob031-3::On1072
031-3.gat,234,141,18,19|monster|Yeti|1072,2,100000,30000,Mob031-3::On1072
@@ -129,5 +129,10 @@ On1093:
callfunc "MobPoints";
end;
+On1113:
+ set @mobID, 1113;
+ callfunc "MobPoints";
+ end;
+
end;
}
diff --git a/world/map/npc/034-1/_mobs.txt b/world/map/npc/034-1/_mobs.txt
index f5b2d0ee..ac87b59f 100644
--- a/world/map/npc/034-1/_mobs.txt
+++ b/world/map/npc/034-1/_mobs.txt
@@ -1,10 +1,11 @@
// This file is generated automatically. All manually changes will be removed when running the Converter.
// Snow Forest mobs
-034-1.gat,0,0,0,0|monster|Reinboo|1094,40,100000,30000,Mob034-1::On1094
+034-1.gat,0,0,0,0|monster|Reinboo|1094,4,100000,30000,Mob034-1::On1094
034-1.gat,0,0,0,0|monster|Fluffy|1020,50,100000,30000,Mob034-1::On1020
034-1.gat,0,0,0,0|monster|WhiteBell|1095,5,100000,30000,Mob034-1::On1095
034-1.gat,0,0,0,0|monster|Squirrel|1038,50,100000,30000,Mob034-1::On1038
+034-1.gat,0,0,0,0|monster|Santaboo|1112,4,100000,30000,Mob034-1::On1112
034-1.gat,0,0,0|script|Mob034-1|-1,
@@ -29,5 +30,10 @@ On1095:
callfunc "MobPoints";
end;
+On1112:
+ set @mobID, 1112;
+ callfunc "MobPoints";
+ end;
+
end;
}
diff --git a/world/map/npc/_import.txt b/world/map/npc/_import.txt
index 9620fa64..136e81b6 100644
--- a/world/map/npc/_import.txt
+++ b/world/map/npc/_import.txt
@@ -78,6 +78,8 @@ import: npc/029-1/_import.txt
import: npc/029-3/_import.txt
import: npc/030-1/_import.txt
import: npc/030-2/_import.txt
+import: npc/030-3/_import.txt
+import: npc/030-4/_import.txt
import: npc/031-1/_import.txt
import: npc/031-2/_import.txt
import: npc/031-3/_import.txt
diff --git a/world/map/npc/annuals/fathertime.txt b/world/map/npc/annuals/fathertime.txt
new file mode 100644
index 00000000..54541d69
--- /dev/null
+++ b/world/map/npc/annuals/fathertime.txt
@@ -0,0 +1,19 @@
+// Annual Timer
+// One timer to check to enable all holiday events
+
+botcheck.gat,26,28,0|script|#HolidayConfig|-1,
+{
+OnInit:
+ goto L_StartTimer;
+
+L_StartTimer:
+ setnpctimer 0;
+ initnpctimer;
+ end;
+
+OnTimer20000:
+ setnpctimer 0;
+ cmdothernpc "#XmasConfig", "RestartQuest";
+ initnpctimer;
+ end;
+}
diff --git a/world/map/npc/annuals/xmas/barriers.txt b/world/map/npc/annuals/xmas/barriers.txt
new file mode 100644
index 00000000..7db8a472
--- /dev/null
+++ b/world/map/npc/annuals/xmas/barriers.txt
@@ -0,0 +1,161 @@
+// This file is part of Christmas Event
+// author: Jenalya, Chayenne, cinderweb, wushin
+// please see #XmasConfig
+
+function|script|ThrowOutTheBum|,
+{
+ if((@xmas_thrown_out) && ($@xmas_time))
+ goto L_SideOut;
+ goto L_Return;
+
+L_SideOut:
+ if(@xmas_helper_start_state)
+ goto L_Warp;
+ goto L_Hint;
+
+L_Hint:
+ message strcharinfo(0), "I said get out! We've got no time for your kind here.";
+ mes "[Orum's Homunculus]";
+ mes "\"What are you doing? Come, see me in the caves below!\"";
+ mes "\"I said go north till you reach the snoman. Then head into the cave to the east.\"";
+ warp "030-1",99,55;
+ close;
+
+L_Warp:
+ message strcharinfo(0), "I said get out, We've no time for your kind here.";
+ warp "030-1",99,55;
+ end;
+
+L_Return:
+ return;
+}
+
+// Annual Xmas Boss Fight Door
+030-2.gat,153,21,0|script|#DarkDoor|45,0,0,
+{
+ callfunc "XmasStates";
+
+ if((@xmas_boss_door_state) && ($@xmas_time))
+ goto L_XmasMain;
+ goto L_NotActive;
+
+L_XmasMain:
+ mes "You get the strange sensation that this might go terribly wrong. You had better bring some of your strongest comrades to help you in that case.";
+ mes "Open the warehouse door?";
+ menu
+ "Yes, I feel brave.", L_Open,
+ "No, It's quite nice out here.", L_Close;
+
+L_Open:
+ if ($@XmasBattleStatus) goto L_BattleInProgress;
+ warp "030-4.gat",34,48;
+ goto L_Close;
+
+L_BattleInProgress:
+ mes "You can hear shouts and screams of despair from behind the door. But trying to open it fails.";
+ next;
+ mes "You will have to wait till someone from the inside opens the door again.";
+ goto L_Close;
+
+L_NotActive:
+ message strcharinfo(0), "This door appears locked by magical forces.";
+ end;
+
+L_Close:
+ close;
+}
+
+// Annual Xmas secret passage to a trapdoor in Santa's Inn Basement
+
+030-3.gat,100,49,0|script|SmallCrack#XmasPassage|400,0,1,
+{
+ callfunc "XmasStates";
+
+ if((@xmas_basement_passage) && ($@xmas_time))
+ goto L_XmasMain;
+ goto L_NotActive;
+
+L_NotActive:
+ mes "You don't notice anything special.";
+ goto L_Close;
+
+L_XmasMain:
+ mes "You notice a small creak in the wall, what do you want to do?";
+ next;
+
+L_EnterDialogue:
+ menu
+ "Nothing.", L_Close,
+ "Bang my head against it repeatedly.", L_Tux9th,
+ "Oh, not very much, I do not see anynthing there.", L_Close,
+ "Hit it with my strong fist.", L_Enter;
+
+L_Tux9th:
+ itemheal -20, 0;
+ message strcharinfo(0), "Ouch, that hurt!";
+ setlook LOOK_HAIR_STYLE, rand(20);
+ goto L_Fail;
+
+L_Enter:
+ if (getequipid(equip_hand1) > 0 || getequipid(equip_hand2) > 0) goto L_Sword;
+ if (getequipid(equip_gloves) <= 0) goto L_Gloves;
+ goto L_QueryWarp;
+
+L_Sword:
+ mes "That is not your fist silly,";
+ mes "use your fist, alright?";
+ goto L_Close;
+
+L_Gloves:
+ mes "Wow! Next time you plan to hit a wall,";
+ mes "you had better equip some decent gloves in advance.";
+ itemheal -20, 0;
+ message strcharinfo(0), "Ouch, that hurt!";
+ goto L_QueryWarp;
+
+L_QueryWarp:
+ mes "You gaze into a black hole, do you want to enter?";
+ mes " ";
+ menu
+ "Yes", L_Warp,
+ "No", L_Close;
+ goto L_Close;
+
+L_Warp:
+ warp "030-2.gat",47,44;
+ goto L_Close;
+
+L_Fail:
+ mes "Seems like that won't work out as you planned.";
+ goto L_Close;
+
+L_Close:
+ close;
+}
+
+// Annual Xmas Escape Hatch
+030-2.gat,48,44,0|script|#BasementDoor|45,0,0,
+{
+ callfunc "XmasStates";
+
+ if((@xmas_basement_passage) && ($@xmas_time))
+ goto L_XmasMain;
+ goto L_NotActive;
+
+L_XmasMain:
+ mes "Descend into the caves?";
+ menu
+ "Yes.", L_Open,
+ "No.", L_Close;
+
+L_Open:
+ warp "030-3.gat",100,50;
+ goto L_Close;
+
+L_NotActive:
+ message strcharinfo(0), "This door appears locked by magical forces.";
+ end;
+
+L_Close:
+ close;
+}
diff --git a/world/map/npc/annuals/xmas/config.txt b/world/map/npc/annuals/xmas/config.txt
new file mode 100644
index 00000000..d723073f
--- /dev/null
+++ b/world/map/npc/annuals/xmas/config.txt
@@ -0,0 +1,301 @@
+// This file is part of Christmas Event
+// author: Jenalya, Chayenne, cinderweb, wushin
+
+// NPC behavior depending on time:
+// No Event Time: The event didn't start yet or already ended - the house is closed and the outside NPCs give generic dialogue
+// Event Time: Christmas preparation is in progress, main quest can be done
+// Reward Time: Christmas is over, if the main quest was finished, the reward can be taken
+// for now variable xmas used
+// Main quest states: XMASTIME
+// NIBBLE_0
+// 0-15: Main Quest States
+// Nibble_1: @xmas_karma, Event Behavior
+// 0-15: 0: Naughty, 15: Nice
+// List BITS:
+// 8: 021-1.gat,87,66,0|script|Ayasha|258
+// 9: 021-1.gat,63,107,0|script|Latif|262
+// 10: 021-1.gat,123,116,0|script|Charda|260
+// 11: 021-1.gat,78,87,0|script|Faris|259
+// 12: 021-1.gat,98,25,0|script|Rasin|263
+// 13: 021-1.gat,155,25,0|script|Ghada|265
+// 14: 025-1.gat,80,88,0|script|Rossy|114
+// 15: 001-2.gat,76,59,0|script|Kadiya|174
+// Helper Bits
+// 16: Bedding End
+// 17: Bedding Starts
+// 18: Glitter End
+// 19: Glitter Start
+// 20: Storage Helper
+// 21: Roasted Acorns
+// 22: Santa's Helper
+// 23: - free -
+// 24: Basement Passage
+// 25: Thrown Out
+// 26: Boss started Once by Player
+// 27: Boss won on hard mode
+// 28: Perfect Helpers
+// 29: Prefect List
+// 30: Helper Bit
+// 31: Side Choosen: Naughty vs. Nice
+
+-|script|#XmasConfig|-1,
+{
+OnCommandRestartQuest:
+ goto L_Main;
+
+OnInit:
+ goto L_Main;
+
+L_Main:
+ // Xmas Key Identifier Set through Botcheck Debug
+ if(!($XMAS_TIME_KEY) || (getarraysize($XMAS_TIME_KEY) != 6))
+ setarray $XMAS_TIME_KEY, 12,12,1,25,6,gettime(7);
+ if(($XMAS_TIME_KEY[0] == 0) || ($XMAS_TIME_KEY[0] > 12))
+ goto L_XmasError;
+ if(($XMAS_TIME_KEY[1] == 0) || ($XMAS_TIME_KEY[1] > 12))
+ goto L_XmasError;
+ if(($XMAS_TIME_KEY[2] == 0) || ($XMAS_TIME_KEY[2] > 12))
+ goto L_XmasError;
+ if(($XMAS_TIME_KEY[3] == 0) || ($XMAS_TIME_KEY[3] > 31))
+ goto L_XmasError;
+ if(($XMAS_TIME_KEY[4] == 0) || ($XMAS_TIME_KEY[4] > 31))
+ goto L_XmasError;
+ if($XMAS_TIME_KEY[5] == 0)
+ goto L_XmasError;
+
+ // Event Runs until Reward Period.
+ // Month Start/End
+ set $@xmas_start_month, $XMAS_TIME_KEY[0];
+ set $@xmas_reward_start_month, $XMAS_TIME_KEY[1];
+ set $@xmas_end_month, $XMAS_TIME_KEY[2];
+
+ // Reward Day Start/End
+ set $@xmas_reward_start_day, $XMAS_TIME_KEY[3];
+ set $@xmas_reward_end_day, $XMAS_TIME_KEY[4];
+
+ // Time Settings
+ set $@xmas_no_event_time, 0;
+ set $@xmas_event_time, 1;
+ set $@xmas_reward_time, 2;
+
+ // Xmas debug (sets time)
+ set $@xmas_debug, 0;
+
+ // Main Quest Settings
+ // Bit used to Set Which one of the 2 quests you are on
+ set $@xmas_side_bit, (1 << 31);
+ set $@xmas_base_bonus_xp, 4;
+ set $@xmas_karma_bonus, 1;
+ set $@xmas_reward_max_karma, 15;
+ set $@xmas_reward_hero_boss, 15;
+ set $@xmas_reward_all_lists, 10;
+ set $@xmas_reward_all_helpers, 10;
+ set $@xmas_reward_tally_rare, 80;
+ set $@xmas_reward_tally_common, 40;
+ // Guidance System
+ set $@xmas_route_bit, (1 << 23);
+ // Basement Passage way
+ set $@xmas_basement_passage, (1 << 24);
+ // Thrown Out
+ set $@xmas_thrown_out_bit, (1 << 25);
+ // Quest Start (@xmas_state)
+ set $@xmas_list_path2_state, 1;
+ set $@xmas_list_path1_state, 2;
+ set $@xmas_list_both_state, 3;
+ set $@xmas_list_complete_state, 4;
+ set $@xmas_list_deliver_state, 5;
+ // Helper SubQuest
+ set $@xmas_helpers_start_state, 6;
+ set $@xmas_helpers_done_state, 7;
+ // Reagents
+ set $@xmas_reagents_start, 8;
+ set $@xmas_reagents_done, 9;
+ // Boss Door State
+ set $@xmas_boss_door_open_state, 10;
+ // Reward State
+ set $@xmas_reward_start, 11;
+ set $@xmas_reward1_done, 12;
+ set $@xmas_reward2_done, 13;
+ set $@xmas_reward_done, 14;
+
+ // Boss Fight Required Level for Hard Mode
+ set $@BossHardLevel, 70;
+ set $@xmas_boss_start_bit, (1 << 26);
+ set $@xmas_boss_hero_bit, (1 << 27);
+ set $@xmas_boss_start_shift, 26;
+ set $@xmas_boss_hero_shift, 27;
+ setarray $@xmas_boss_req$, "IronPotion", "DarkCrystal";
+ setarray $@xmas_boss_amount, 15, 10;
+ if(getarraysize($@xmas_boss_amount) != getarraysize($@xmas_boss_req$))
+ goto L_XmasError;
+ // Santas Helper quest rewards
+ setarray $@SantasHelper_Annual_Reward$,
+ "RedTurtleneckSweater",
+ "YellowTurtleneckSweater",
+ "LightBlueTurtleneckSwea",
+ "PinkTurtleneckSweater",
+ "OrangeTurtleneckSweater",
+ "PurpleTurtleneckSweater",
+ "KnitCap",
+ "KnitCap";
+
+ // Main Quest rewards
+ setarray $@xmas_present_from$, "Santa", "Orum";
+ setarray $@xmas_rare_reward$, "FunkyChristmasSweater", "DarkChristmasSweater";
+ setarray $@xmas_uncommon_reward$, "NutcrackerHat", "AmberChristmasSweater", "RedStockings", "PinkChristmasSweater", "BlueChristmasSweater";
+ // Quest Side 0 Settings
+ setarray $@xmas_zero_reagents$, "ShockSweet", "EmptyBottle", "EmeraldPowder";
+ setarray $@xmas_zero_reagents_names$, "ShockSweet", "Empty Bottles", "Emerald Powders";
+ setarray $@xmas_zero_reagents_amounts, 1, 4, 10;
+ if(getarraysize($@xmas_zero_reagents_amounts) != getarraysize($@xmas_zero_reagents$))
+ goto L_XmasError;
+
+ // Quest Side 1 Settings
+ setarray $@xmas_one_reagents$, "DarkCrystal", "IronPotion", "EmeraldPowder";
+ setarray $@xmas_one_reagents_names$, "Dark Crystal", "Iron Potions", "Emerald Powders";
+ setarray $@xmas_one_reagents_amounts, 1, 4, 10;
+ if(getarraysize($@xmas_one_reagents_amounts) != getarraysize($@xmas_one_reagents$))
+ goto L_XmasError;
+
+ // List Bits
+ set $@xmas_all_lists_bit, (1 << 29);
+ setarray $@xmas_child_list, (1 << 8), (1 << 9), (1 << 10), (1 << 11), (1 << 12), (1 << 13), (1 << 14), (1 << 15);
+ setarray $@xmas_child_list_name$, "Ayasha", "Latif", "Charda", "Faris", "Rasin", "Ghada", "Rossy", "Kadiya";
+ if(getarraysize($@xmas_child_list) != getarraysize($@xmas_child_list_name$))
+ goto L_XmasError;
+
+ set $@xmas_perfect_list_count, getarraysize($@xmas_child_list);
+ set $@xmas_required_list_count, (getarraysize($@xmas_child_list) / 2);
+
+ // Santa's Helper
+ set $@xmas_sh_bit, (1 << 22);
+ set $@xmas_sh_purple_amount, 25;
+ set $@xmas_sh_blue_amount, 20;
+ set $@xmas_sh_green_amount, 5;
+
+ // Main Helper Bit
+ set $@xmas_helper_bit, (1 << 30);
+ set $@xmas_all_helpers_bit, (1 << 28);
+
+ // Acorns
+ set $@xmas_helper_bit_acorns, (1 << 21);
+ set $@xmas_acorn_amount, 10;
+ set $@xmas_iron_potion_amount, 1;
+
+ // Bedding
+ set $@xmas_helper_bit_bed_starts, (1 << 16);
+ set $@xmas_helper_bit_bed_ends, (1 << 17);
+ set $@xmas_bedding_amount, 10;
+
+ // Boxes
+ set $@xmas_log_amount, 2;
+
+ // Wrap
+ set $@xmas_reed_amount, 2;
+ set $@xmas_water_amount, 1;
+ set $@xmas_wrap_reward, 1;
+
+ // Wrap Dye Amounts
+ set $@xmas_poa_amount, 2;
+ set $@xmas_wrap_yellow_amount, 2;
+ set $@xmas_wrap_ltblue_amount, 2;
+ set $@xmas_wrap_purple_amount, 2;
+ set $@xmas_wrap_green_amount, 2;
+
+ // Present Return
+ set $@xmas_present_amount, 5;
+
+ // Shipping
+ set $@xmas_wrap_amount, 1;
+ set $@xmas_empty_box_amount, 1;
+ set $@xmas_ship_present_amount, 1;
+
+ // Glitter
+ set $@xmas_helper_bit_glitter_starts, (1 << 18);
+ set $@xmas_helper_bit_glitter_ends, (1 << 19);
+ set $@xmas_red_amount, 5;
+ set $@xmas_yellow_amount, 5;
+
+ // Storage (Daily Xmas)
+ set $@xmas_helper_bit_storage, (1 << 20);
+ // Good Daily Ammounts
+ set $@xmas_good_level, 30;
+ set $@xmas_good_cost, 12;
+ set $@xmas_good_count, 3;
+ set $@xmas_good_name$, "Candy";
+ set $@xmas_good_friendly_name$, "Candies";
+ set $@xmas_good_money, 500;
+ set $@xmas_good_exp, 200;
+
+ // Bad Daily Ammounts
+ set $@xmas_bad_level, 30;
+ set $@xmas_bad_cost, 12;
+ set $@xmas_bad_count, 3;
+
+ set $@xmas_bad_name$, "RedApple";
+ set $@xmas_bad_friendly_name$, "Red Apples";
+ set $@xmas_bad_money, 500;
+ set $@xmas_bad_exp, 200;
+
+ //Boss Fight Reward
+ set $@xmas_boss_bp, 50;
+
+ // Helpers Flags needed to set $@xmas_all_helpers_bit
+ setarray $@xmas_helper_list, $@xmas_helper_bit_bed_ends, $@xmas_helper_bit_glitter_ends, $@xmas_helper_bit_storage, $@xmas_helper_bit_acorns, $@xmas_sh_bit;
+ set $@xmas_perfect_helpers_count, getarraysize($@xmas_helper_list);
+ set $@xmas_required_helpers_count, (getarraysize($@xmas_helper_list) / 2);
+
+ // MobManager
+ setarray $@xmas_mob_names$, "Santa Slime", "Candied Slime", "Candied Slime";
+ setarray $@xmas_mob_spawns, "1015", "1111", "1111";
+ setarray $@xmas_mob_counts, 10, 5, 5;
+ setarray $@xmas_map_spawns$, "019-1.gat", "019-3.gat", "030-3.gat";
+ if(getarraysize($@xmas_mob_spawns) != getarraysize($@xmas_map_spawns$))
+ goto L_XmasError;
+ if(getarraysize($@xmas_mob_names$) != getarraysize($@xmas_map_spawns$))
+ goto L_XmasError;
+ if(getarraysize($@xmas_mob_counts) != getarraysize($@xmas_map_spawns$))
+ goto L_XmasError;
+
+ set $@xmas_spawn_x1, 54;
+ set $@xmas_spawn_y1, 48;
+ set $@xmas_spawn_x2, 79;
+ set $@xmas_spawn_y2, 89;
+ set $@xmas_respawn_count, 9;
+
+ if($@xmas_debug == $@xmas_event_time)
+ goto L_EventTime;
+ if($@xmas_debug == $@xmas_reward_time)
+ goto L_RewardTime;
+
+ if((gettime(6) == $@xmas_reward_start_month && gettime(5) >= $@xmas_reward_start_day)
+ || (gettime(6) == $@xmas_end_month && gettime(5) <= $@xmas_reward_end_day))
+ goto L_RewardTime;
+ if(gettime(6) == $@xmas_start_month)
+ goto L_EventTime;
+
+L_NoEventTime:
+ if($XMAS_TIME_KEY[5] < gettime(7))
+ setarray $XMAS_TIME_KEY, $XMAS_TIME_KEY[0],$XMAS_TIME_KEY[1],$XMAS_TIME_KEY[2],$XMAS_TIME_KEY[3],$XMAS_TIME_KEY[4],gettime(7);
+ set $@xmas_time, $@xmas_no_event_time;
+ goto L_Return;
+
+L_EventTime:
+ set $@xmas_time, $@xmas_event_time;
+ goto L_Return;
+
+L_RewardTime:
+ set $@xmas_time, $@xmas_reward_time;
+ goto L_Return;
+
+L_Return:
+ callfunc "ReplaceTrees";
+ callfunc "SpawnMobs";
+ callfunc "PresentHandler";
+ end;
+
+L_XmasError:
+ debugmes "Xmas is Dead Jim.";
+ gmcommand "@mapexit";
+ end;
+}
diff --git a/world/map/npc/annuals/xmas/core.txt b/world/map/npc/annuals/xmas/core.txt
new file mode 100644
index 00000000..f8454088
--- /dev/null
+++ b/world/map/npc/annuals/xmas/core.txt
@@ -0,0 +1,239 @@
+// This file is part of Christmas Event
+// author: Jenalya, Chayenne, cinderweb, wushin
+// please see #XmasConfig
+
+function|script|XmasNaughty|,
+{
+ set @xmas_karma, ((XMASTIME & NIBBLE_1_MASK) >> NIBBLE_1_SHIFT);
+ if((@xmas_karma - @karma_bonus) >= 0)
+ goto L_SetNaughty;
+ goto L_ResetNaughty;
+
+L_SetNaughty:
+ set @xmas_karma, (@xmas_karma - @karma_bonus);
+ goto L_Return;
+
+L_ResetNaughty:
+ set @xmas_karma, 0;
+ goto L_Return;
+
+L_Return:
+ set XMASTIME, (XMASTIME & ~(NIBBLE_1_MASK) | (@xmas_karma << NIBBLE_1_SHIFT));
+ set @karma_bonus, 0;
+ return;
+}
+
+function|script|XmasNice|,
+{
+ set @xmas_karma, ((XMASTIME & NIBBLE_1_MASK) >> NIBBLE_1_SHIFT);
+ if((@xmas_karma + @karma_bonus) < 16)
+ goto L_SetNice;
+ goto L_ResetNice;
+
+L_SetNice:
+ set @xmas_karma, (@karma_bonus + @xmas_karma);
+ goto L_Return;
+
+L_ResetNice:
+ set @xmas_karma, 15;
+ goto L_Return;
+
+L_Return:
+ set XMASTIME, (XMASTIME & ~(NIBBLE_1_MASK) | (@xmas_karma << NIBBLE_1_SHIFT));
+ set @karma_bonus, 0;
+ return;
+}
+
+// Called for a basic reward for quests state completion
+function|script|XmasXpReward|,
+{
+ if (BaseLevel >= 10)
+ goto L_HigherLevel;
+ goto L_LowLevel;
+
+L_HigherLevel:
+ getexp ((BaseLevel / 10) * ($@xmas_base_bonus_xp * BaseLevel)), 0;
+ goto L_Return;
+
+L_LowLevel:
+ getexp ($@xmas_base_bonus_xp * BaseLevel), 0;
+ goto L_Return;
+
+L_Return:
+ return;
+}
+
+function|script|XmasSetState|,
+{
+ set XMASTIME, (XMASTIME & ~(NIBBLE_0_MASK) | (@xmas_state << NIBBLE_0_SHIFT));
+ return;
+}
+
+function|script|XmasSetSide|,
+{
+ set XMASTIME, XMASTIME | $@xmas_side_bit;
+ return;
+}
+
+function|script|XmasSetRoute|,
+{
+ set XMASTIME, XMASTIME | $@xmas_route_bit;
+ return;
+}
+
+function|script|XmasThrowOut|,
+{
+ set XMASTIME, XMASTIME | $@xmas_thrown_out_bit;
+ return;
+}
+
+function|script|XmasSetBossStart|,
+{
+ set XMASTIME, XMASTIME | $@xmas_boss_start_bit;
+ return;
+}
+
+function|script|XmasSetBossHero|,
+{
+ set XMASTIME, XMASTIME | $@xmas_boss_hero_bit;
+ return;
+}
+
+// Tallys the players quest
+function|script|XmasSetReward|,
+{
+ set @xmas_endgame, 0;
+ set @xmas_reward_side, 0;
+ set @xmas_reward_tally, 0;
+ if(@xmas_side)
+ goto L_SetSide;
+ goto L_NotSetSide;
+
+L_SetSide:
+ set @xmas_reward_side, 1;
+ set @xmas_reward_tally, (@xmas_reward_tally + ($@xmas_reward_max_karma - @xmas_karma));
+ goto L_SetRewardBonus;
+
+L_NotSetSide:
+ set @xmas_reward_tally, (@xmas_reward_tally + @xmas_karma);
+ goto L_SetRewardBonus;
+
+L_SetRewardBonus:
+ if(@xmas_boss_hero)
+ set @xmas_reward_tally, (@xmas_reward_tally + $@xmas_reward_hero_boss);
+ if(@xmas_all_helpers)
+ set @xmas_reward_tally, (@xmas_reward_tally + $@xmas_reward_all_helpers);
+ if(@xmas_all_lists)
+ set @xmas_reward_tally, (@xmas_reward_tally + $@xmas_reward_all_lists);
+ //formula should:
+ if (@xmas_reward_tally > 5)
+ set @xmas_reward_lower_bound, 2 * @xmas_reward_tally - rand(5);
+ if (@xmas_reward_tally <= 5)
+ set @xmas_reward_lower_bound, @xmas_reward_tally;
+ set @xmas_reward_upper_bound, @xmas_reward_lower_bound + ((readparam(bLuk)) / 5);
+ set @xmas_reward, (rand(@xmas_reward_lower_bound, @xmas_reward_upper_bound));
+ set @xmas_reward_lower_bound, 0;
+ set @xmas_reward_upper_bound, 0;
+ return;
+}
+
+// Main quest completion reward
+function|script|XmasMainXpBpReward|,
+{
+ callfunc "XmasSetReward";
+
+ if(BaseLevel >= 99)
+ goto L_EndGameReward;
+ goto L_LevelingReward;
+
+L_EndGameReward:
+ set @xmas_bp_reward, 100 + rand(@xmas_reward, 2 * @xmas_reward);
+ set BOSS_POINTS, BOSS_POINTS + @xmas_bp_reward;
+ message strcharinfo(0), "You gain " + @xmas_bp_reward + " Bosspoints, giving you a total of " + BOSS_POINTS + ".";
+ set @xmas_bp_reward, 0;
+ return;
+
+L_LevelingReward:
+ if(@xmas_reward >= $@xmas_reward_tally_rare)
+ goto L_XmasLevel;
+ goto L_XmasExp;
+
+L_XmasLevel:
+ gmcommand "@blvl 1";
+ return;
+
+L_XmasExp:
+ getexp ((@xmas_reward * BaseLevel * (BaseLevel + 10)) / 10), 0;
+ return;
+}
+
+// Final Item reward
+function|script|XmasMainItemReward|,
+{
+ callfunc "XmasSetReward";
+
+ if(($@xmas_time == $@xmas_reward_time) && ((@xmas_reward_start_state) || (@xmas_reward1_done_state)))
+ goto L_FinalGift;
+ goto L_Return;
+
+L_FinalGift:
+ mes "[To: " + strcharinfo(0) + "]";
+ mes "[From: " + $@xmas_present_from$[@xmas_reward_side] + "]";
+ mes "O look, a present from " + $@xmas_present_from$[@xmas_reward_side];
+ next;
+ getinventorylist;
+ if (@inventorylist_count > 97)
+ goto L_FullInv;
+ set @xmas_reward, (@xmas_reward + ((BaseLevel + 10)/10));
+ if (debug > 0)
+ message strcharinfo(0), "Reward variable: " + @xmas_reward;
+ set @xmas_uncommon_slot1, rand(getarraysize($@xmas_uncommon_reward$));
+ set @xmas_uncommon_slot2, rand(getarraysize($@xmas_uncommon_reward$));
+ if(@xmas_reward >= $@xmas_reward_tally_rare)
+ set @xmas_reward_item$, $@xmas_rare_reward$[@xmas_reward_side];
+ if(@xmas_reward >= $@xmas_reward_tally_common)
+ set @xmas_reward_item1$, $@xmas_uncommon_reward$[@xmas_uncommon_slot1];
+ set @xmas_reward_item2$, $@xmas_uncommon_reward$[@xmas_uncommon_slot2];
+ if(checkweight("Iten", 1) == 0)
+ goto L_FullInv;
+ if(@xmas_reward >= 80)
+ getitem @xmas_reward_item$, 1;
+ if(@xmas_reward >= 40)
+ getitem @xmas_reward_item1$, 1;
+ getitem @xmas_reward_item2$, 1;
+ set @xmas_uncommon_slot1, 0;
+ set @xmas_uncommon_slot2, 0;
+ set @xmas_reward_item$, "";
+ set @xmas_reward_item1$, "";
+ set @xmas_reward_item2$, "";
+ if (@xmas_reward_start_state)
+ set @xmas_state, $@xmas_reward2_done;
+ if (@xmas_reward1_done_state)
+ set @xmas_state, $@xmas_reward_done;
+ callfunc "XmasSetState";
+ goto L_Return;
+
+L_FullInv:
+ mes "\"You have no place to put the present.\"";
+ goto L_Return;
+
+L_Return:
+ return;
+}
+
+// Checks for an expired event key
+// Each new annual event needs a new key
+// or it will allow completion from last year
+function|script|XmasCheckOld|,
+{
+ if(XMASYEAR == $XMAS_TIME_KEY[5])
+ goto L_Return;
+
+L_OldMatch:
+ set XMASTIME, 0;
+ set XMASYEAR, $XMAS_TIME_KEY[5];
+ goto L_Return;
+
+L_Return:
+ return;
+}
diff --git a/world/map/npc/annuals/xmas/debug.txt b/world/map/npc/annuals/xmas/debug.txt
new file mode 100644
index 00000000..0153037b
--- /dev/null
+++ b/world/map/npc/annuals/xmas/debug.txt
@@ -0,0 +1,235 @@
+// This file is part of Christmas Event
+// author: Jenalya, Chayenne, cinderweb, wushin
+// please see #XmasConfig
+
+function|script|XmasDebug|,
+{
+ if(debug)
+ goto L_Debug;
+ goto L_Live;
+
+L_Live:
+ mes "What do you want to do?";
+ menu
+ "Debug Vars", L_DebugLive,
+ "Xmas Time Key Change.", L_XmasTimeKey,
+ "Do nothing.", L_Close;
+
+L_DebugLive:
+ mes "--Sever--";
+ mes "Event State: " + $@xmas_time;
+ mes "Event Start" + $XMAS_TIME_KEY[0] + "/1";
+ mes "Reward Start: " + $XMAS_TIME_KEY[1] + "/" + $XMAS_TIME_KEY[3];
+ mes "Event End: " + $XMAS_TIME_KEY[2] + "/" + $XMAS_TIME_KEY[4];
+ mes "Event Time Key (year (CCYY)): " + $XMAS_TIME_KEY[5];
+ goto L_Close;
+
+L_Debug:
+ mes "What do you want to do?";
+ menu
+ "Debug Vars", L_DebugVars,
+ "Set Quest State.", L_XmasState,
+ "Set Karma. [0-15] 15 Nice", L_XmasKarma,
+ "Set All Lists", L_SetAllLists,
+ "Set All Helpers", L_SetAllHelpers,
+ "Set Boss Hero", L_SetBossHero,
+ "Reset Quest State.", L_Reset,
+ "Set Old Event Flag.", L_LastReset,
+ "Xmas Time Key Change.", L_XmasTimeKey,
+ "Do nothing.", L_Close;
+
+L_DebugVars:
+ callfunc "XmasStates";
+ mes "--Sever--";
+ mes "Event State: " + $@xmas_time;
+ mes "Event Start" + $XMAS_TIME_KEY[0] + "/1";
+ mes "Reward Start: " + $XMAS_TIME_KEY[1] + "/" + $XMAS_TIME_KEY[3];
+ mes "Event End: " + $XMAS_TIME_KEY[2] + "/" + $XMAS_TIME_KEY[4];
+ mes "Event Time Key (year (CCYY)): " + $XMAS_TIME_KEY[5];
+ next;
+ mes "--Player--";
+ mes "Player Event Time Key " + XMASYEAR;
+ mes "xmas_state: " + @xmas_state;
+ mes "xmas_karma: " + @xmas_karma;
+ mes "xmas_side: " + @xmas_side;
+ next;
+ mes "xmas_list_gather: " + @xmas_list_gather;
+ mes "xmas_list_complete: " + @xmas_list_complete;
+ mes "xmas_list_deliver: " + @xmas_list_deliver;
+ mes "xmas_helper_start_state: " + @xmas_helper_start_state;
+ mes "xmas_helper_done_state: " + @xmas_helper_done_state;
+ mes "xmas_reagent_start_state: " + @xmas_reagent_start_state;
+ mes "xmas_reagent_done_state: " + @xmas_reagent_done_state;
+ mes "xmas_boss_door_state: " + @xmas_boss_door_state;
+ mes "xmas_reward_start_state " + @xmas_reward_start_state;
+ mes "xmas_reward1_done_state " + @xmas_reward1_done_state;
+ mes "xmas_reward2_done_state " + @xmas_reward2_done_state;
+ mes "xmas_reward_done_state: " + @xmas_reward_done_state;
+ next;
+ mes "xmas_basement_passage: " + @xmas_basement_passage;
+ mes "xmas_thrown_out: " + @xmas_thrown_out;
+ mes "xmas_hard_mode: " + @xmas_boss_hero;
+ next;
+ mes "xmas_sweater: " + @xmas_sh_done;
+ next;
+ mes "xmas_all_lists: " + @xmas_all_lists;
+ next;
+ mes "xmas_helper_bit: " + @xmas_helper_bit;
+ mes "xmas_all_helpers: " + @xmas_all_helpers;
+ mes "xmas_helper_acorn: " + @xmas_helper_acorn;
+ mes "xmas_helper_bedding: " + @xmas_helper_bedding;
+ mes "xmas_helper_glitter: " + @xmas_helper_glitter;
+ mes "xmas_helper_storage: " + @xmas_helper_storage;
+ mes "xmas_knows_route: " + @xmas_knows_route;
+ goto L_Close;
+
+L_LastReset:
+ set XMASTIME, 255;
+ set XMASYEAR, 2012;
+ goto L_Close;
+
+L_Reset:
+ set XMASTIME, 0;
+ set XMASYEAR, $XMAS_TIME_KEY[5];
+ goto L_Close;
+
+L_XmasTimeKey:
+ if (getgmlevel() < 20) goto L_Close;
+ mes "Xmas Time Key Change.";
+ mes "Start Month?";
+ input @xmas_time_key_smonth;
+ if((@xmas_time_key_smonth == 0) || (@xmas_time_key_smonth > 12))
+ goto L_XmasError;
+ mes "Reward Start Month?";
+ input @xmas_time_key_srmonth;
+ if((@xmas_time_key_srmonth == 0) || (@xmas_time_key_srmonth > 12))
+ goto L_XmasError;
+ mes "End Month?";
+ input @xmas_time_key_emonth;
+ if((@xmas_time_key_emonth == 0) || (@xmas_time_key_emonth > 12))
+ goto L_XmasError;
+ mes "Reward Start Day?";
+ input @xmas_time_key_rsday;
+ if((@xmas_time_key_rsday == 0) || (@xmas_time_key_rsday > 31))
+ goto L_XmasError;
+ mes "Reward End Day?";
+ input @xmas_time_key_reday;
+ if((@xmas_time_key_reday == 0) || (@xmas_time_key_reday > 31))
+ goto L_XmasError;
+ mes "Time Key (CCYY) ";
+ input @xmas_time_key_year;
+ goto L_SetNewKey;
+
+L_XmasError:
+ mes "Incorrect Entry. Try again.";
+ goto L_Close;
+
+L_SetNewKey:
+ setarray $XMAS_TIME_KEY, @xmas_time_key_smonth, @xmas_time_key_srmonth, @xmas_time_key_emonth, @xmas_time_key_rsday, @xmas_time_key_reday, @xmas_time_key_year;
+ cmdothernpc "#XmasConfig", "RestartQuest";
+ goto L_Close;
+
+L_XmasState:
+ mes "Quest state?";
+ input @xmas_state;
+ callfunc "XmasSetState";
+ goto L_Close;
+
+L_XmasKarma:
+ mes "Karma (0-15) 0: Naughty, 15: Good";
+ input @xmas_karma;
+ set XMASTIME, (XMASTIME & ~(NIBBLE_1_MASK) | (@xmas_karma << NIBBLE_1_SHIFT));
+ goto L_Close;
+
+L_SetAllLists:
+ set XMASTIME, XMASTIME | $@xmas_all_lists_bit;
+ goto L_Close;
+
+L_SetAllHelpers:
+ set XMASTIME, XMASTIME | $@xmas_all_helpers_bit;
+ goto L_Close;
+
+L_SetBossHero:
+ set XMASTIME, XMASTIME | $@xmas_boss_hero_bit;
+ goto L_Close;
+
+L_Close:
+ set @xmas_state, 0;
+ set @xmas_karma, 0;
+ set @xmas_hard_mode, 0;
+ set @xmas_time_key_smonth, 0;
+ set @xmas_time_key_emonth, 0;
+ set @xmas_time_key_rsday, 0;
+ set @xmas_time_key_reday, 0;
+ set @xmas_time_key_year, 0;
+ close;
+}
+
+030-1.gat,91,48,0|script|XmasDebug#1|105,
+{
+ callfunc "XmasDebug";
+ goto L_end;
+
+OnInit:
+ if(!(debug))
+ disablenpc "XmasDebug#1";
+L_end:
+ end;
+}
+
+030-2.gat,193,62,0|script|XmasDebug#2|105,
+{
+ callfunc "XmasDebug";
+ goto L_end;
+
+OnInit:
+ if(!(debug))
+ disablenpc "XmasDebug#2";
+L_end:
+ end;
+}
+
+030-3.gat,26,26,0|script|XmasDebug#3|105,
+{
+ callfunc "XmasDebug";
+ goto L_end;
+
+OnInit:
+ if(!(debug))
+ disablenpc "XmasDebug#3";
+L_end:
+ end;
+}
+
+030-4.gat,30,30,0|script|XmasDebug#4|111,
+{
+ callfunc "XmasDebug";
+ goto L_end;
+
+OnInit:
+ if(!(debug))
+ disablenpc "XmasDebug#4";
+L_end:
+ end;
+}
+
+
+botcheck.gat,26,28,0|script|XmasDebug#5|105,
+{
+ if(getgmlevel() < 40)
+ goto L_End;
+
+ callfunc "XmasDebug";
+
+L_End:
+ end;
+}
+
+020-1.gat,86,76,0|script|XmasDebug#6|105,
+{
+ callfunc "XmasDebug";
+
+OnInit:
+ if(!(debug))
+ disablenpc "XmasDebug#6";
+}
diff --git a/world/map/npc/annuals/xmas/helpers.txt b/world/map/npc/annuals/xmas/helpers.txt
new file mode 100644
index 00000000..57e535b5
--- /dev/null
+++ b/world/map/npc/annuals/xmas/helpers.txt
@@ -0,0 +1,48 @@
+// This file is part of Christmas Event
+// author: Jenalya, Chayenne, cinderweb, wushin
+// please see #XmasConfig
+// TODO: Make Helpers static functions
+
+function|script|XmasHelperPoints|,
+{
+ set @xmas_helper_count, 0;
+ set @xmas_helper_loop, 0;
+ if((@xmas_helper_done_state) || !(@xmas_helper_start_state))
+ goto L_Return;
+
+L_Loop:
+ if(XMASTIME & $@xmas_helper_list[@xmas_helper_loop])
+ goto L_AddOne;
+ goto L_LoopAgain;
+
+L_AddOne:
+ set @xmas_helper_count, (@xmas_helper_count + 1);
+ goto L_LoopAgain;
+
+L_LoopAgain:
+ if((@xmas_helper_loop + 1) == getarraysize($@xmas_helper_list))
+ goto L_HelperTally;
+ set @xmas_helper_loop, (@xmas_helper_loop + 1);
+ goto L_Loop;
+
+L_HelperTally:
+ if(@xmas_helper_count == $@xmas_perfect_helpers_count)
+ goto L_PerfectHelpers;
+ if(@xmas_helper_count > $@xmas_required_helpers_count)
+ goto L_SetHelperState;
+ goto L_Return;
+
+L_PerfectHelpers:
+ set XMASTIME, XMASTIME | $@xmas_all_helpers_bit;
+ goto L_SetHelperState;
+
+L_SetHelperState:
+ set @xmas_state, $@xmas_helpers_done_state;
+ callfunc "XmasSetState";
+ goto L_Return;
+
+L_Return:
+ set @xmas_helper_count, 0;
+ set @xmas_helper_loop, 0;
+ return;
+}
diff --git a/world/map/npc/annuals/xmas/list.txt b/world/map/npc/annuals/xmas/list.txt
new file mode 100644
index 00000000..a03db395
--- /dev/null
+++ b/world/map/npc/annuals/xmas/list.txt
@@ -0,0 +1,102 @@
+// This file is part of Christmas Event
+// author: Jenalya, Chayenne, cinderweb, wushin
+// please see #XmasConfig
+
+function|script|XmasCheckList|,
+{
+ set @xmas_list_count, 0;
+ set @xmas_list_loop, 0;
+
+ if((@xmas_list_deliver) || !(@xmas_list_gather))
+ goto L_Return;
+
+L_Loop:
+ if(XMASTIME & $@xmas_child_list[@xmas_list_loop])
+ goto L_AddOne;
+ goto L_LoopAgain;
+
+L_AddOne:
+ set @xmas_list_count, (@xmas_list_count + 1);
+ goto L_LoopAgain;
+
+L_LoopAgain:
+ if((@xmas_list_loop + 1) == getarraysize($@xmas_child_list))
+ goto L_ListTally;
+ set @xmas_list_loop, (@xmas_list_loop + 1);
+ goto L_Loop;
+
+L_ListTally:
+ if(@xmas_list_count == $@xmas_perfect_list_count)
+ goto L_PerfectList;
+ if(@xmas_list_count > $@xmas_required_list_count)
+ goto L_SetListState;
+ goto L_Return;
+
+L_PerfectList:
+ set XMASTIME, XMASTIME | $@xmas_all_lists_bit;
+ goto L_SetListState;
+
+L_SetListState:
+ set @xmas_state, $@xmas_list_complete_state;
+ callfunc "XmasSetState";
+ goto L_Return;
+
+L_Return:
+ set @xmas_list_loop, 0;
+ return;
+}
+
+function|script|XmasList|,
+{
+ callfunc "XmasStates";
+
+ if(($@xmas_time) && (@xmas_list_gather) && !(@xmas_list_complete))
+ goto L_QuestTime;
+ goto L_Return;
+
+L_QuestTime:
+ if(XMASTIME & $@xmas_child_list[$@child_number])
+ goto L_Return;
+ goto L_GetList;
+
+L_GetList:
+ menu
+ "Hey, I have come to collect your wish list for Santa", L_List,
+ "Oh sorry, what were you going to say?", L_Return;
+
+L_List:
+ mes "[" + $@xmas_child_list_name$[$@child_number] + "]";
+ mes "Here is my list. Make sure it gets delivered, please!";
+ next;
+ mes "You store " + $@xmas_child_list_name$[$@child_number] + "'s wish list carefully in a hidden pocket of your backpack.";
+ set XMASTIME, XMASTIME | $@xmas_child_list[$@child_number];
+ callfunc "XmasXpReward";
+ menu
+ "I really should be going.", L_Return;
+
+L_Return:
+ return;
+}
+
+function|script|XmasListList|,
+{
+ set @xmas_list_loop, 0;
+ set @xmas_child_loop, 0;
+
+L_Loop:
+ set @xmas_child_loop, ($@xmas_child_list[@xmas_list_loop]);
+ if ((XMASTIME & @xmas_child_loop) != 0) goto L_LoopAgain;
+ mes "\"" + $@xmas_child_list_name$[@xmas_list_loop] + "\"";
+ next;
+ goto L_LoopAgain;
+
+L_LoopAgain:
+ if((@xmas_list_loop + 1) == getarraysize($@xmas_child_list_name$))
+ goto L_Return;
+ set @xmas_list_loop, (@xmas_list_loop + 1);
+ goto L_Loop;
+
+L_Return:
+ set @xmas_list_loop, 0;
+ return;
+}
diff --git a/world/map/npc/annuals/xmas/mobmanager.txt b/world/map/npc/annuals/xmas/mobmanager.txt
new file mode 100644
index 00000000..2ffa5e15
--- /dev/null
+++ b/world/map/npc/annuals/xmas/mobmanager.txt
@@ -0,0 +1,99 @@
+// Spawns mobs
+
+019-1.gat,0,0,0|script|XmasSpawnManager|400,
+{
+
+OnCommandSpawnStart:
+ goto L_InitSpawn;
+
+L_InitSpawn:
+ initnpctimer;
+ set $@xmas_current_count, 0;
+ set $@xmas_map_loop, 0;
+ goto L_StartLoop;
+
+L_StartLoop:
+ set $@xmas_mob_lck, 1;
+ set $@mob_count, mobcount($@xmas_map_spawns$[$@xmas_map_loop], "XmasSpawnCounter#" + $@xmas_map_loop + "::OnTally");
+ set $@spawn_amount, ($@xmas_mob_counts[$@xmas_map_loop] - ($@mob_count + 1));
+ if ($@spawn_amount)
+ goto L_Spawn;
+ goto L_NextMap;
+
+L_Spawn:
+ areamonster $@xmas_map_spawns$[$@xmas_map_loop], $@xmas_spawn_x1, $@xmas_spawn_y1, $@xmas_spawn_x2, $@xmas_spawn_y2, $@xmas_mob_names$[$@xmas_map_loop], $@xmas_mob_spawns[$@xmas_map_loop], $@spawn_amount, "XmasSpawnCounter#" + $@xmas_map_loop + "::OnTally";
+ set $@xmas_current_count, ($@xmas_current_count + $@spawn_amount);
+ goto L_NextMap;
+
+L_NextMap:
+ if (($@xmas_map_loop + 1) == getarraysize($@xmas_map_spawns$))
+ goto L_End;
+ set $@xmas_map_loop, ($@xmas_map_loop + 1);
+ goto L_StartLoop;
+
+L_DespawnLoop:
+ killmonster $@xmas_map_spawns$[$@xmas_map_loop], "XmasSpawnCounter#" + $@xmas_map_loop + "::OnTally";
+ goto L_NextDespawn;
+
+L_NextDespawn:
+ if (($@xmas_map_loop + 1) == getarraysize($@xmas_map_spawns$))
+ goto L_SelfDestruct;
+ set $@xmas_map_loop, ($@xmas_map_loop + 1);
+ goto L_DespawnLoop;
+
+L_StopTracking:
+ set $@xmas_mob_lck, 1;
+ set $@xmas_map_loop, 0;
+ goto L_DespawnLoop;
+
+L_SelfDestruct:
+ stopnpctimer;
+ disablenpc "XmasSpawnManager";
+ goto L_End;
+
+OnCommandTally:
+ set $@xmas_map_loop, 0;
+ set $@xmas_current_count, ($@xmas_current_count - 1);
+ if (($@xmas_current_count < $@xmas_respawn_count) && !($@xmas_mob_lck))
+ goto L_StartLoop;
+ goto L_End;
+
+OnTimer110000:
+ initnpctimer;
+ goto L_StartLoop;
+
+L_End:
+ set $@mob_count, 0;
+ set $@spawn_amount, 0;
+ set $@xmas_mob_lck, 0;
+ set $@xmas_map_loop, 0;
+ end;
+}
+
+019-1.gat,0,0,0|script|XmasSpawnCounter#0|400,
+{
+OnTally:
+ cmdothernpc "XmasSpawnManager", "Tally";
+ end;
+}
+
+019-3.gat,0,0,0|script|XmasSpawnCounter#1|400,
+{
+OnTally:
+ cmdothernpc "XmasSpawnManager", "Tally";
+ end;
+}
+
+030-1.gat,0,0,0|script|XmasSpawnCounter#2|400,
+{
+OnTally:
+ cmdothernpc "XmasSpawnManager", "Tally";
+ end;
+}
+
+030-3.gat,0,0,0|script|XmasSpawnCounter#3|400,
+{
+OnTally:
+ cmdothernpc "XmasSpawnManager", "Tally";
+ end;
+}
diff --git a/world/map/npc/annuals/xmas/reagents.txt b/world/map/npc/annuals/xmas/reagents.txt
new file mode 100644
index 00000000..a1dd8d6f
--- /dev/null
+++ b/world/map/npc/annuals/xmas/reagents.txt
@@ -0,0 +1,142 @@
+// This file is part of Christmas Event
+// author: Jenalya, Chayenne, cinderweb, wushin
+// please see #XmasConfig
+
+function|script|CheckReagents|,
+{
+ set @xmas_reagent_loop, 0;
+ if((@xmas_reagent_done_state) || !(@xmas_reagent_start_state))
+ goto L_Return;
+ if(@xmas_side)
+ goto L_OneLoop;
+ goto L_ZeroLoop;
+
+L_ZeroLoop:
+ if(countitem($@xmas_zero_reagents$[@xmas_reagent_loop]) >= $@xmas_zero_reagents_amounts[@xmas_reagent_loop])
+ goto L_ZeroLoopAgain;
+ goto L_Return;
+
+L_ZeroLoopAgain:
+ if((@xmas_reagent_loop + 1) == getarraysize($@xmas_zero_reagents$))
+ goto L_AllReagents;
+ set @xmas_reagent_loop, (@xmas_reagent_loop + 1);
+ goto L_ZeroLoop;
+
+L_OneLoop:
+ if(countitem($@xmas_one_reagents$[@xmas_reagent_loop]) >= $@xmas_one_reagents_amounts[@xmas_reagent_loop])
+ goto L_OneLoopAgain;
+ goto L_Return;
+
+L_OneLoopAgain:
+ if((@xmas_reagent_loop + 1) == getarraysize($@xmas_one_reagents$))
+ goto L_AllReagents;
+ set @xmas_reagent_loop, (@xmas_reagent_loop + 1);
+ goto L_OneLoop;
+
+L_AllReagents:
+ set @xmas_state, $@xmas_reagents_done;
+ callfunc "XmasSetState";
+ goto L_Return;
+
+L_Return:
+ return;
+}
+
+function|script|DeleteReagents|,
+{
+ set @xmas_reagent_loop, 0;
+ if(@xmas_side)
+ goto L_OneLoop;
+ goto L_ZeroLoop;
+
+L_ZeroLoop:
+ delitem $@xmas_zero_reagents$[@xmas_reagent_loop], $@xmas_zero_reagents_amounts[@xmas_reagent_loop];
+
+L_ZeroLoopAgain:
+ if((@xmas_reagent_loop + 1) == getarraysize($@xmas_zero_reagents$))
+ goto L_Return;
+ set @xmas_reagent_loop, (@xmas_reagent_loop + 1);
+ goto L_ZeroLoop;
+
+L_OneLoop:
+ delitem $@xmas_one_reagents$[@xmas_reagent_loop], $@xmas_one_reagents_amounts[@xmas_reagent_loop];
+
+L_OneLoopAgain:
+ if((@xmas_reagent_loop + 1) == getarraysize($@xmas_one_reagents$))
+ goto L_Return;
+ set @xmas_reagent_loop, (@xmas_reagent_loop + 1);
+ goto L_OneLoop;
+
+L_Return:
+ return;
+}
+
+function|script|ListReagents|,
+{
+ set @xmas_reagent_loop, 0;
+ mes "\"I'm going to need \"";
+ next;
+
+ if(@xmas_side)
+ goto L_OneLoop;
+ goto L_ZeroLoop;
+
+L_ZeroLoop:
+ mes "\"" + $@xmas_zero_reagents_amounts[@xmas_reagent_loop] + " " + $@xmas_zero_reagents_names$[@xmas_reagent_loop] + "\"";
+ next;
+
+L_ZeroLoopAgain:
+ if((@xmas_reagent_loop + 1) == getarraysize($@xmas_zero_reagents$))
+ goto L_AllReagents;
+ set @xmas_reagent_loop, (@xmas_reagent_loop + 1);
+ goto L_ZeroLoop;
+
+L_OneLoop:
+ mes "\"" + $@xmas_one_reagents_amounts[@xmas_reagent_loop] + " " + $@xmas_one_reagents_names$[@xmas_reagent_loop] + "\"";
+ next;
+
+L_OneLoopAgain:
+ if((@xmas_reagent_loop + 1) == getarraysize($@xmas_one_reagents$))
+ goto L_AllReagents;
+ set @xmas_reagent_loop, (@xmas_reagent_loop + 1);
+ goto L_OneLoop;
+
+L_AllReagents:
+ return;
+}
+
+function|script|BadPowderMake|,
+{
+ if(countitem("PileOfAsh") < ($@xmas_red_amount + $@xmas_yellow_amount))
+ goto L_NotEnough;
+ if(countitem("RedDye") < $@xmas_red_amount)
+ goto L_NotEnough;
+ if(countitem("YellowDye") < $@xmas_yellow_amount)
+ goto L_NotEnough;
+ getinventorylist;
+ if (@inventorylist_count > 100)
+ goto L_FullInv;
+ goto L_MakePowder;
+
+L_MakePowder:
+ delitem "PileOfAsh", ($@xmas_red_amount + $@xmas_yellow_amount);
+ delitem "RedDye", $@xmas_red_amount;
+ delitem "YellowDye", $@xmas_yellow_amount;
+ getitem "RedPowder", $@xmas_red_amount;
+ getitem "YellowPowder", $@xmas_yellow_amount;
+ mes "\"Here is your powder, now move!\"";
+ goto L_Return;
+
+L_FullInv:
+ mes "\"... Excuse me but where did you expect you were going to hold these powders...\"";
+ mes "\"WAIT! no, I don't want to know. Just come back when you have some room.\"";
+ goto L_Return;
+
+L_NotEnough:
+ mes "\"You don't have enough of eagents to make the powders.\"";
+ mes "\"To replace the glitter we will need get " + ($@xmas_red_amount + $@xmas_yellow_amount) + " Piles of Ash, " + $@xmas_red_amount + " Red Dyes and " + $@xmas_yellow_amount + " Yellow Dyes\"";
+ goto L_Return;
+
+L_Return:
+ return;
+}
diff --git a/world/map/npc/annuals/xmas/states.txt b/world/map/npc/annuals/xmas/states.txt
new file mode 100644
index 00000000..8d81864f
--- /dev/null
+++ b/world/map/npc/annuals/xmas/states.txt
@@ -0,0 +1,55 @@
+// This file is part of Christmas Event
+// author: Jenalya, Chayenne, cinderweb, wushin
+// please see #XmasConfig
+
+function|script|XmasStates|,
+{
+ // Check for Old Quest Line Keys. Reset Quest if so.
+ callfunc "XmasCheckOld";
+ // Main Quest
+ set @xmas_state, ((XMASTIME & NIBBLE_0_MASK) >> NIBBLE_0_SHIFT);
+ set @xmas_karma, ((XMASTIME & NIBBLE_1_MASK) >> NIBBLE_1_SHIFT);
+ set @xmas_side, XMASTIME & $@xmas_side_bit;
+
+ set @xmas_list_gather, (@xmas_state >= $@xmas_list_path2_state);
+ set @xmas_list_path2, (@xmas_state == $@xmas_list_path2_state);
+ set @xmas_list_path1, (@xmas_state == $@xmas_list_path1_state);
+ set @xmas_list_both, (@xmas_state == $@xmas_list_both_state);
+ set @xmas_list_complete, (@xmas_state >= $@xmas_list_complete_state);
+ set @xmas_list_deliver, (@xmas_state >= $@xmas_list_deliver_state);
+ set @xmas_helper_start_state, (@xmas_state >= $@xmas_helpers_start_state);
+ set @xmas_helper_done_state, (@xmas_state >= $@xmas_helpers_done_state);
+ set @xmas_reagent_start_state, (@xmas_state >= $@xmas_reagents_start);
+ set @xmas_reagent_done_state, (@xmas_state >= $@xmas_reagents_done);
+ set @xmas_boss_door_state, (@xmas_state >= $@xmas_boss_door_open_state);
+ set @xmas_reward_start_state, (@xmas_state == $@xmas_reward_start);
+ set @xmas_reward1_done_state, (@xmas_state == $@xmas_reward1_done);
+ set @xmas_reward2_done_state, (@xmas_state == $@xmas_reward2_done);
+ set @xmas_reward_done_state, (@xmas_state == $@xmas_reward_done);
+
+ // Basement Passage
+ set @xmas_basement_passage, XMASTIME & $@xmas_basement_passage;
+ // Thrown Out
+ set @xmas_thrown_out, XMASTIME & $@xmas_thrown_out_bit;
+ // Learned Route to Orum
+ set @xmas_knows_route, XMASTIME & $@xmas_route_bit;
+ // Santas Helper
+ set @xmas_sh_done, XMASTIME & $@xmas_sh_bit;
+ // List Quest
+ set @xmas_all_lists, XMASTIME & $@xmas_all_lists_bit;
+ // Helper Quest
+ set @xmas_helper_bit, XMASTIME & $@xmas_helper_bit;
+ set @xmas_all_helpers, XMASTIME & $@xmas_all_helpers_bit;
+ // Acorns
+ set @xmas_helper_acorn, XMASTIME & $@xmas_helper_bit_acorns;
+ // Bedding
+ set @xmas_helper_bedding, XMASTIME & $@xmas_helper_bit_bed_starts;
+ // Glitter
+ set @xmas_helper_glitter, XMASTIME & $@xmas_helper_bit_glitter_starts;
+ // Storage
+ set @xmas_helper_storage, XMASTIME & $@xmas_helper_bit_storage;
+ // Bosses
+ set @xmas_boss_start, XMASTIME & $@xmas_boss_start_bit;
+ set @xmas_boss_hero, XMASTIME & $@xmas_boss_hero_bit;
+ return;
+}
diff --git a/world/map/npc/annuals/xmas/tree_beard.txt b/world/map/npc/annuals/xmas/tree_beard.txt
new file mode 100644
index 00000000..474f3c63
--- /dev/null
+++ b/world/map/npc/annuals/xmas/tree_beard.txt
@@ -0,0 +1,107 @@
+// Annual Xmas Environment changes
+020-1.gat,90,78,0|script|#Tree|380,
+{
+ end;
+}
+
+020-1.gat,90,78,0|script|#XmasTree|379,
+{
+ end;
+}
+
+020-1.gat,90,79,0|script|Present#1|386,
+{
+ callfunc "XmasStates";
+ callfunc "XmasMainItemReward";
+ close;
+}
+
+009-1.gat,54,38,0|script|#TreeNoSnow|382,
+{
+ end;
+}
+
+009-1.gat,54,38,0|script|#XmasTreeNoSnow|381,
+{
+ end;
+}
+
+009-1.gat,54,39,0|script|Present#2|386,
+{
+ callfunc "XmasStates";
+ callfunc "XmasMainItemReward";
+ close;
+}
+
+001-1.gat,41,45,0|script|#PalmTree|384,
+{
+ end;
+}
+
+001-1.gat,41,46,0|script|Present#3|386,
+{
+ callfunc "XmasStates";
+ callfunc "XmasMainItemReward";
+ close;
+}
+
+001-1.gat,41,45,0|script|#XmasPalmTree|383,
+{
+ end;
+}
+
+function|script|SpawnMobs|,
+{
+ cmdothernpc "XmasSpawnManager", "SpawnStart";
+ return;
+}
+
+function|script|PresentHandler|,
+{
+ if($@xmas_time == $@xmas_reward_time)
+ goto L_DeliverPresents;
+ goto L_DisablePresents;
+
+L_DeliverPresents:
+ enablenpc "Present#1";
+ enablenpc "Present#2";
+ enablenpc "Present#3";
+ goto L_Return;
+
+L_DisablePresents:
+ disablenpc "Present#1";
+ disablenpc "Present#2";
+ disablenpc "Present#3";
+ goto L_Return;
+
+L_Return:
+ return;
+}
+
+function|script|ReplaceTrees|,
+{
+ if($@xmas_time)
+ goto L_XmasTree;
+ goto L_Tree;
+
+L_XmasTree:
+ disablenpc "#Tree";
+ enablenpc "#XmasTree";
+ disablenpc "#TreeNoSnow";
+ enablenpc "#XmasTreeNoSnow";
+ disablenpc "#PalmTree";
+ enablenpc "#XmasPalmTree";
+ goto L_Return;
+
+L_Tree:
+ disablenpc "#XmasTree";
+ enablenpc "#Tree";
+ disablenpc "#XmasTreeNoSnow";
+ enablenpc "#TreeNoSnow";
+ disablenpc "#XmasPalmTree";
+ enablenpc "#PalmTree";
+ goto L_Return;
+
+L_Return:
+ return;
+}
diff --git a/world/map/npc/functions/mob_points.txt b/world/map/npc/functions/mob_points.txt
index 5f711afb..08864ed0 100644
--- a/world/map/npc/functions/mob_points.txt
+++ b/world/map/npc/functions/mob_points.txt
@@ -111,6 +111,12 @@ function|script|MobPoints|,
15, // ViciousSquirrel
20, // WickedMushroom
18, // Bluepar
+ 10, // AngryFireGoblin
+ 35, // AngrySeaSlime
+ 50, // CandiedSlime
+ 40, // Santaboo
+ 30, // Pollett
+ 100, //Nutcracker
// Add more here
0; // END
@@ -146,6 +152,12 @@ function|script|MobPoints|,
// Reinboo
if (@mobID == 1094)
set @value, 3;
+// Santaboo
+ if (@mobID == 1112)
+ set @value, 3;
+// Pollett
+ if (@mobID == 1113)
+ set @value, 3;
if (@value == 0)
goto L_end;
diff --git a/world/map/npc/scripts.conf b/world/map/npc/scripts.conf
index 2fff74b8..986dcbab 100644
--- a/world/map/npc/scripts.conf
+++ b/world/map/npc/scripts.conf
@@ -31,7 +31,6 @@ npc: npc/items/restricted_item.txt
npc: npc/items/warpTowels.txt
npc: npc/items/unequipcb.txt
npc: npc/items/launcher_ammo.txt
-
import: npc/_import.txt
// Christmas 2006
@@ -105,3 +104,15 @@ import: npc/halloween/2011/_import.txt
// Christmas 2012
// import: npc/xmas/2012/_import.txt
+npc: npc/annuals/fathertime.txt
+// Annual Christmas
+npc: npc/annuals/xmas/config.txt
+npc: npc/annuals/xmas/states.txt
+npc: npc/annuals/xmas/barriers.txt
+npc: npc/annuals/xmas/core.txt
+npc: npc/annuals/xmas/debug.txt
+npc: npc/annuals/xmas/helpers.txt
+npc: npc/annuals/xmas/list.txt
+npc: npc/annuals/xmas/reagents.txt
+npc: npc/annuals/xmas/mobmanager.txt
+npc: npc/annuals/xmas/tree_beard.txt