summaryrefslogtreecommitdiff
path: root/world/map/npc/annuals
diff options
context:
space:
mode:
Diffstat (limited to 'world/map/npc/annuals')
-rw-r--r--world/map/npc/annuals/check_time.txt55
-rw-r--r--world/map/npc/annuals/fathertime.txt18
-rw-r--r--world/map/npc/annuals/halloween/config.txt361
-rw-r--r--world/map/npc/annuals/halloween/debug.txt147
-rw-r--r--world/map/npc/annuals/halloween/doomsday.txt743
-rw-r--r--world/map/npc/annuals/halloween/munro.txt50
-rw-r--r--world/map/npc/annuals/halloween/trick_or_treat.txt332
-rw-r--r--world/map/npc/annuals/tree_beard.txt137
-rw-r--r--world/map/npc/annuals/xmas/2020.txt835
-rw-r--r--world/map/npc/annuals/xmas/barriers.txt165
-rw-r--r--world/map/npc/annuals/xmas/config.txt291
-rw-r--r--world/map/npc/annuals/xmas/core.txt252
-rw-r--r--world/map/npc/annuals/xmas/debug.txt228
-rw-r--r--world/map/npc/annuals/xmas/helpers.txt49
-rw-r--r--world/map/npc/annuals/xmas/list.txt104
-rw-r--r--world/map/npc/annuals/xmas/mobmanager.txt82
-rw-r--r--world/map/npc/annuals/xmas/reagents.txt146
-rw-r--r--world/map/npc/annuals/xmas/states.txt55
18 files changed, 0 insertions, 4050 deletions
diff --git a/world/map/npc/annuals/check_time.txt b/world/map/npc/annuals/check_time.txt
deleted file mode 100644
index 1d37ecbc..00000000
--- a/world/map/npc/annuals/check_time.txt
+++ /dev/null
@@ -1,55 +0,0 @@
-// check a date
-// Wushin
-// $@start_month
-// $@end_month
-// $@start_day
-// $@end_day
-// $@reward_start_month
-// $@reward_start_day
-
-function|script|GetEventTime
-{
- set $@month, gettime(6);
- set $@day, gettime(5);
-
- if ($@start_month > $@end_month)
- goto L_YearWrap;
- goto L_Normal;
-
-L_Normal:
- if(($@month < $@start_month)
- || ($@month == $@start_month && $@day < $@start_day))
- goto L_NoEventTime;
- if(($@month > $@end_month)
- || ($@month == $@end_month && $@day > $@end_day))
- goto L_NoEventTime;
- if(($@month > $@reward_start_month)
- || ($@month == $@reward_start_month && $@day >= $@reward_start_day))
- goto L_RewardTime;
- goto L_EventTime;
-
-L_YearWrap:
- if(($@month == $@reward_start_month && $@day >= $@reward_start_day
- && ($@day <= $@end_day && $@reward_start_month == $@end_month
- || !($@reward_start_month == $@end_month)))
- || ($@month == $@end_month && $@day <= $@end_day
- && ($@day >= $@reward_start_day && $@reward_start_month == $@end_month
- || !($@reward_start_month == $@end_month)))
- || ($@month < $@end_month && $@month > $@reward_start_month))
- goto L_RewardTime;
- if (($@month >= $@start_month && $@day >= $@start_day) || ($@month <= $@end_month && $@day <= $@end_day))
- goto L_EventTime;
- goto L_NoEventTime;
-
-L_NoEventTime:
- set $@event_time, 0;
- return;
-
-L_EventTime:
- set $@event_time, 1;
- return;
-
-L_RewardTime:
- set $@event_time, 2;
- return;
-}
diff --git a/world/map/npc/annuals/fathertime.txt b/world/map/npc/annuals/fathertime.txt
deleted file mode 100644
index 29406f63..00000000
--- a/world/map/npc/annuals/fathertime.txt
+++ /dev/null
@@ -1,18 +0,0 @@
-// Annual Timer
-// One timer to check to enable all holiday events
-017-9,26,28,0|script|#HolidayConfig|32767
-{
- end;
-
-OnInit:
- if (debug >= 2) end;
- donpcevent strnpcinfo(0) + "::OnTimer20000";
- end;
-
-OnTimer20000:
- donpcevent "#XmasConfig::OnCommandRestartQuest";
- donpcevent "#HalloweenConfig::OnCommandRestartQuest";
- donpcevent "Easter Eggs::OnCheckEaster";
- initnpctimer;
- end;
-}
diff --git a/world/map/npc/annuals/halloween/config.txt b/world/map/npc/annuals/halloween/config.txt
deleted file mode 100644
index ffe9dfbe..00000000
--- a/world/map/npc/annuals/halloween/config.txt
+++ /dev/null
@@ -1,361 +0,0 @@
-// Halloween Annual
-// Authors: alastrim, enchilado, o11c, wushin
-// This file initializes global constants, which includes dialog.
-
-// Event Configuration:
-// Generic stuff
-// $@halloween_start_day = the first day in October the quest can be done
-// $@halloween_year = the year this quest is activated, for event necromancers
-// $@halloween_memory_count = Number of masks each NPC remembers
-// $@halloween_min_level = Minimum level to go trick-or-treating
-
-// Global stuff
-// $@halloween_big_reward = The main reward randomly given, usually after the counter has reached 7-10
-// $@halloween_sweets = Array with all the sweets to be given as treats
-// $@halloween_sweets_num = Size of that array
-// $@halloween_mask_IDs = Array with the IDs of all the masks that cover your face + The Scary Axehat
-// $@halloween_scare_factors = Array with the basic scare factor of each mask
-// 678 Noh Mask 2
-// 679 Demon Mask 4
-// 1221 Skull Mask 4
-// 634 Face Mask 4
-// 615 Pumpkin Helmet 2
-// 639 Crusade Helmet 3
-// 769 Guy Fawkes Mask 2
-// 801 Pinkie Helmet 2
-// 1218 Paper Bag 1
-// 1276 Opera Mask 3
-// 1277 Jester Mask 2
-// 1279 Goblin Mask 4
-// 4027 Yeti Mask 4
-
-// Per-NPC stuff
-// $@halloween_npc_<name> = constants for @halloween_npc_id, the index into the array
-// $@halloween_npc_names$ = Array with all NPC names inside brackets, to be used in the function
-// $@halloween_greetings$ = Array with all the NPC initial greetings when you "trick or treat" them
-// $@halloween_trick_notscary$ = Array with the less scary menu options
-// $@halloween_react_notscary$ = Array with all the reactions to the less scary menu options
-// $@halloween_trick_scary$ = Array with scary menu options
-// $@halloween_react_scary$ = Array with all the reactions to the scary menu options
-// $@halloween_trick_veryscary$ = Array with the most scary menu options
-// $@halloween_react_veryscary$ = Array with all the reactions to the very scary menu options
-
-// In the appropriate NPCs, do something like:
-//+ if ($@halloween_time)
-//+ goto L_Halloween;
-//+ goto L_Main;
-//+
-//+L_Halloween:
-//+ set @halloween_npc_id, $@halloween_npc_eurni;
-//+ callfunc "TrickOrTreat";
-//+ goto L_Main;
-//+
-//+L_Main:
-
-// Variables:
-// $@halloween_maskmemory = Sliced Array containing the record of the last masks used to trick or treat each NPC.
-// @halloween_npc_id = NPC id, this variable is set when calling this function by an NPC
-// HALLOWEENTIME = Permanent variable used to control your progress in the quest.
-// The high bits are used to keep track of the NPCs you already tricked while showing your face.
-// The low bits are used to keep track of how many times you've gotten treats.
-// Currently, the vague plan is 16 for each, but we may need to use this variable for the second part of the quest.
-// HALLOWEENYEAR = Keys the player to the year so the annual can be redone.
-
-// !!! IMPORTANT NOTE: a maximum of 14 NPCs can be used for this quest !!!
-// HALLOWEENTIME
-// Byte 0 + 1: Karma (65535)
-// BIT 16: Big Reward
-// BIT 17: Charm Reward
-// BIT 18: NPC #13
-// BIT 19: NPC #12
-// BIT 20: NPC #11
-// BIT 21: NPC #10
-// BIT 22: NPC #9
-// BIT 23: NPC #8
-// BIT 24: NPC #7
-// BIT 25: NPC #6
-// BIT 26: NPC #5
-// BIT 27: NPC #4
-// BIT 28: NPC #3
-// BIT 29: NPC #2
-// BIT 30: NPC #1
-// BIT 31: NPC #0
-
--|script|#HalloweenConfig|32767
-{
- end;
-
-OnCommandRestartQuest:
- goto L_Main;
-
-OnInit:
- goto L_Main;
-
-L_Main:
- // Halloween Key Identifier Set through Botcheck Debug
- if(!($HALLOWEEN_TIME_KEY) || (getarraysize($HALLOWEEN_TIME_KEY) != 6))
- setarray $HALLOWEEN_TIME_KEY, 10,10,11,24,2,gettime(7);
- if(($HALLOWEEN_TIME_KEY[0] == 0) || ($HALLOWEEN_TIME_KEY[0] > 12))
- goto L_HalloweenError;
- if(($HALLOWEEN_TIME_KEY[1] == 0) || ($HALLOWEEN_TIME_KEY[1] > 12))
- goto L_HalloweenError;
- if(($HALLOWEEN_TIME_KEY[2] == 0) || ($HALLOWEEN_TIME_KEY[2] > 12))
- goto L_HalloweenError;
- if(($HALLOWEEN_TIME_KEY[3] == 0) || ($HALLOWEEN_TIME_KEY[3] > 31))
- goto L_HalloweenError;
- if(($HALLOWEEN_TIME_KEY[4] == 0) || ($HALLOWEEN_TIME_KEY[4] > 31))
- goto L_HalloweenError;
- if($HALLOWEEN_TIME_KEY[5] == 0)
- goto L_HalloweenError;
-
- // Event Runs until Reward Period.
- // Month Start/End
- set $@halloween_start_month, $HALLOWEEN_TIME_KEY[0];
- set $@halloween_reward_start_month, $HALLOWEEN_TIME_KEY[1];
- set $@halloween_end_month, $HALLOWEEN_TIME_KEY[2];
-
- // Reward Day Start/End
- set $@halloween_reward_start_day, $HALLOWEEN_TIME_KEY[3];
- set $@halloween_reward_end_day, $HALLOWEEN_TIME_KEY[4];
-
- // Time Settings
- set $@halloween_no_event_time, 0;
- set $@halloween_event_time, 1;
- set $@halloween_reward_time, 2;
-
- // How many, maximum is 8
- set $@halloween_memory_count, 8;
- // Level to go trick-or-treating
- set $@halloween_min_level, 10;
-
- // Number of trick and treats completed to get charm.
- set $@halloween_charm_count, 10;
- set $@halloween_got_charm_reward, (1 << 17);
- setarray $@halloween_big_reward, 905, 1175;
- set $@halloween_got_big_reward, (1 << 16);
- setarray $@halloween_sweets,
- 534, // OrangeCupcake
- 737, // ChocolateCake
- 510, // Candy
- 513, // Cake
- 509, // ChocolateBar
- 519, // CherryCake
- 736, // WhiteCake
- 738, // OrangeCake
- 739, // AppleCake
- 3006, // TonoriDelight
- 3007, // Marshmallow
- 3009, // JellySkull
- 3010, // CandyPumpkin
- 838, // CranberryLollipop
- 839, // GrapeLollipop
- 840; // OrangeLollipop
- set $@halloween_sweets_num, getarraysize($@halloween_sweets);
-
- setarray $@halloween_mask_IDs, 678, 679, 1221, 634, 615, 639, 769, 801, 1218, 1276, 1277, 1279, 4027;
- setarray $@halloween_scare_factors, 2, 4, 4, 4, 2, 3, 2, 2, 1, 3, 2, 4, 4;
-
- if (getarraysize($@halloween_mask_IDs) != getarraysize($@halloween_scare_factors))
- goto L_HalloweenError;
- // temporary counter
- set $@n, 0;
-
- set $@halloween_npc_caretaker, $@n;
- set $@halloween_npc_names$[$@n], "[Caretaker]";
- set $@halloween_greetings$[$@n], "\"Alright, come on then. Show me your trick.\"";
- set $@halloween_trick_notscary$[$@n], "Trick? You must have misheard me. I've come because the Government needs to build a road through your house.";
- set $@halloween_react_notscary$[$@n], "\"And?\"";
- set $@halloween_trick_scary$[$@n], "You look pretty deceased to me, old man. Undead must die! Yaah!";
- set $@halloween_react_scary$[$@n], "\"Now listen here, I'm as alive as you - oh. Say, that was a good trick!\"";
- set $@halloween_trick_veryscary$[$@n], "Your wife... she's - she's - she's DEAD!";
- set $@halloween_react_veryscary$[$@n], "\"But... I live here! My wife l... is dead here. You can't - oh. I DIDN'T mishear you. You really had me fooled!\"";
-
- set $@n, $@n + 1;
-
- set $@halloween_npc_eurni, $@n;
- set $@halloween_npc_names$[$@n], "[Eurni the Surgeon]";
- set $@halloween_greetings$[$@n], "\"Oh, right.\"";
- set $@halloween_trick_notscary$[$@n], "I paid good money for your services, and when I get home I find that now I'm not a man OR a woman...";
- set $@halloween_react_notscary$[$@n], "\"Heheh, sucks, buddy. But there's always a risk.\"";
- set $@halloween_trick_scary$[$@n], "Look out! A scorpion!";
- set $@halloween_react_scary$[$@n], "\"Where? Darn things, I think they're what keep scaring away my customers.\"";
- set $@halloween_trick_veryscary$[$@n], "I know about your hobby of performing numerous sex changes on yourself.";
- set $@halloween_react_veryscary$[$@n], "\"Shut up! Look, will you hold your tongue if I give you more treats...?\"";
-
- set $@n, $@n + 1;
-
- set $@halloween_npc_george, $@n;
- set $@halloween_npc_names$[$@n], "[George the Pirate]";
- set $@halloween_greetings$[$@n], "\"Shiver me timbers! What do ye mean?\"";
- set $@halloween_trick_notscary$[$@n], "Well... I do a trick, and then... you give me a treat...";
- set $@halloween_react_notscary$[$@n], "\"Arrrrh, I knew what ye meant, to be sure! I were just kidding with ye, pretending to be a crazy old pirate! Arrrrh!\"";
- set $@halloween_trick_scary$[$@n], "Your eyepatch is on the wrong eye!";
- set $@halloween_react_scary$[$@n], "\"Arrrrh, so it is! Ta for pointing it out, mate - wait, no it isn't! Harhar, what a good trick!\"";
- set $@halloween_trick_veryscary$[$@n], "By the powers, ye're a daft landlubber to be sure, ye barnacle-ridden swab!";
- set $@halloween_react_veryscary$[$@n], "\"Arrrrh, ye scurvy dog! I'm sure my first mate will return with the ship eventually.\"";
-
- set $@n, $@n + 1;
-
- set $@halloween_npc_inac, $@n;
- set $@halloween_npc_names$[$@n], "[Inac]";
- set $@halloween_greetings$[$@n], "\"Oh, yes?\"";
- set $@halloween_trick_notscary$[$@n], "Yes, we monsters moved into the tunnels... and now we're coming out... for revenge!";
- set $@halloween_react_notscary$[$@n], "\"Haha! That's the worse trick I've seen today.\"";
- set $@halloween_trick_scary$[$@n], "One of those monsters you mentioned is crawling out of the well!";
- set $@halloween_react_scary$[$@n], "\"He IS? Where!? Aah! Oh. You were just tricking, right? Hahaha, that was good, I really believed you.\"";
- set $@halloween_trick_veryscary$[$@n], "Yeah, but it's all fossil water. One day it's gonna dry up!";
- set $@halloween_react_veryscary$[$@n], "\"Fossil water? You mean it's turned to STONE? But you can't drink - oh... you were just tricking, right? You WEREN'T? Aaaah!\"";
-
- set $@n, $@n + 1;
-
- set $@halloween_npc_kfahr, $@n;
- set $@halloween_npc_names$[$@n], "[Kfahr the Warrior]";
- set $@halloween_greetings$[$@n], "\"Ah, yes!\" He rubs his hands. \"Trick away, then!\"";
- set $@halloween_trick_notscary$[$@n], "Meh... I'm only trick-or-treating you to avoid listening to your BORING stories.";
- set $@halloween_react_notscary$[$@n], "\"Boring?\" He grins. \"You must be mistaking me for someone else.\"";
- set $@halloween_trick_scary$[$@n], "Did you hear the bad news already? They made up a law prohibiting to serve alcoholic drinks! That means no more beer!";
- set $@halloween_react_scary$[$@n], "\"What? But- but- why do they- oh, you tricked me. I was about to really get worried for a moment.\"";
- set $@halloween_trick_veryscary$[$@n], "Have you heard? Tulimshar was destroyed by a giant Desert Worm!";
- set $@halloween_react_veryscary$[$@n], "\"What!?\" Kfahr stares. \"And no one called for me? This is appalling! But - what? That was your trick? Hm, nice one. You almost had me fooled!\"";
-
- set $@n, $@n + 1;
-
- set $@halloween_npc_nurse, $@n;
- set $@halloween_npc_names$[$@n], "[Nurse]";
- set $@halloween_greetings$[$@n], "\"I don't know why I let the Mayor trick me into this... well, go on then.\"";
- set $@halloween_trick_notscary$[$@n], "I ate too much Hallowe'en candy, now I'm sick!";
- set $@halloween_react_notscary$[$@n], "\"Well, no one's to blame but yourself, you know. Just make sure you don't eat any more.\"";
- set $@halloween_trick_scary$[$@n], "Hurnscald has been struck by plague! You must come and tend to the dying!";
- set $@halloween_react_scary$[$@n], "\"But I don't know how to deal with plague! Oh no! You must get the Doctor! Unless... you were just tricking me! Whew, that's a relief!\"";
- set $@halloween_trick_veryscary$[$@n], "The Doctor asked me to tell you that he doesn't want to see you any more.";
- set $@halloween_react_veryscary$[$@n], "\"What? But we were getting it on so well. I mean, getting on so well! Oh... that was your trick! Dear me, I believed you!\"";
-
- set $@n, $@n + 1;
-
- set $@halloween_npc_pachua, $@n;
- set $@halloween_npc_names$[$@n], "[Chief Pachua]";
- set $@halloween_greetings$[$@n], "\"Ah, the strange custom the Government man told me about.\"";
- set $@halloween_trick_notscary$[$@n], "Look out! A scorpion!";
- set $@halloween_react_notscary$[$@n], "\"Don't mind him, he won't hurt you. Er... so I give you sweets now, or what?\"";
- set $@halloween_trick_scary$[$@n], "Yes, the ritual giving of treats... LOTS of treats... or else!";
- set $@halloween_react_scary$[$@n], "\"Alright, here you go.\"";
- set $@halloween_trick_veryscary$[$@n], "Yes, the ritual giving of treats followed by the sacrifice of the treat-giver...";
- set $@halloween_react_veryscary$[$@n], "\"I do like a good sacrifice, but less so if it's me! I'll give you extra sweets if you forget the sacrifice.\"";
-
- set $@n, $@n + 1;
-
- set $@halloween_npc_yanis, $@n;
- set $@halloween_npc_names$[$@n], "[Yanis]";
- set $@halloween_greetings$[$@n], "\"I am employed by the Tonori Government, make sure you abide the regulations we wrote down for Trick-or-Treaters this year...\"";
- set $@halloween_trick_notscary$[$@n], "Of course I will... not!";
- set $@halloween_react_notscary$[$@n], "\"Hm!\"";
- set $@halloween_trick_scary$[$@n], "Regulations, smegulations. The Tonori Government can go suck a lollipop for all I care!";
- set $@halloween_react_scary$[$@n], "\"!? How dare you - oh, that was your trick! You did have me worried for a moment...\"";
- set $@halloween_trick_veryscary$[$@n], "What regulations?";
- set $@halloween_react_veryscary$[$@n], "\"You mean you haven't even READ - I don't believe - this is ghastly - I - oh... that was your trick... gosh, I believed you for a minute! I thought you really hadn't read them!\"";
-
- set $@n, $@n + 1;
-
- set $@halloween_npc_vincent, $@n;
- set $@halloween_npc_names$[$@n], "[Vincent]";
- set $@halloween_greetings$[$@n], "\"Ooh, okay! Trick away!\"";
- set $@halloween_trick_notscary$[$@n], "Look out! A scorpion!";
- set $@halloween_react_notscary$[$@n], "\"They're everywhere in this desert! Don't worry about them.\"";
- set $@halloween_trick_scary$[$@n], "Hey, that action figure you're building just CAME TO LIFE!";
- set $@halloween_react_scary$[$@n], "\"Really? Cool! Where? What? You were tricking me? WAAAH!\"";
- set $@halloween_trick_veryscary$[$@n], "Wow, this is a neat action figure! Haha, check out its moves! Oops! Never mind, I'm sure it'll glue back on.";
- set $@halloween_react_veryscary$[$@n], "\"My Bug Leg action figure! You broke it!\"";
-
- set $@n, $@n + 1;
-
- set $@halloween_npc_weellos, $@n;
- set $@halloween_npc_names$[$@n], "[Weellos]";
- set $@halloween_greetings$[$@n], "\"Trick me, then!\"";
- set $@halloween_trick_notscary$[$@n], "Look out! A scorpion!";
- set $@halloween_react_notscary$[$@n], "\"Pesky things, I know, but they're everywhere around here...\"";
- set $@halloween_trick_scary$[$@n], "Actually, it's a fake. It was built just ten years ago.";
- set $@halloween_react_scary$[$@n], "\"No! But I've read all the accounts... oh, haha! Very funny!\"";
- set $@halloween_trick_veryscary$[$@n], "They say the earthquake ruined the foundations of this building, and that it's going to fall down.";
- set $@halloween_react_veryscary$[$@n], "\"B-but it's one of the oldest buildings around! And... wait, I just remembered that it was designed to be earthquake-proof. You were tricking me!\"";
-
- set $@n, $@n + 1;
-
- set $@halloween_npc_zack, $@n;
- set $@halloween_npc_names$[$@n], "[Zack]";
- set $@halloween_greetings$[$@n], "\"I thought no one would find me down here, but I'm glad I was wrong! Let's see your trick, then.\"";
- set $@halloween_trick_notscary$[$@n], "You think this is something to do with Hallowe'en? Hands up!";
- set $@halloween_react_notscary$[$@n], "\"Heh... That was ok.\"";
- set $@halloween_trick_scary$[$@n], "And now that I've found you, you die!";
- set $@halloween_react_scary$[$@n], "\"Aah! What did I do? Oh - wait - I see! That was a good one!\"";
- set $@halloween_trick_veryscary$[$@n], "Yes, I have found you. After all these years.";
- set $@halloween_react_veryscary$[$@n], "\"Uncle Henry? But how, I covered my tracks so well! I never told anyone that - wait... that was your trick! You had me worried for a minute!\"";
-
- set $@n, $@n + 1;
-
- set $@halloween_npc_kimarr, $@n;
- set $@halloween_npc_names$[$@n], "[Kimarr]";
- set $@halloween_greetings$[$@n], "\"Many have tried to scare me, all have failed. Try your best, but the frozen wastes contain all manner of horrors.\"";
- set $@halloween_trick_notscary$[$@n], "Look out Yetis!";
- set $@halloween_react_notscary$[$@n], "\"You will have to do better then that.\"";
- set $@halloween_trick_scary$[$@n], "Hrmm Is that your wife calling you?";
- set $@halloween_react_scary$[$@n], "\"What? You haven't se... wait a second. Ok that was good.\"";
- set $@halloween_trick_veryscary$[$@n], "The Kaizeian government declared fluffies an endangered species.";
- set $@halloween_react_veryscary$[$@n], "\"NOooOOOooo!!! The Hunt!!! ... wait a second, you city folk are slick.\"";
-
- set $@n, $@n + 1;
-
- set $@halloween_npc_nikolai, $@n;
- set $@halloween_npc_names$[$@n], "[Nikolai]";
- set $@halloween_greetings$[$@n], "\"Let us see if you are scarier then Kfahr's Fairy Tales.\"";
- set $@halloween_trick_notscary$[$@n], "Your going over their to the store.";
- set $@halloween_react_notscary$[$@n], "\"*You're* *there* Ugh, thats more annoying then scary.\"";
- set $@halloween_trick_scary$[$@n], "Whats White, Blue and slimey? I don't know either but it's right behind you.";
- set $@halloween_react_scary$[$@n], "\"More Slimes, Oh no the books again. O you tricked me, good one.\"";
- set $@halloween_trick_veryscary$[$@n], "I hope you don't mind I used some of this kindling you have on the shelves to start a fire.";
- set $@halloween_react_veryscary$[$@n], "\"AHHHHH!!!! You burned our books!!! *GAH* ... *Eye Twitch*\"";
-
- set $@n, $@n + 1;
-
- set $@halloween_npc_vellamo, $@n;
- set $@halloween_npc_names$[$@n], "[Vellamo]";
- set $@halloween_greetings$[$@n], "\"Ahh yes, more candy related ritual.\"";
- set $@halloween_trick_notscary$[$@n], "Candy? No, I want Parsley.";
- set $@halloween_react_notscary$[$@n], "\"Parsley? is this some kind of monster? I'm not getting this scare at all\"";
- set $@halloween_trick_scary$[$@n], "Chief Warrick says he needs the candy inventory by end of day.";
- set $@halloween_react_scary$[$@n], "\"Ahh, no! I forgot to put a cover sheet on my Candy Production and Storage report.\"";
- set $@halloween_trick_veryscary$[$@n], "I'm sorry, but your doctor says your diabetic.";
- set $@halloween_react_veryscary$[$@n], "\"Darkest day of my life, blacker then the darkest chocolate.\"";
-
- set $@halloween_num_npcs, $@n + 1;
-
- set $@n, 0;
-
- // Age to go trick-or-treating (1 week before the start)
- if ((gettime(6) >= $@halloween_start_month) || (gettime(6) <= $@halloween_end_month))
- set $@halloween_min_age, ((gettime(5) + 7)*86400);
- if (gettime(6) == $@halloween_reward_start_month)
- set $@halloween_min_age, ((gettime(5) + 38)*86400);
-
- set $@start_month, $@halloween_start_month;
- set $@end_month, $@halloween_end_month;
- set $@start_day, 1;
- set $@end_day, $@halloween_reward_end_day;
- set $@reward_start_month, $@halloween_reward_start_month;
- set $@reward_start_day, $@halloween_reward_start_day;
-
- callfunc "GetEventTime";
- set $@halloween_time, $@event_time;
-
- if($@halloween_time == 0 && $HALLOWEEN_TIME_KEY[5] < gettime(7))
- setarray $HALLOWEEN_TIME_KEY, $HALLOWEEN_TIME_KEY[0],$HALLOWEEN_TIME_KEY[1],$HALLOWEEN_TIME_KEY[2],$HALLOWEEN_TIME_KEY[3],$HALLOWEEN_TIME_KEY[4],gettime(7);
- goto L_Return;
-
-L_Return:
- callfunc "SpawnMunro";
- callfunc "ReplaceTrees";
- end;
-
-L_HalloweenError:
- debugmes "Halloween is Dead Jim.";
- mapexit;
-}
diff --git a/world/map/npc/annuals/halloween/debug.txt b/world/map/npc/annuals/halloween/debug.txt
deleted file mode 100644
index b9ca8ac3..00000000
--- a/world/map/npc/annuals/halloween/debug.txt
+++ /dev/null
@@ -1,147 +0,0 @@
-// Halloween Debug
-// Author: Wushin
-
-function|script|HalloweenDebug
-{
- if(debug)
- goto L_Debug;
- goto L_Live;
-
-L_Live:
- menu
- "Debug Time", L_DebugTime,
- "Set Old Event Flag.", L_LastReset,
- "Halloween Time Key Change.", L_HalloweenTimeKey,
- "Reset NPC's mask memory", L_ResetMask,
- "Summon Tormenta", L_Tormenta,
- "Nothing.", L_Close;
-
-L_Debug:
- menu
- "Debug Time", L_DebugTime,
- "Set Old Event Flag.", L_LastReset,
- "Halloween Time Key Change.", L_HalloweenTimeKey,
- "Quest State", L_QuestState,
- "Set NPC trick or treat flag", L_SetTrickOrTreats,
- "Reset my quest state", L_ResetMe,
- "Reset NPC's mask memory", L_ResetMask,
- "Summon Tormenta", L_Tormenta,
- "Nothing.", L_Close;
-
-L_DebugTime:
- mes "--Sever--";
- mes "Event State: " + $@halloween_time;
- mes "Event Start" + $HALLOWEEN_TIME_KEY[0] + "/1";
- mes "Reward Start: " + $HALLOWEEN_TIME_KEY[1] + "/" + $HALLOWEEN_TIME_KEY[3];
- mes "Event End: " + $HALLOWEEN_TIME_KEY[2] + "/" + $HALLOWEEN_TIME_KEY[4];
- mes "Event Time Key (year (CCYY)): " + $HALLOWEEN_TIME_KEY[5];
- next;
- goto L_Debug;
-
-L_LastReset:
- set HALLOWEENTIME, 255;
- set HALLOWEENYEAR, 2012;
- goto L_Debug;
-
-L_HalloweenTimeKey:
- mes "Halloween Time Key Change.";
- mes "Start Month?";
- input @halloween_time_key_smonth;
- if((@halloween_time_key_smonth == 0) || (@halloween_time_key_smonth > 12))
- goto L_HalloweenError;
- mes "Reward Start Month?";
- input @halloween_time_key_srmonth;
- if((@halloween_time_key_srmonth == 0) || (@halloween_time_key_srmonth > 12))
- goto L_HalloweenError;
- mes "End Month?";
- input @halloween_time_key_emonth;
- if((@halloween_time_key_emonth == 0) || (@halloween_time_key_emonth > 12))
- goto L_HalloweenError;
- mes "Reward Start Day?";
- input @halloween_time_key_rsday;
- if((@halloween_time_key_rsday == 0) || (@halloween_time_key_rsday > 31))
- goto L_HalloweenError;
- mes "Reward End Day?";
- input @halloween_time_key_reday;
- if((@halloween_time_key_reday == 0) || (@halloween_time_key_reday > 31))
- goto L_HalloweenError;
- mes "Time Key (CCYY) ";
- input @halloween_time_key_year;
- goto L_SetNewKey;
-
-L_HalloweenError:
- mes "Incorrect Entry. Try again.";
- next;
- goto L_Debug;
-
-L_SetNewKey:
- setarray $HALLOWEEN_TIME_KEY, @halloween_time_key_smonth, @halloween_time_key_srmonth, @halloween_time_key_emonth, @halloween_time_key_rsday, @halloween_time_key_reday, @halloween_time_key_year;
- donpcevent "#HalloweenConfig::OnCommandRestartQuest";
- goto L_Debug;
-
-L_QuestState:
- mes "Karma: " + (HALLOWEENTIME & 65535);
- set @big_reward_status$, " No.";
- if (HALLOWEENTIME & $@halloween_got_big_reward)
- set @big_reward_status$, " Yes.";
- mes "Big Reward: " + @big_reward_status$;
- set @charm_reward_status$, " No.";
- if (HALLOWEENTIME & $@halloween_got_charm_reward)
- set @charm_reward_status$, " Yes.";
- mes "Charm Reward:" + @charm_reward_status$;
- set @npc_check_loop, 0;
- goto L_NpcCheckLoop;
-
-L_NpcCheckLoop:
- set @display_mes$, "NPC ID " + @npc_check_loop + ":" + $@halloween_npc_names$[@npc_check_loop];
- set @npc_status$, " Needed";
- if (HALLOWEENTIME & (1 << (31 - @npc_check_loop)))
- set @npc_status$, " Complete";
- set @display_mes$, @display_mes$ + @npc_status$;
- mes @display_mes$;
- set @display_mes$, "";
- goto L_NpcCheckInc;
-
-L_NpcCheckInc:
- set @npc_check_loop, (@npc_check_loop + 1);
- if (@npc_check_loop >= getarraysize($@halloween_npc_names$))
- goto L_TrickOrTreatCount;
- goto L_NpcCheckLoop;
-
-L_TrickOrTreatCount:
- callfunc "TrickOrTreatTally";
- mes @npc_tally + " out of 14";
- next;
- goto L_Debug;
-
-L_SetTrickOrTreats:
- mes "Enter NPC to set";
- input @halloween_npc_id;
- set HALLOWEENTIME, HALLOWEENTIME | (1 << (31 - @halloween_npc_id));
- goto L_Debug;
-
-L_ResetMe:
- set HALLOWEENTIME, 0;
- set HALLOWEENYEAR, $HALLOWEEN_TIME_KEY[5];
- goto L_Debug;
-
-L_ResetMask:
- mes "Enter NPC to reset:";
- input @halloween_npc_id;
- set $@halloween_maskmemory[8 * @halloween_npc_id], 0;
- goto L_Debug;
-
-L_Tormenta:
- donpcevent "Munro::OnTormenta";
- goto L_Close;
-
-L_Close:
- set @tmp, 0;
- set @mask, 0;
- set @karma, 0;
- set @loop, 0;
- set @menu, 0;
- set @halloween_npc_id, 0;
- close2;
- return;
-}
diff --git a/world/map/npc/annuals/halloween/doomsday.txt b/world/map/npc/annuals/halloween/doomsday.txt
deleted file mode 100644
index 1967f532..00000000
--- a/world/map/npc/annuals/halloween/doomsday.txt
+++ /dev/null
@@ -1,743 +0,0 @@
-// Evol script
-// Year: 2020
-//
-// Controls Doomsday Event - Vanilla Jande's Rescue (Halloween 2020)
-//
-// Operates: 057-1 070-1 003-1
-// See also: npc/annuals/halloween/munro.txt
-// Variables:
-// $@HW2020_SLAIN, array
-// $@HW2020_TIMER, array
-// $@HW2020_HOCUS, integer
-// (0 - Not yet, 1 - Cutscene, 2 - Ambushed, 3 - Completing, 4 - Completed)
-// $@HW2020_CNT, temporary int
-// $@JACKOID, temporary int
-// $@UnderMc, temporary int
-// @TulimMc, temporary int
-// @JACKOID, temporary int
-// @mobID, temporary int
-// @mobAM, temporary int
-
-////////////////////////////////////////////////
-// JackO Central Processing Core ($@JACKOID)
-function|script|HocusJackO
-{
- if (!$@HW2020_SLAIN[$@JACKOID])
- goto L_Return;
-
- if ($@HW2020_TIMER[$@JACKOID] < gettimetick(2))
- goto L_Expired;
-
- // Count the JackO
- set $@HW2020_CNT, $@HW2020_CNT+1;
- set $@JACKOID, 0;
- return;
-
-// Time expired!
-L_Expired:
- set $@HW2020_SLAIN[$@JACKOID], 0;
- // Re-enable the NPC
- if ($@JACKOID == 0)
- enablenpc "JackO#Tybalt";
- if ($@JACKOID == 1)
- enablenpc "JackO#Nicolas";
- if ($@JACKOID == 2)
- enablenpc "JackO#Elanore";
- if ($@JACKOID == 3)
- enablenpc "JackO#Aisha";
- if ($@JACKOID == 4)
- enablenpc "JackO#Nina";
- if ($@JACKOID == 5)
- enablenpc "JackO#Ian";
- if ($@JACKOID == 6)
- enablenpc "JackO#Luca";
- if ($@JACKOID == 7)
- enablenpc "JackO#Ekinu";
- if ($@JACKOID == 8)
- enablenpc "JackO#Ryan";
- if ($@JACKOID == 9)
- enablenpc "JackO#Neko";
- if ($@JACKOID == 10)
- enablenpc "JackO#Ishi";
- if ($@JACKOID == 11)
- enablenpc "JackO#Sandra";
- if ($@JACKOID == 12)
- enablenpc "JackO#Vincent";
- set $@JACKOID, 0;
- return;
-
-L_Return:
- set $@JACKOID, 0;
- return;
-}
-
-////////////////////////////////////////////////
-// Monster Script Control
--|script|HW2020 Mobs|32767
-{
- close;
-
-OnInit:
- goto L_Main;
-
-// They'll respawn at midday.
-OnClock1200:
- goto L_Main;
-
-L_Main:
- // Do not waste RAM/CPU if we don't need it
- if ($DOOMSDAY != 3 || !$@halloween_time)
- end;
- if ($DOOMSDAY_TJANDE || !$DOOMSDAY_TWARP)
- end;
-
- /////////////////////////////////////////////////////////////////////////
- // Underworld Controller
-
- // TYPE 1141, SASQUATCH
- set $@UnderMc, mobcount("070-1", "HW2020 Mobs::OnDeath1")+1;
- if ($@UnderMc < 20)
- areamonster "070-1", 20, 20, 75, 100, "", 1141, 20-$@UnderMc, "HW2020 Mobs::OnDeath1";
-
- set $@UnderMc, mobcount("070-1", "HW2020 Mobs::OnDeath2")+1;
- if ($@UnderMc < 20)
- areamonster "070-1", 77, 20, 127, 100, "", 1141, 20-$@UnderMc, "HW2020 Mobs::OnDeath2";
-
- set $@UnderMc, mobcount("070-1", "HW2020 Mobs::OnDeath3")+1;
- if ($@UnderMc < 20)
- areamonster "070-1", 130, 20, 170, 100, "", 1141, 20-$@UnderMc, "HW2020 Mobs::OnDeath3";
-
- // TYPE 1140, TENGU
- set $@UnderMc, mobcount("070-1", "HW2020 Mobs::OnDeath4")+1;
- if ($@UnderMc < 20)
- areamonster "070-1", 20, 20, 75, 100, "", 1140, 20-$@UnderMc, "HW2020 Mobs::OnDeath4";
-
- set $@UnderMc, mobcount("070-1", "HW2020 Mobs::OnDeath5")+1;
- if ($@UnderMc < 20)
- areamonster "070-1", 77, 20, 127, 100, "", 1140, 20-$@UnderMc, "HW2020 Mobs::OnDeath5";
-
- set $@UnderMc, mobcount("070-1", "HW2020 Mobs::OnDeath6")+1;
- if ($@UnderMc < 20)
- areamonster "070-1", 130, 20, 170, 100, "", 1140, 20-$@UnderMc, "HW2020 Mobs::OnDeath6";
-
- // TYPE 1143, SLAYER
- set $@UnderMc, mobcount("070-1", "HW2020 Mobs::OnDeath7")+1;
- if ($@UnderMc < 20)
- areamonster "070-1", 20, 20, 75, 100, "", 1143, 20-$@UnderMc, "HW2020 Mobs::OnDeath7";
-
- set $@UnderMc, mobcount("070-1", "HW2020 Mobs::OnDeath8")+1;
- if ($@UnderMc < 20)
- areamonster "070-1", 77, 20, 127, 100, "", 1143, 20-$@UnderMc, "HW2020 Mobs::OnDeath8";
-
- set $@UnderMc, mobcount("070-1", "HW2020 Mobs::OnDeath9")+1;
- if ($@UnderMc < 20)
- areamonster "070-1", 130, 20, 170, 100, "", 1143, 20-$@UnderMc, "HW2020 Mobs::OnDeath9";
-
- // GUARDIANS
- set $@UnderMc, mobcount("070-1", "HW2020 Mobs::OnDeath10")+1;
- if ($@UnderMc < 3)
- areamonster "070-1", 132, 30, 140, 36, "", 1147, 3-$@UnderMc, "HW2020 Mobs::OnDeath10";
-
- set $@UnderMc, mobcount("070-1", "HW2020 Mobs::OnDeath11")+1;
- if ($@UnderMc < 1)
- areamonster "070-1", 134, 32, 135, 34, "", 1146, 1, "HW2020 Mobs::OnDeath10";
-
- /////////////////////////////////////////////////////////////////////////
- // Tulimshar Controller
-
- // Done
- set $@UnderMc, 0;
- end;
-
-// Labels
-OnDeath0:
- end;
-OnDeath1:
- end;
-OnDeath2:
- end;
-OnDeath3:
- end;
-OnDeath4:
- end;
-OnDeath5:
- end;
-OnDeath6:
- end;
-OnDeath7:
- end;
-OnDeath8:
- end;
-OnDeath9:
- end;
-OnDeath10:
- end;
-OnDeath11:
- end;
-OnDeath12:
- end;
-
-OnTimer30000:
- // Check every JackO
- set $@HW2020_CNT, 0;
- set $@JACKOID, 0; callfunc "HocusJackO";
- set $@JACKOID, 1; callfunc "HocusJackO";
- set $@JACKOID, 2; callfunc "HocusJackO";
- set $@JACKOID, 3; callfunc "HocusJackO";
- set $@JACKOID, 4; callfunc "HocusJackO";
- set $@JACKOID, 5; callfunc "HocusJackO";
- set $@JACKOID, 6; callfunc "HocusJackO";
- set $@JACKOID, 7; callfunc "HocusJackO";
- set $@JACKOID, 8; callfunc "HocusJackO";
- set $@JACKOID, 9; callfunc "HocusJackO";
- set $@JACKOID, 10; callfunc "HocusJackO";
- set $@JACKOID, 11; callfunc "HocusJackO";
- set $@JACKOID, 12; callfunc "HocusJackO";
-
- // Check if portal is to be active
- if ($@HW2020_CNT >= 13)
- goto L_Active;
-
- // Janitor
- set $@HW2020_CNT, 0;
- initnpctimer;
- end;
-
-L_Active:
- mapannounce "003-1", "##1There is a loud sound coming from the Bazar.##0" , 0;
- enablenpc "#HW2020Bazar";
- stopnpctimer;
- end;
-
-// Misc functions
-OnStopThere:
- if (getx() > 66 || gety() > 62)
- warp "003-1", 44, 61;
- sendcollision "003-1", 1, 42, 62, 46, 64;
- end;
-
-OnReward:
- set $@HW2020_HOCUS, 4;
- mes "[Jande]";
- mes "Jande was rescued. Numa will take care of him until he recovers.";
- mes "He struggled for words, but the time he spent there did a number on him.";
- mes "";
- mes "What Jande found out? Where is Zax De'Kagen?";
- next;
- mes ".:: DOOMSDAY ACT 5: THE FINAL BATTLE ::.";
- mes "---- ----";
- mes "INTERLUDE III: RESCUING JANDE";
- mes "";
- mes "Continues in ##BOctober 24th, 17:30 UTC##b";
- mes "##1The Final Snapshot will happen at October 31st.##0";
- next;
- // Reward
- set @rand, rand(7);
- if (@rand == 0)
- getitem "Eyepatch", 1; // Classic from HW and Christmas (10% chance)
- if (@rand == 1)
- getitem "MoubooHead", 1; // Replaced from: Circlet
- if (@rand == 2)
- getitem "Goggles", 1;
- if (@rand == 3)
- getitem "LeatherGoggles", 1;
- if (@rand == 4)
- getitem "SailorHat", 1; // Replaced from: Pirate Hat (Rarity)
- if (@rand == 5)
- getitem "SkullMask", 1;
- if (@rand == 6)
- getitem "FaceMask", 1; // Actually Christmas
- warp "009-1", 52, 40;
- message strcharinfo(0), "Numa : Thanks for helping. I know it is not much, but here is a reward for you.";
- close;
-
-}
-
-
-////////////////////////////////////////////////
-// Return gate
-003-1,142,18,0|script|To Underworld|400,1,0
-{
- end;
-OnTouch:
- if ($DOOMSDAY != 3) end;
- if ($DOOMSDAY_TJANDE == 1) end;
- if (!$@halloween_time) end;
-
- warp "070-1", 134, 30;
- close;
-
-OnInit:
- if ($DOOMSDAY != 3)
- disablenpc "To Underworld";
- end;
-}
-
-
-////////////////////////////////////////////////
-003-1,44,64,0|script|#HW2020ActionLess|400,3,0
-{
- end;
-OnTouch:
- if ($@HW2020_HOCUS == 2 || $@HW2020_HOCUS == 3)
- warp "070-1", 0, 0;
- end;
-}
-
-003-1,44,40,0|script|#HW2020Bazar|424,0,0
-{
- close;
-
-OnTouch:
- if ($@HW2020_HOCUS == 0)
- goto L_Ambush;
- if ($@HW2020_HOCUS == 1)
- end;
- if ($@HW2020_HOCUS == 2)
- goto L_Check;
- if ($@HW2020_HOCUS == 3)
- end;
- // GM Special Menu
- if (GM < G_GM)
- warp "009-1", 52, 40;
- if (GM < G_GM)
- end;
- goto L_GMMenu;
-
-// GM Menu
-L_GMMenu:
- mes "This event is already over.";
- mes "However, you are a Game Master.";
- mes "Do you want to allow the battle to happen again?";
- next;
- menu
- "No, I was trying to get to Hurns", L_GMNo,
- "YES, BEGIN THE AMBUSH", L_GMYes,
- "No, it was an accident.", L_GMCancel;
-
-L_GMYes:
- set $@HW2020_HOCUS, 0;
- gmlog strcharinfo(0) + " has reset Halloween 2020 Battle.";
- mes "* BEEEEEEEP *";
- mes "##9(Talk to portal again to ambush)##0";
- close;
-
-L_GMNo:
- warp "009-1", 52, 40;
- close;
-
-L_GMCancel:
- close;
-
-// Main Event
-L_Ambush:
- set $@HW2020_HOCUS, 1;
- mapannounce "003-1", "What, did you thought it would be so easy?" , 0;
- addnpctimer 3000, "#HW2020Bazar::OnAmbush1";
- end;
-
-OnAmbush1:
- mapannounce "003-1", "Hahaha! I am the self-proclaimed sovereign of the underworld..." , 0;
- addnpctimer 3000, "#HW2020Bazar::OnAmbush2";
- end;
-
-OnAmbush2:
- mapannounce "003-1", "...THE LOST! Return to where you come from!!" , 0;
- // Boss and his shrooms
- monster "003-1", 44, 40, "", 1073, 1, "HW2020 Mobs::OnDeath1";
- areamonster "003-1", 20, 20, 60, 60, "", 1106, 12, "HW2020 Mobs::OnDeath2";
- // Collection of nearly every monster you saw thus far :>
- areamonster "003-1", 20, 25, 60, 40, "", 1096, 8, "HW2020 Mobs::OnDeath3";
- areamonster "003-1", 20, 25, 60, 40, "", 1036, 6, "HW2020 Mobs::OnDeath4";
- areamonster "003-1", 20, 20, 60, 35, "", 1103, 6, "HW2020 Mobs::OnDeath5";
- areamonster "003-1", 20, 20, 60, 35, "", 1045, 4, "HW2020 Mobs::OnDeath6";
- areamonster "003-1", 20, 20, 60, 30, "", 1022, 2, "HW2020 Mobs::OnDeath7";
- areamonster "003-1", 20, 20, 60, 30, "", 1075, 2, "HW2020 Mobs::OnDeath8";
- areamonster "003-1", 20, 20, 60, 40, "", 1074, 2, "HW2020 Mobs::OnDeath9";
- areamonster "003-1", 20, 20, 60, 40, "", 1124, 2, "HW2020 Mobs::OnDeath10";
- set $@HW2020_HOCUS, 2;
- areatimer 0, "003-1", 18, 18, 150, 100, 10, "HW2020 Mobs::OnStopThere";
- initnpctimer;
- end;
-
-L_Check:
- set @TulimMc, mobcount("003-1", "HW2020 Mobs::OnDeath1")+1;
- if (@TulimMc)
- goto L_Reaper;
-
- set @TulimMc, @TulimMc+mobcount("003-1", "HW2020 Mobs::OnDeath2")+1;
- set @TulimMc, @TulimMc+mobcount("003-1", "HW2020 Mobs::OnDeath3")+1;
- set @TulimMc, @TulimMc+mobcount("003-1", "HW2020 Mobs::OnDeath4")+1;
- set @TulimMc, @TulimMc+mobcount("003-1", "HW2020 Mobs::OnDeath5")+1;
- set @TulimMc, @TulimMc+mobcount("003-1", "HW2020 Mobs::OnDeath6")+1;
- set @TulimMc, @TulimMc+mobcount("003-1", "HW2020 Mobs::OnDeath7")+1;
- set @TulimMc, @TulimMc+mobcount("003-1", "HW2020 Mobs::OnDeath8")+1;
- set @TulimMc, @TulimMc+mobcount("003-1", "HW2020 Mobs::OnDeath9")+1;
- set @TulimMc, @TulimMc+mobcount("003-1", "HW2020 Mobs::OnDeath10")+1;
-
- if (@TulimMc)
- goto L_NotReady;
-
- goto L_Finish;
-
-L_Reaper:
- message strcharinfo(0), "The Lost : Hahaha! Don't you think I can't see you!";
- set @TulimMc, 0;
- end;
-
-L_NotReady:
- message strcharinfo(0), strcharinfo(0) + " : I can still count "+@TulimMc+" monsters which need to be defeated first.";
- set @TulimMc, 0;
- end;
-
-L_Finish:
- set $@HW2020_HOCUS, 3;
- announce "Doomsday : Jande has been rescued from the Underworld." , 0;
- mapannounce "003-1", "The Lost : To be defeated... You should all get lost here forever..." , 0;
- areatimer 0, "003-1", 18, 18, 66, 62, 2000, "HW2020 Mobs::OnReward";
- stopnpctimer;
- end;
-
-OnInit:
- disablenpc "#HW2020Bazar";
- end;
-
-// Players defeated? :(
-OnTimer5000:
- if (getmapusers("003-1") < 1)
- goto L_Janitor;
- initnpctimer;
- end;
-
-L_Janitor:
- killmonster "003-1", "All";
- set $@HW2020_HOCUS, 0;
- cleararray $@HW2020_SLAIN, 0, 20;
- cleararray $@HW2020_TIMER, 0, 20;
- enablenpc "JackO#Tybalt";
- enablenpc "JackO#Nicolas";
- enablenpc "JackO#Elanore";
- enablenpc "JackO#Aisha";
- enablenpc "JackO#Nina";
- enablenpc "JackO#Ian";
- enablenpc "JackO#Luca";
- enablenpc "JackO#Ekinu";
- enablenpc "JackO#Ryan";
- enablenpc "JackO#Neko";
- enablenpc "JackO#Ishi";
- enablenpc "JackO#Sandra";
- enablenpc "JackO#Vincent";
- disablenpc strnpcinfo(0);
- stopnpctimer;
- end;
-}
-
-////////////////////////////////////////////////
-// Hocus Campaign Main Function
-// HocusCampaign( @JACKOID )
-// Use getmap(), getx() and gety() for spawn centering
-// OnBegin:
-// $@HW2020_SLAIN[ JACKOID ] = False
-// $@HW2020_TIMER[ JACKOID ] = gettimetick(2)
-// Have HW2020 Mobs timer controlling all of them (runs every minute for expire)
-// OnFinish:
-// $@HW2020_SLAIN[ JACKOID ] = True
-// Timer NOT updated!!
-function|script|HocusCampaign
-{
- if (@JACKOID < 1)
- goto L_Return;
-
- set @JACKOID, @JACKOID-1;
-
- if ($@HW2020_TIMER[@JACKOID] > gettimetick(2))
- goto L_Check;
-
- mes "[Jack O]";
- mes "Hohoho... I am the JackO who curses this lost soul.";
- mes "Do you want to free this person? Defeat meeeeee....";
- next;
- mes "[Jack O]";
- mes "Hohoho... Prove your worth, defeat meeeeee....";
- mes "Slay all my minions, can you prove yourself to meeeeee....?";
- next;
- mes "##3.:: Mission Goals ::.##0";
- mes "1. Defeat all monsters spawned by JackO";
- mes "2. Talk to JackO after this to lift the curse";
- mes "3. Once all 13 NPCs curse is lifted, go to ?????";
- mes "";
- mes "##1Time Limit: 30 minutes since first JackO monster spawn.";
- next;
- menu
- "Bring it on!", L_Begin,
- "Not now!", L_Abort;
-
-L_Begin:
- if ($@HW2020_TIMER[@JACKOID] > gettimetick(2))
- goto L_Return;
-
- // Assign timer, set JackO to ACTIVE
- set $@HW2020_SLAIN[@JACKOID], 0;
- set $@HW2020_TIMER[@JACKOID], gettimetick(2)+1800;
-
- // Define mob id
- if (@JACKOID % 8 == 0)
- set @mobID, 1096; // Soul Snake
- if (@JACKOID % 8 == 1)
- set @mobID, 1036; // Zombie
- if (@JACKOID % 8 == 2)
- set @mobID, 1103; // Witch Guard
- if (@JACKOID % 8 == 3)
- set @mobID, 1045; // Fallen
- if (@JACKOID % 8 == 4)
- set @mobID, 1022; // JackO
- if (@JACKOID % 8 == 5)
- set @mobID, 1075; // Stalker
- if (@JACKOID % 8 == 6)
- set @mobID, 1074; // Red Bone
- if (@JACKOID % 8 == 7)
- set @mobID, 1124; // Wight
-
- // Define mob amount
- set @mobAM, 8; // Default
- if (@JACKOID % 8 == 0)
- set @mobAM, 12; // Soul Snake must be more
- if (@JACKOID % 8 >= 4)
- set @mobAM, 6; // Stalker, JackO, Red and Wigh must be less
-
- // Spawn the Monsters
- areamonster "003-1", getx()-10, gety()-10, getx()+10, gety()+10, "", @mobID, @mobAM, "HW2020 Mobs::OnDeath"+@JACKOID;
-
- // Announce
- mapannounce "003-1", "JackO : Hohoho... You cannot defeat meeeee!" , 0;
-
- // Clear temporary variables
- set @mobID, 0;
- set @mobAM, 0;
- close2;
- return;
-
-L_Abort:
- close2;
- return;
-
-L_Check:
- // Count Monsters
- set @TulimMc, mobcount("003-1", "HW2020 Mobs::OnDeath"+@JACKOID)+1;
- if (@TulimMc)
- goto L_Information;
-
- // Disable JackO here, the script will catch that
- set $@HW2020_SLAIN[@JACKOID], 1;
-
- mes "[JackO]";
- mes "Hohoho... We'll meet againnnnnnnn!";
- donpcevent "HW2020 Mobs::OnTimer30000";
- close2;
- return;
-
-L_Information:
- message strcharinfo(0), "JackO : Hohoho... Still "+@TulimMc+" monsters alive... Defeat meeeeee.....!";
- set @TulimMc, 0;
- return;
-
-L_Return:
- return;
-
-}
-
-////////////////////////////////////////////////
-// JackOs (13 JackOs)
-003-1,26,73,0|script|JackO#Tybalt|133
-{
- callfunc "PCtoNPCRange";
- if(@npc_check) end;
- set @JACKOID, 1;
- callfunc "HocusCampaign";
- if ($@HW2020_SLAIN[@JACKOID])
- disablenpc strnpcinfo(0);
- set @JACKOID, 0;
- close;
-}
-
-003-1,101,31,0|script|JackO#Nicolas|133
-{
- callfunc "PCtoNPCRange";
- if(@npc_check) end;
- set @JACKOID, 2;
- callfunc "HocusCampaign";
- if ($@HW2020_SLAIN[@JACKOID])
- disablenpc strnpcinfo(0);
- set @JACKOID, 0;
- close;
-}
-
-003-1,38,66,0|script|JackO#Elanore|133
-{
- callfunc "PCtoNPCRange";
- if(@npc_check) end;
- set @JACKOID, 3;
- callfunc "HocusCampaign";
- if ($@HW2020_SLAIN[@JACKOID])
- disablenpc strnpcinfo(0);
- set @JACKOID, 0;
- close;
-}
-
-003-1,56,70,0|script|JackO#Aisha|133
-{
- callfunc "PCtoNPCRange";
- if(@npc_check) end;
- set @JACKOID, 4;
- callfunc "HocusCampaign";
- if ($@HW2020_SLAIN[@JACKOID])
- disablenpc strnpcinfo(0);
- set @JACKOID, 0;
- close;
-}
-
-003-1,119,33,0|script|JackO#Nina|133
-{
- callfunc "PCtoNPCRange";
- if(@npc_check) end;
- set @JACKOID, 5;
- callfunc "HocusCampaign";
- if ($@HW2020_SLAIN[@JACKOID])
- disablenpc strnpcinfo(0);
- set @JACKOID, 0;
- close;
-}
-
-003-1,32,30,0|script|JackO#Ian|133
-{
- callfunc "PCtoNPCRange";
- if(@npc_check) end;
- set @JACKOID, 6;
- callfunc "HocusCampaign";
- if ($@HW2020_SLAIN[@JACKOID])
- disablenpc strnpcinfo(0);
- set @JACKOID, 0;
- close;
-}
-
-003-1,113,43,0|script|JackO#Luca|133
-{
- callfunc "PCtoNPCRange";
- if(@npc_check) end;
- set @JACKOID, 7;
- callfunc "HocusCampaign";
- if ($@HW2020_SLAIN[@JACKOID])
- disablenpc strnpcinfo(0);
- set @JACKOID, 0;
- close;
-}
-
-003-1,47,79,0|script|JackO#Ekinu|133
-{
- callfunc "PCtoNPCRange";
- if(@npc_check) end;
- set @JACKOID, 8;
- callfunc "HocusCampaign";
- if ($@HW2020_SLAIN[@JACKOID])
- disablenpc strnpcinfo(0);
- set @JACKOID, 0;
- close;
-}
-
-003-1,38,79,0|script|JackO#Ryan|133
-{
- callfunc "PCtoNPCRange";
- if(@npc_check) end;
- set @JACKOID, 9;
- callfunc "HocusCampaign";
- if ($@HW2020_SLAIN[@JACKOID])
- disablenpc strnpcinfo(0);
- set @JACKOID, 0;
- close;
-}
-
-003-1,53,45,0|script|JackO#Neko|133
-{
- callfunc "PCtoNPCRange";
- if(@npc_check) end;
- set @JACKOID, 10;
- callfunc "HocusCampaign";
- if ($@HW2020_SLAIN[@JACKOID])
- disablenpc strnpcinfo(0);
- set @JACKOID, 0;
- close;
-}
-
-003-1,54,51,0|script|JackO#Ishi|133
-{
- callfunc "PCtoNPCRange";
- if(@npc_check) end;
- set @JACKOID, 11;
- callfunc "HocusCampaign";
- if ($@HW2020_SLAIN[@JACKOID])
- disablenpc strnpcinfo(0);
- set @JACKOID, 0;
- close;
-}
-
-003-1,71,61,0|script|JackO#Sandra|133
-{
- callfunc "PCtoNPCRange";
- if(@npc_check) end;
- set @JACKOID, 12;
- callfunc "HocusCampaign";
- if ($@HW2020_SLAIN[@JACKOID])
- disablenpc strnpcinfo(0);
- set @JACKOID, 0;
- close;
-}
-
-003-1,136,35,0|script|JackO#Vincent|133
-{
- callfunc "PCtoNPCRange";
- if(@npc_check) end;
- set @JACKOID, 13;
- callfunc "HocusCampaign";
- if ($@HW2020_SLAIN[@JACKOID])
- disablenpc strnpcinfo(0);
- set @JACKOID, 0;
- close;
-}
-
-057-1,126,63,0|script|#HW2020Shroom|400
-{
- // Halloween only
- if (!$@halloween_time) end;
- callfunc "PCtoNPCRange";
- if(@npc_check) end;
- mes "This is a strange mushroom.";
- mes "Seeing it makes you feel like saying";
- mes "##B" + get(.invocation$, "alonsialonso") + "##b";
- next;
- mes "This never happened before. Must be halloween.";
- mes "I should be careful, it could be related to [@@666|@@]!";
- next;
- mes "##9HINT: Use the spell only in the precise area of interest.##0";
- mes "##9Side effects of spell misuse includes and are not limited to:##0";
- mes "##9death, warp, heal and/or item loss.##0";
- mes "";
- mes "##9The spell will cease to function once Halloween is over.##0";
- close;
-}
-
-070-1,134,30,0|script|#HW2020Chapel|400
-{
- // Halloween only
- if (!$@halloween_time) end;
- callfunc "PCtoNPCRange";
- if(@npc_check) end;
- mes "Past this door lies the crypt where Tormenta was supposed to be.";
- mes "I really should not lock myself up in a place where I cannot leave.";
- next;
- mes "It should be safe to try the following on the door:";
- mes "##B" + get(.invocation$, "alonsialonso") + "##b";
- // NOTE: This door should lead to 070-3, Abyss/Reaper Room.
- // Players from TMW Hardcore would know.
- close;
-}
-
diff --git a/world/map/npc/annuals/halloween/munro.txt b/world/map/npc/annuals/halloween/munro.txt
deleted file mode 100644
index cbbbf233..00000000
--- a/world/map/npc/annuals/halloween/munro.txt
+++ /dev/null
@@ -1,50 +0,0 @@
-// Part of Annual halloween
-026-1,24,37,0|script|Munro|183
-{
- callfunc "HalloweenCheckOld";
- callfunc "TrickOrTreatTally";
- if (($@halloween_time == $@halloween_reward_time) && (@npc_tally >= $@halloween_charm_count) && !(HALLOWEENTIME & $@halloween_got_charm_reward))
- goto L_Halloween;
- goto L_NoReward;
-
-L_NoReward:
- mes "[Munro]";
- mes "\"Greetings mortal.\"";
- next;
- mes "\"Once again we come to that time of year when the veil is thin\"";
- next;
- mes "\"All those who have passed on can part the veil to return.\"";
- next;
- mes "\"A time to celebrate our ancestors and chase evil away.\"";
- next;
- mes "\"Celebrate the holiday with me and I will reward you later.\"";
- goto L_Exit;
-
-L_Halloween:
- mes "[Munro]";
- mes "\"You have shown to have the Halloween spirit. Take this charm.\"";
- set HALLOWEENTIME, HALLOWEENTIME | $@halloween_got_charm_reward;
- getitem "SkeletonCharm",1;
- goto L_Exit;
-
-L_Exit:
- close;
-}
-
-function|script|SpawnMunro
-{
- if ($@halloween_time)
- goto L_EnableMunro;
- goto L_DisableMunro;
-
-L_EnableMunro:
- enablenpc "Munro";
- goto L_Return;
-
-L_DisableMunro:
- disablenpc "Munro";
- goto L_Return;
-
-L_Return:
- return;
-}
diff --git a/world/map/npc/annuals/halloween/trick_or_treat.txt b/world/map/npc/annuals/halloween/trick_or_treat.txt
deleted file mode 100644
index 10265382..00000000
--- a/world/map/npc/annuals/halloween/trick_or_treat.txt
+++ /dev/null
@@ -1,332 +0,0 @@
-// Halloween Annual
-// Authors: alastrim, enchilado, o11c, wushin
-// See config
-function|script|TrickOrTreat
-{
- callfunc "HalloweenCheckOld";
- if ($@halloween_time)
- goto L_Halloween;
- goto L_QuickReturn;
-
-L_Halloween:
- if ((gettimetick(2)-TUT_var < $@halloween_min_age) || (BaseLevel < $@halloween_min_level)) //player must be created at least 1 weeks ago
- goto L_QuickReturn;
- menu
- "Trick or Treat", L_HWQuest,
- "[Go to normal NPC dialog]", L_QuickReturn;
-
-L_HWQuest:
- set @mask, getequipid(equip_head);
- goto L_Begin;
-
-L_Begin:
- set @karma, (HALLOWEENTIME & 65535);
- if (@mask > 0)
- goto L_WearingMask;
- goto L_NoMask;
-
-L_WearingMask:
- // set the scare factor of the equipped mask
- set @mask_index, 0;
- set @scare_factor, 1;
- goto L_MaskLoop;
-
-L_MaskLoop:
- if ($@halloween_mask_IDs[@mask_index] == @mask)
- goto L_FoundMask;
- set @mask_index, @mask_index + 1;
- if ($@halloween_mask_IDs[@mask_index])
- goto L_MaskLoop;
- // not a mask in the list
- set @mask, 0;
- goto L_MaskDone;
-
-L_FoundMask:
- set @scare_factor, $@halloween_scare_factors[@mask_index];
- if (@mask != 616)
- goto L_MaskDone;
- mes "\"Aaargh... Gross! This is sick! I can't even look at your face...\"";
- goto L_MaskDone;
-
-L_MaskDone:
- set @mask_index, 0;
- // check if the mask is in the memory
- set @loop, 0;
- // Note: we don't handle remembered faces until they get their candy
- if (!@mask)
- goto L_MaskMemoryNo;
- // check if the mask is remembered
- goto L_MaskMemoryCheck;
-
-L_MaskMemoryCheck:
- set @tmp, $@halloween_maskmemory[8 * @halloween_npc_id + @loop];
- if (!@tmp)
- goto L_MaskMemoryNo;
- if (@tmp == @mask)
- goto L_MaskMemoryYes;
- set @loop, @loop + 1;
- if (@loop != $@halloween_memory_count)
- goto L_MaskMemoryCheck;
- goto L_MaskMemoryNo;
-
-L_MaskMemoryYes:
- // not necessarily true
- mes "\"I remember you, " + getitemlink(getequipid(equip_head)) + " person. No more treats for you!\"";
- goto L_Close;
-
-L_MaskMemoryNo:
- // player will probably get treats
- set @loop, 0;
- set @sweets_types, 0;
- goto L_Count_Sweets;
-
-L_Count_Sweets:
- if ($@halloween_sweets[@loop] == 0)
- goto L_Check_Inventory;
- if (countitem($@halloween_sweets[@loop]))
- set @sweets_types, @sweets_types + 1;
- set @loop, @loop + 1;
- goto L_Count_Sweets;
-
-L_Check_Inventory:
- getinventorylist;
- if (@inventorylist_count + (@loop - @halloween_invy) > 100)
- goto L_Full_Inventory;
- if (@mask)
- goto L_Check_Karma;
- // check if the player's face is remembered
- if (HALLOWEENTIME & (1 << (31 - @halloween_npc_id)))
- goto L_Remember_Face;
- goto L_Tricking_Trick_or_Treat;
-
-L_Check_Karma:
- // NPC Cheater detection starts after max NPCs hit
- if (rand($@halloween_num_npcs, 65535) <= @karma)
- goto L_Cheater;
- // NPC Cheater detection engages at 48 Trick or Treats
- if (@karma >= 48)
- goto L_Cheater;
- if (HALLOWEENTIME & $@halloween_got_big_reward)
- goto L_Tricking_Trick_or_Treat;
- // assert: @karma < $@halloween_num_npcs
- if (rand($@halloween_num_npcs - @karma))
- goto L_Tricking_Trick_or_Treat;
- mes "\"All this candy isn't healthy, here take this to have a break from it.\"";
- getitem $@halloween_big_reward[rand(getarraysize($@halloween_big_reward))], 1;
- set HALLOWEENTIME, HALLOWEENTIME | $@halloween_got_big_reward;
- // you get the big reward first, then the main treats
- // otherwise it would be too complicated, and/or possibly unfair
- goto L_Tricking_Trick_or_Treat;
-
-L_Cheater:
- mes "\"I recognize you despite your mask, you have been taking sweets you do not deserve.\"";
- if (@karma != 65535)
- set HALLOWEENTIME, HALLOWEENTIME + 1;
- goto L_Close;
-
-L_Remember_Face:
- // mes "You've been here before; I remember your face";
- mes "\"I remember your face, " + strcharinfo(0) + ". No more treats for you!\"";
- goto L_Close;
-
-L_Tricking_Trick_or_Treat:
- // moved above
- mes $@halloween_npc_names$[@halloween_npc_id];
- mes $@halloween_greetings$[@halloween_npc_id];
- next;
- // TODO: should we randomize these? (in a subsequent commit)
- menu
- $@halloween_trick_notscary$[@halloween_npc_id], L_Tricking_Notscary,
- $@halloween_trick_scary$[@halloween_npc_id], L_Tricking_Scary,
- $@halloween_trick_veryscary$[@halloween_npc_id], L_Tricking_Veryscary;
-
-L_Tricking_Notscary:
- mes $@halloween_npc_names$[@halloween_npc_id];
- mes $@halloween_react_notscary$[@halloween_npc_id];
- goto L_Tricking_Reward;
-
-L_Tricking_Scary:
- mes $@halloween_npc_names$[@halloween_npc_id];
- mes $@halloween_react_scary$[@halloween_npc_id];
- set @scare_factor, @scare_factor * 2;
- goto L_Tricking_Reward;
-
-L_Tricking_Veryscary:
- mes $@halloween_npc_names$[@halloween_npc_id];
- mes $@halloween_react_veryscary$[@halloween_npc_id];
- set @scare_factor, @scare_factor * 3;
- goto L_Tricking_Reward;
-
-L_Tricking_Reward:
- next;
- if (@karma >= 16)
- set @scare_factor, rand(@scare_factor / 2, @scare_factor);
- if (@karma >= 24)
- set @scare_factor, rand(@scare_factor / 3, @scare_factor);
- if (@scare_factor < 1)
- set @scare_factor, 1;
- goto L_Tricking_Reward_Loop;
-
-L_Tricking_Reward_Loop:
- set @random, rand($@halloween_sweets_num);
- setarray @getitem_ids, $@halloween_sweets[@random];
- setarray @getitem_counts, 1;
- callfunc "CheckInventory";
- if (@check_fail)
- set @scare_factor, 0;
- if (!@scare_factor)
- goto L_Tricking_End;
- // NOTE: it gives out one piece at a time, but can loop several times
- getitem $@halloween_sweets[@random], 1;
- set @scare_factor, @scare_factor - 1;
- goto L_Tricking_Reward_Loop;
-
-L_SetRememberFace:
- set HALLOWEENTIME, HALLOWEENTIME | (1 << (31 - @halloween_npc_id));
- goto L_Close;
-
-L_Tricking_End:
- mes $@halloween_npc_names$[@halloween_npc_id];
- mes "\"That should be enough sweets for you. Thanks for participating!\"";
- if (!@mask)
- goto L_SetRememberFace;
- // add the player's mask to the list
- set @loop, 7;
- goto L_SetRememberMask;
-
-L_SetRememberMask:
- set $@halloween_maskmemory[8 * @halloween_npc_id + @loop], $@halloween_maskmemory[8 * @halloween_npc_id + @loop - 1];
- set @loop, @loop - 1;
- if (@loop)
- goto L_SetRememberMask;
- set $@halloween_maskmemory[8 * @halloween_npc_id], @mask;
- set HALLOWEENTIME, HALLOWEENTIME + 1;
- goto L_Close;
-
-L_Full_Inventory:
- mes $@halloween_npc_names$[@halloween_npc_id];
- mes "\"You are trying to collect candy but you have no space to carry all the kinds of stuff that I have to offer! Please, save room for more stuff and come back.\"";
- goto L_Close;
-
-L_NoMask:
- mes $@halloween_npc_names$[@halloween_npc_id];
- mes "\"Hey " + strcharinfo(0) + ", are you trying to scare me with your face? Interesting! hahaha...\"";
- goto L_Close;
-
-L_Close:
- set @tmp, 0;
- set @mask, 0;
- set @karma, 0;
- set @loop, 0;
- set @menu, 0;
- set @halloween_npc_id, 0;
- return;
-
-L_QuickReturn:
- set @halloween_npc_id, 0;
- return;
-}
-function|script|TrickOrTreatTally
-{
- set @npc_loop, 0;
- set @npc_tally, 0;
- goto L_LoopCheck;
-
-L_LoopCheck:
- if (HALLOWEENTIME & (1 << (31 - @npc_loop)))
- set @npc_tally, (@npc_tally + 1);
- goto L_IncLoop;
-
-L_IncLoop:
- set @npc_loop, (@npc_loop + 1);
- if (@npc_loop >= 15)
- goto L_Return;
- goto L_LoopCheck;
-
-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|HalloweenCheckOld
-{
- if(HALLOWEENYEAR == $HALLOWEEN_TIME_KEY[5])
- goto L_Return;
- goto L_OldMatch;
-
-L_OldMatch:
- set HALLOWEENTIME, 0;
- set HALLOWEENYEAR, $HALLOWEEN_TIME_KEY[5];
- goto L_Return;
-
-L_Return:
- return;
-}
-function|script|HalloweenTree
-{
- mes "[Confused Tree]";
- if ((HALLOWEENTIME & 65535) > ($@halloween_num_npcs * 3))
- mes "\"Whoa slow down greedy, leave some candy for the reset of us!\"";
- if ((HALLOWEENTIME & 65535) > $@halloween_num_npcs)
- mes "\"I see you have ben enjoying trick or treating, I hope you don't get a stomach ache.\"";
- if ((HALLOWEENTIME & 65535) <= $@halloween_num_npcs)
- mes "\"I love halloween, wearing masks and going trick or treating is so much fun.\"";
- goto L_StartMenu;
-
-L_StartMenu:
- menu
- "Whats Halloween?", L_Explain,
- "Me too!", L_CheckDressed,
- "Meh, I like Christmas Better.", L_XmasBetter;
-
-L_Explain:
- mes "\"I've convinced some people throughout the world to help with trick or treating.\"";
- next;
- set @npc_check_loop, 0;
- goto L_NpcCheckLoop;
-
-L_NpcCheckLoop:
- mes $@halloween_npc_names$[@npc_check_loop];
- next;
- goto L_NpcCheckInc;
-
-L_NpcCheckInc:
- set @npc_check_loop, (@npc_check_loop + 1);
- if (@npc_check_loop >= getarraysize($@halloween_npc_names$))
- goto L_ContinueExplain;
- goto L_NpcCheckLoop;
-
-L_ContinueExplain:
- mes "\"Find each person and put on a mask then try to scare them.\"";
- next;
- mes "\"The scarier you are, the more treats you will be awarded.\"";
- next;
- mes "\"If you are really scary you could get a rare reward.\"";
- next;
- goto L_StartMenu;
-
-L_CheckDressed:
- set @head, getequipid(equip_head);
- set @chest, getequipid(equip_torso);
- set @leg, getequipid(equip_legs);
- set @random_mes$, "\" I like your costume.\"";
- if ((@head <= 0) && (@chest <= 0) && (@leg <= 0))
- set @random_mes$, "\"Birthday Suit, always a classic.\"";
- if ((@head == 615) && (@chest == 870))
- set @random_mes$, "\"How embrassing... we are wearing the same costume.\"";
- if ((@head == 617) || (@head == 622) || (@head == 621))
- set @random_mes$, "\"Yar, matey I see that.\"";
- if ((@head == 633) || (@head == 1205) || (@chest == 1183) || (@chest == 1184) || (@chest == 1185) || (@chest == 1186) || (@chest == 1187))
- set @random_mes$, "\"Your sense of humor offends me, it's way to early for that.\"";
- mes @random_mes$;
- goto L_Return;
-
-L_XmasBetter:
- mes "\"Bah, Humbug, Show your Halloween spirit! OOooooOooo\"";
- misceffect 302, strcharinfo(0);
- goto L_Return;
-
-L_Return:
- return;
-}
diff --git a/world/map/npc/annuals/tree_beard.txt b/world/map/npc/annuals/tree_beard.txt
deleted file mode 100644
index 8d24930c..00000000
--- a/world/map/npc/annuals/tree_beard.txt
+++ /dev/null
@@ -1,137 +0,0 @@
-// Annual Environment changes
-020-1,90,78,0|script|#GhostTreeOne|133
-{
- callfunc "HalloweenTree";
- close;
-}
-
-020-1,90,78,0|script|#Tree|380
-{
- end;
-}
-
-020-1,90,78,0|script|#XmasTree|379
-{
- end;
-}
-
-020-1,90,79,0|script|Present#1|386
-{
- callfunc "XmasStates";
- callfunc "XmasMainItemReward";
- close;
-}
-
-009-1,54,38,0|script|#GhostTreeTwo|133
-{
- callfunc "HalloweenTree";
- close;
-}
-
-009-1,54,38,0|script|#TreeNoSnow|394
-{
- end;
-}
-
-009-1,54,38,0|script|#XmasTreeNoSnow|381
-{
- end;
-}
-
-009-1,54,39,0|script|Present#2|386
-{
- callfunc "XmasStates";
- callfunc "XmasMainItemReward";
- close;
-}
-
-001-1,57,75,0|script|#GhostTreeThree|133
-{
- callfunc "HalloweenTree";
- close;
-}
-
-001-1,58,75,0|script|#PalmTree|384
-{
- end;
-}
-
-001-1,58,76,0|script|Present#3|386
-{
- callfunc "XmasStates";
- callfunc "XmasMainItemReward";
- close;
-}
-
-001-1,58,75,0|script|#XmasPalmTree|383
-{
- end;
-}
-
-function|script|SpawnMobs
-{
- donpcevent "XmasSpawnManager::OnCommandSpawnStart";
- 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
-{
- disablenpc "#Tree";
- disablenpc "#TreeNoSnow";
- disablenpc "#PalmTree";
- disablenpc "#GhostTreeOne";
- disablenpc "#GhostTreeTwo";
- disablenpc "#GhostTreeThree";
- disablenpc "#XmasTree";
- disablenpc "#XmasTreeNoSnow";
- disablenpc "#XmasPalmTree";
-
- if ($@xmas_time)
- goto L_XmasTree;
- if ($@halloween_time)
- goto L_HalloweenLive;
- goto L_Tree;
-
-L_XmasTree:
- enablenpc "#XmasTree";
- enablenpc "#XmasTreeNoSnow";
- enablenpc "#XmasPalmTree";
- goto L_Return;
-
-L_HalloweenLive:
- enablenpc "#GhostTreeOne";
- enablenpc "#GhostTreeTwo";
- enablenpc "#GhostTreeThree";
- goto L_Return;
-
-L_Tree:
- enablenpc "#Tree";
- enablenpc "#TreeNoSnow";
- enablenpc "#PalmTree";
- goto L_Return;
-
-L_Return:
- return;
-}
diff --git a/world/map/npc/annuals/xmas/2020.txt b/world/map/npc/annuals/xmas/2020.txt
deleted file mode 100644
index 0490d1a7..00000000
--- a/world/map/npc/annuals/xmas/2020.txt
+++ /dev/null
@@ -1,835 +0,0 @@
-// The Mana World Scripts
-// Christmas 2020
-// (C) Jesusalva, Hocus, Ledmitz, toams, monwarez, jak1, Hello=) et. al., 2020
-// Licensed under the GPLv2 or later
-// XXmas is not a typo, "XX" is twenty and the year is twenty-twenty.
-
-034-1,0,0,0|script|XXmas0341|32767
-{
- end;
-
-OnHit2:
- goto OnHit;
-
-OnHit:
- // Not Christmas yet
- if (!$@xmas_time)
- end;
- // Reward time
- if ($@xmas_time == $@xmas_reward_time)
- end;
- // player must be created at least two weeks ago
- if ((BaseLevel < 30) || (gettimetick(2) - TUT_var < 2*7*86400))
- end;
-
- // Not equipped to hunt Grinchboos
- //if (getequipid(equip_arrow) != 5260)
- // end;
- if (getequipid(equip_hand1) != 5261)
- end;
-
- // tell the spells they were discharged
- // XXX: maybe we could make it do area damage when you discharge (release your energy all of a sudden)
- addtimer 0, "::OnDischarge"; // seeks OnDischarge in ALL npcs
-
- // Magic cheat
- if (@wandspell[4])
- end;
- if (@ingravspell[2])
- end;
- if (@chizaspell[2])
- end;
- if (@flarspell[2])
- end;
- if (@phlexspell[3])
- end;
- if (@chipchipspell[2])
- end;
- if (@upmarmuspell[1])
- end;
-
- // By last, check for Arrow Hail
- set @nearby, 0;
- foreach 1, getmap(), @away[0] - 14, @away[1] - 14, @away[0] + 14, @away[1] + 14,
- strnpcinfo(0) + "::OnNearbyNpc";
- if (@nearby)
- end;
-
- // Grinchboo slain
- set XMAS2020, XMAS2020 + 1;
- set $XMAS2020_BOO, $XMAS2020_BOO + 1;
- set @loop, 0;
- set @rank, 0;
- goto L_MaybeInsertNext;
-
-L_MaybeInsertNext:
- if (XMAS2020 > $Record_XXmas_Kills[@rank])
- goto L_InsertScore;
- // you already had a better score
- if (strcharinfo(0) == $Record_XXmas_Name$[@rank])
- goto L_Reward1;
- set @rank, @rank + 1;
- if (@rank == MAX_HIGH_SCORES)
- goto L_Reward1;
- goto L_MaybeInsertNext;
-
-L_InsertScore:
- set @loop, @rank;
- goto L_FindLastScore;
-
-L_FindLastScore:
- // comment this out to allow the player to be in the list more than once
- // though actually, it might be better just to assume the list is full
- if (strcharinfo(0) == $Record_XXmas_Name$[@loop])
- goto L_MoveStuff;
-
- set @loop, @loop + 1;
- if (@loop == MAX_HIGH_SCORES)
- goto L_MoveStuff;
- goto L_FindLastScore;
-
-L_MoveStuff:
- if (@loop == @rank)
- goto L_FinallyInsertMe;
- set $Record_XXmas_Kills[@loop], $Record_XXmas_Kills[@loop - 1];
- set $Record_XXmas_Name$[@loop], $Record_XXmas_Name$[@loop - 1];
- set $Record_XXmas_Date$[@loop], $Record_XXmas_Date$[@loop - 1];
- set @loop, @loop - 1;
- goto L_MoveStuff;
-
-L_FinallyInsertMe:
- set $Record_XXmas_Kills[@rank], XMAS2020;
- set $Record_XXmas_Name$[@rank], strcharinfo(0);
- callfunc "time_stamp";
- set $Record_XXmas_Date$[@rank], @ts_date$ + " " + @ts_time$;
- set @ts_date$, "";
- set @ts_time$, "";
- goto L_Reward1;
-
-L_Reward1:
- // Maybe we should tell you how many you purified?
- if (XMAS2020 % 10 == 0 || XMAS2020 == 1)
- goto L_Warning;
- end;
-
-L_Warning:
- message strcharinfo(0), "Grinchboos purified: "+XMAS2020;
- end;
-
-OnTimer15000:
- areamonster "034-1", 20, 20, 160, 110, "", 1162, 18, "XXmas0341::OnHit2";
- // Only happens until :15, and every 15 minutes, for a total of 60 cycles.
- if (gettime(2) > 15)
- end;
- initnpctimer;
- end;
-
-L_Abort:
- end;
-
-OnClock1800:
- if (!$@xmas_time)
- goto L_Abort;
- if ($@xmas_time == $@xmas_reward_time)
- goto L_Abort;
- initnpctimer;
- // WARNING: Do not duplicate!!
- announce "Santa : Ho ho ho, I see a huge movement by the grinchboos!", 0;
- end;
-
-OnClock1830:
- killmonster "034-1", "XXmas0341::OnHit2";
- stopnpctimer;
- end;
-
-// Additional timers
-OnClock0000:
- goto OnClock1800;
-OnClock0030:
- goto OnClock1830;
-OnClock0600:
- goto OnClock1800;
-OnClock0630:
- goto OnClock1830;
-
-OnNearbyNpc:
- explode .@nearby$[0], strnpcinfo(0,@target_id), "#";
- if(.@nearby$[0] == "arrow-hail" || .@nearby$[1] == "arrow-hail")
- set @nearby, @nearby + 1;
- end;
-}
-
-// Scatter the grinchboos
-// Nivalis
-034-1,0,0,0,0|monster|Grinchboo|1162,14,100000ms,30000ms,XXmas0341::OnHit
-//030-1,0,0,0,0|monster|Grinchboo|1162,7,100000ms,30000ms,XXmas0341::OnHit
-//031-1,0,0,0,0|monster|Grinchboo|1162,2,100000ms,30000ms,XXmas0341::OnHit
-033-1,0,0,0,0|monster|Grinchboo|1162,5,100000ms,30000ms,XXmas0331::OnHit
-//019-1,0,0,0,0|monster|Grinchboo|1162,2,100000ms,30000ms,XXmas0341::OnHit
-// Thermin
-//045-1,0,0,0,0|monster|Grinchboo|1162,10,100000ms,30000ms,XXmas0341::OnHit
-046-1,0,0,0,0|monster|Grinchboo|1162,8,100000ms,30000ms,XXmas0461::OnHit
-047-1,0,0,0,0|monster|Grinchboo|1162,6,100000ms,30000ms,XXmas0471::OnHit
-
-// Bring Santa back!!! With speeches from all previous events because I'M LAZY
-// Same place as he was in 2009, instead of his room in 030-2,197,62
-020-1,78,85,0|script|Santa|105
-{
- if (Sex)
- set @honorific$, "Young Hero";
- if (!Sex)
- set @honorific$, "Young Heroine";
-
-
- // Not Christmas yet
- if (!$@xmas_time)
- goto L_PreXmas;
- // Past Christmas
- if ($@xmas_time == $@xmas_reward_time)
- goto L_Reward;
- // Already equipped, so...
- if (countitem("SnowLauncher") > 0)
- goto L_Doing;
-
- // Begin exactly like it was in 2009
- mes "[Santa Claus]";
- mes "\"ho-hum ho-hum ho-hum, I'm sorry, " + @honorific$ + " Not really in the Christmas spirit.";
- mes "That Evil Jack Frost has stolen all the Christmas ornaments!";
- mes "He will never get off the Naughty List!";
- mes "How can we have Christmas without a proper Christmas tree?\"";
- mes "\"The Elves are too depressed to work";
- mes "Christmas will be ruined!\"";
- next;
- // But this is not 2009...
- mes "[Santa Claus]";
- mes "\"OOPS! That was Christmas 2009! We are in 2020, how could I forget? Ho! Ho! Ho!\"";
- next;
- mes "[Santa Claus]";
- mes "\"But still! Can you believe Jack Frost turned all my Reinboos into Grinchboos?! Christmas will be ruined!\"";
- next;
- mes "[Santa Claus]";
- mes "\"Say, Why don't you help me?";
- mes "In fact, You are just the " + @honorific$ + " I am looking for!\"";
- mes "\"What do you say, will you help save Christmas?\"";
- next;
- menu
- "I won't.", L_Close,
- "How can I help?", L_Help;
-
-L_Help:
- // player must be created at least two weeks ago
- if ((BaseLevel < 30) || (gettimetick(2) - TUT_var < 2*7*86400))
- goto L_Young;
- mes "[Santa Claus]";
- mes "\"Oh that is excellent news!";
- mes "Thank you.\"";
- mes "##9Santa shakes your hand with delight.##0";
- next;
- mes "[Santa Claus]";
- mes "\"You see, if you hit the grinchboos with snowballs, they can be purified! (Don't ask me how it works, Christmas is weird this year!)\"";
- next;
- mes "[Santa Claus]";
- mes "\"However, you cannot just throw snowballs at them. But I have the ideal tool for this task!\"";
- next;
- mes "[Santa Claus]";
- mes "\"You can use this super ##BCandy-Caned Anti-Grinch-Rifle 2020â„¢##b! Hit as many as you can! Ho ho ho!\"";
- menu
- "Many thanks, Santa!", L_Item,
- "I already have one, I'll get to work!", L_Close;
-
-L_Young:
- mes "[Santa]";
- mes "\"That's a very friendly offer! But I don't think we need any help.\"";
- goto L_Close;
-
-L_Item:
- getinventorylist;
- if (@inventorylist_count == 100) goto L_Full;
- getitem "SnowLauncher", 1;
- mes "[Santa Claus]";
- mes "\"Ho Ho Ho Merry Christmas!\"";
- close;
-
-L_Close:
- close;
-
-L_Full:
- mes "[Santa Claus]";
- mes "\"Your backpack seems to be full. You should get rid of some unused stuff before you get my gifts, or maybe try one super resistant red bag, my personal favorite! Hoh-hoh!\"";
- close;
-
-L_PreXmas:
- mes "[Santa Claus]";
- mes "\"Ho, Ho... See you later " +@honorific$+ "!\"";
- close;
-
-L_ShowRecord:
- mes "[Santa Claus]";
- mes "You have purified "+XMAS2020+" Grinchboos thus far.";
- mes "All players have purified "+$XMAS2020_BOO+" Grinchboos in total.";
- set @rank, 0;
- set @loop, 0;
- goto L_ShowNextRecord;
-
-L_ShowNextRecord:
- if ($Record_XXmas_Kills[@loop] == 0)
- goto L_Close;
- mes (@loop + 1) + " - " + $Record_XXmas_Name$[@loop] + " - " + $Record_XXmas_Kills[@loop] + " Grinchboos saved at " + $Record_XXmas_Date$[@loop];
- set @loop, @loop + 1;
- if (MAX_HIGH_SCORES > 4 && (@loop % 5) == 0 && $Record_XXmas_Kills[@loop] > 0)
- goto L_NextShowNextRecord;
- goto L_ShowNextRecord;
-
-L_NextShowNextRecord:
- next;
- goto L_ShowNextRecord;
-
-L_Doing:
- mes "[Santa]";
- mes "\"Hello " + strcharinfo(0) + ". I heard about your efforts to help. I'm very happy to hear that.\"";
- next;
- mes "[Santa]";
- mes "\"Be careful at 18:00, 00:00 and 06:00, those are the most active times for my reinboos.\"";
- next;
- menu
- "I'll go back to work.", L_Close,
- "What are current highscores?", L_ShowRecord;
-
-L_Done:
- mes "[Santa]";
- mes "\"Hello " + strcharinfo(0) + ". I heard about your efforts to help. I'm very happy to hear that.\"";
- next;
- menu
- "Santa, you are the best!", L_Close,
- "What were the highscores?", L_ShowRecord;
-
-L_Reward:
- if (XMAS2020 <= 0)
- goto L_Done;
- mes "[Santa Claus]";
- mes "\"You are so generous! I believe I can give you one of the hats from this bag. I know you like these silly hats. Yes, Santa knows this kind of thing... Ho-Ho-Ho! Put your hand here and pick one hat...\"";
- next;
- getinventorylist;
- if (@inventorylist_count > 95) goto L_Full;
- mes "You have purified "+XMAS2020+" Grinchboos thus far.";
- mes "All players have purified "+$XMAS2020_BOO+" Grinchboos in total.";
- set @rank, 0;
- set @loop, 0;
- goto L_FindRank;
-
-L_FindRank:
- if (strcharinfo(0) == $Record_XXmas_Name$[@rank])
- goto L_Continue;
- set @rank, @rank + 1;
- if (@rank == MAX_HIGH_SCORES)
- goto L_Continue;
- goto L_FindRank;
-
-L_Continue:
- getinventorylist;
- if (@inventorylist_count > 95) goto L_Full;
- set XMAS2020, 0;
- setarray @oldstock$, "PlushMouboo", "StickReinboo", "Doll", "LeatherBall", "SantaSnowGlobe", "SnowmanSnowGlobe", "RedOrnament", "YellowOrnament", "GreenOrnament", "AquaOrnament", "BlueOrnament", "MagentaOrnament";
- getitem @oldstock$[rand(getarraysize(@oldstock$))], 1;
- cleararray @oldstock$, "", getarraysize(@oldstock$);
- if (@rank < 15)
- goto L_Extra1;
- close;
-
-// TOP 15 reward
-L_Extra1:
- mes "[Santa Claus]";
- mes "\"The official Christmas 2009 headgear!";
- mes "Ho Ho Ho Merry Christmas!\"";
- getitem "SnowGoggles", 1;
- if (@rank < 10)
- goto L_Extra2;
- close;
-
-// TOP 10 reward
-L_Extra2:
- setarray @oldstock$, "PlushMouboo", "StickReinboo", "Doll", "LeatherBall", "SantaSnowGlobe", "SnowmanSnowGlobe", "RedOrnament", "YellowOrnament", "GreenOrnament", "AquaOrnament", "BlueOrnament", "MagentaOrnament";
- getitem @oldstock$[rand(getarraysize(@oldstock$))], 1;
- cleararray @oldstock$, "", getarraysize(@oldstock$);
- if (@rank < 5)
- goto L_Extra3;
- close;
-
-// TOP 5 reward
-L_Extra3:
- setarray @oldstock$, "MoubooHead", "MushHat", "ChristmasElfHat", "FunkyHat", "ShroomHat", "ElfNightcap", "BowlerHat", "TopHat";
- getitem @oldstock$[rand(getarraysize(@oldstock$))], 1;
- cleararray @oldstock$, "", getarraysize(@oldstock$);
- if (@rank < 2)
- goto L_Extra4;
- close;
-
-// TOP 2 reward
-L_Extra4:
- setarray @oldstock$, "SantaBeardHat", "ChristmasTreeHat", "EyePatch", "AntlerHat";
- getitem @oldstock$[rand(getarraysize(@oldstock$))], 1;
- cleararray @oldstock$, "", getarraysize(@oldstock$);
- close;
-
-/* FIXME requires player attached bcz TMWA is crazy, so better not.
-// Spawn 10~30 snowballs in Nivalis square
-OnClock2359:
- makeitem 5260, rand(1,3), "020-1", rand(69, 82), rand(78, 91);
- makeitem 5260, rand(1,3), "020-1", rand(69, 82), rand(78, 91);
- makeitem 5260, rand(1,3), "020-1", rand(69, 82), rand(78, 91);
- makeitem 5260, rand(1,3), "020-1", rand(69, 82), rand(78, 91);
- makeitem 5260, rand(1,3), "020-1", rand(69, 82), rand(78, 91);
- makeitem 5260, rand(1,3), "020-1", rand(69, 82), rand(78, 91);
- makeitem 5260, rand(1,3), "020-1", rand(69, 82), rand(78, 91);
- makeitem 5260, rand(1,3), "020-1", rand(69, 82), rand(78, 91);
- makeitem 5260, rand(1,3), "020-1", rand(69, 82), rand(78, 91);
- makeitem 5260, rand(1,3), "020-1", rand(69, 82), rand(78, 91);
- end;
-
-// Duplicates
-OnClock0001:
- goto OnClock2359;
-OnClock1759:
- goto OnClock2359;
-OnClock1801:
- goto OnClock2359;
-OnClock0559:
- goto OnClock2359;
-OnClock0601:
- goto OnClock2359;
-OnClock2124:
- goto OnClock2359;
-OnClock0024:
- goto OnClock2359;
-*/
-}
-
-
-
-////////////////////////////////
-033-1,0,0,0|script|XXmas0331|32767
-{
- end;
-
-OnHit2:
- goto OnHit;
-
-OnHit:
- // Not Christmas yet
- if (!$@xmas_time)
- end;
- // Reward time
- if ($@xmas_time == $@xmas_reward_time)
- end;
- // player must be created at least two weeks ago
- if ((BaseLevel < 30) || (gettimetick(2) - TUT_var < 2*7*86400))
- end;
-
- // Magic cheat
- if (@wandspell[4])
- end;
- if (@ingravspell[2])
- end;
- if (@chizaspell[2])
- end;
- if (@flarspell[2])
- end;
- if (@phlexspell[3])
- end;
- if (@chipchipspell[2])
- end;
- if (@upmarmuspell[1])
- end;
-
- // Not equipped to hunt Grinchboos
- //if (getequipid(equip_arrow) != 5260)
- // end;
- if (getequipid(equip_hand1) != 5261)
- end;
-
- // By last, check for Arrow Hail
- set @nearby, 0;
- foreach 1, getmap(), @away[0] - 14, @away[1] - 14, @away[0] + 14, @away[1] + 14,
- strnpcinfo(0) + "::OnNearbyNpc";
- if (@nearby)
- end;
-
- // Grinchboo slain
- set XMAS2020, XMAS2020 + 1;
- set $XMAS2020_BOO, $XMAS2020_BOO + 1;
- set @loop, 0;
- set @rank, 0;
- goto L_MaybeInsertNext;
-
-L_MaybeInsertNext:
- if (XMAS2020 > $Record_XXmas_Kills[@rank])
- goto L_InsertScore;
- // you already had a better score
- if (strcharinfo(0) == $Record_XXmas_Name$[@rank])
- goto L_Reward1;
- set @rank, @rank + 1;
- if (@rank == MAX_HIGH_SCORES)
- goto L_Reward1;
- goto L_MaybeInsertNext;
-
-L_InsertScore:
- set @loop, @rank;
- goto L_FindLastScore;
-
-L_FindLastScore:
- // comment this out to allow the player to be in the list more than once
- // though actually, it might be better just to assume the list is full
- if (strcharinfo(0) == $Record_XXmas_Name$[@loop])
- goto L_MoveStuff;
-
- set @loop, @loop + 1;
- if (@loop == MAX_HIGH_SCORES)
- goto L_MoveStuff;
- goto L_FindLastScore;
-
-L_MoveStuff:
- if (@loop == @rank)
- goto L_FinallyInsertMe;
- set $Record_XXmas_Kills[@loop], $Record_XXmas_Kills[@loop - 1];
- set $Record_XXmas_Name$[@loop], $Record_XXmas_Name$[@loop - 1];
- set $Record_XXmas_Date$[@loop], $Record_XXmas_Date$[@loop - 1];
- set @loop, @loop - 1;
- goto L_MoveStuff;
-
-L_FinallyInsertMe:
- set $Record_XXmas_Kills[@rank], XMAS2020;
- set $Record_XXmas_Name$[@rank], strcharinfo(0);
- callfunc "time_stamp";
- set $Record_XXmas_Date$[@rank], @ts_date$ + " " + @ts_time$;
- set @ts_date$, "";
- set @ts_time$, "";
- goto L_Reward1;
-
-L_Reward1:
- // Maybe we should tell you how many you purified?
- if (XMAS2020 % 10 == 0 || XMAS2020 == 1)
- goto L_Warning;
- end;
-
-L_Warning:
- message strcharinfo(0), "Grinchboos purified: "+XMAS2020;
- end;
-
-OnTimer15000:
- areamonster "033-1", 20, 20, 120, 110, "", 1162, 18, "XXmas0331::OnHit2";
- // Only happens until :15, and every 15 minutes, for a total of 60 cycles.
- if (gettime(2) > 15)
- end;
- initnpctimer;
- end;
-
-OnClock1800:
- initnpctimer;
- end;
-
-OnClock1830:
- killmonster "033-1", "XXmas0331::OnHit2";
- stopnpctimer;
- end;
-
-// Additional timers
-OnClock0000:
- goto OnClock1800;
-OnClock0030:
- goto OnClock1830;
-OnClock0600:
- goto OnClock1800;
-OnClock0630:
- goto OnClock1830;
-
-OnNearbyNpc:
- explode .@nearby$[0], strnpcinfo(0,@target_id), "#";
- if(.@nearby$[0] == "arrow-hail" || .@nearby$[1] == "arrow-hail")
- set @nearby, @nearby + 1;
- end;
-}
-
-046-1,0,0,0|script|XXmas0461|32767
-{
- end;
-
-OnHit2:
- goto OnHit;
-
-OnHit:
- // Not Christmas yet
- if (!$@xmas_time)
- end;
- // Reward time
- if ($@xmas_time == $@xmas_reward_time)
- end;
- // player must be created at least two weeks ago
- if ((BaseLevel < 30) || (gettimetick(2) - TUT_var < 2*7*86400))
- end;
-
- // Magic cheat
- if (@wandspell[4])
- end;
- if (@ingravspell[2])
- end;
- if (@chizaspell[2])
- end;
- if (@flarspell[2])
- end;
- if (@phlexspell[3])
- end;
- if (@chipchipspell[2])
- end;
- if (@upmarmuspell[1])
- end;
-
- // Not equipped to hunt Grinchboos
- //if (getequipid(equip_arrow) != 5260)
- // end;
- if (getequipid(equip_hand1) != 5261)
- end;
-
- // By last, check for Arrow Hail
- set @nearby, 0;
- foreach 1, getmap(), @away[0] - 14, @away[1] - 14, @away[0] + 14, @away[1] + 14,
- strnpcinfo(0) + "::OnNearbyNpc";
- if (@nearby)
- end;
-
- // Grinchboo slain
- set XMAS2020, XMAS2020 + 1;
- set $XMAS2020_BOO, $XMAS2020_BOO + 1;
- set @loop, 0;
- set @rank, 0;
- goto L_MaybeInsertNext;
-
-L_MaybeInsertNext:
- if (XMAS2020 > $Record_XXmas_Kills[@rank])
- goto L_InsertScore;
- // you already had a better score
- if (strcharinfo(0) == $Record_XXmas_Name$[@rank])
- goto L_Reward1;
- set @rank, @rank + 1;
- if (@rank == MAX_HIGH_SCORES)
- goto L_Reward1;
- goto L_MaybeInsertNext;
-
-L_InsertScore:
- set @loop, @rank;
- goto L_FindLastScore;
-
-L_FindLastScore:
- // comment this out to allow the player to be in the list more than once
- // though actually, it might be better just to assume the list is full
- if (strcharinfo(0) == $Record_XXmas_Name$[@loop])
- goto L_MoveStuff;
-
- set @loop, @loop + 1;
- if (@loop == MAX_HIGH_SCORES)
- goto L_MoveStuff;
- goto L_FindLastScore;
-
-L_MoveStuff:
- if (@loop == @rank)
- goto L_FinallyInsertMe;
- set $Record_XXmas_Kills[@loop], $Record_XXmas_Kills[@loop - 1];
- set $Record_XXmas_Name$[@loop], $Record_XXmas_Name$[@loop - 1];
- set $Record_XXmas_Date$[@loop], $Record_XXmas_Date$[@loop - 1];
- set @loop, @loop - 1;
- goto L_MoveStuff;
-
-L_FinallyInsertMe:
- set $Record_XXmas_Kills[@rank], XMAS2020;
- set $Record_XXmas_Name$[@rank], strcharinfo(0);
- callfunc "time_stamp";
- set $Record_XXmas_Date$[@rank], @ts_date$ + " " + @ts_time$;
- set @ts_date$, "";
- set @ts_time$, "";
- goto L_Reward1;
-
-L_Reward1:
- // Maybe we should tell you how many you purified?
- if (XMAS2020 % 10 == 0 || XMAS2020 == 1)
- goto L_Warning;
- end;
-
-L_Warning:
- message strcharinfo(0), "Grinchboos purified: "+XMAS2020;
- end;
-
-OnTimer15000:
- areamonster "046-1", 20, 20, 160, 115, "", 1162, 18, "XXmas0461::OnHit2";
- // Only happens until :15, and every 15 minutes, for a total of 60 cycles.
- if (gettime(2) > 15)
- end;
- initnpctimer;
- end;
-
-OnClock1800:
- initnpctimer;
- end;
-
-OnClock1830:
- killmonster "046-1", "XXmas0461::OnHit2";
- stopnpctimer;
- end;
-
-// Additional timers
-OnClock0000:
- goto OnClock1800;
-OnClock0030:
- goto OnClock1830;
-OnClock0600:
- goto OnClock1800;
-OnClock0630:
- goto OnClock1830;
-
-OnNearbyNpc:
- explode .@nearby$[0], strnpcinfo(0,@target_id), "#";
- if(.@nearby$[0] == "arrow-hail" || .@nearby$[1] == "arrow-hail")
- set @nearby, @nearby + 1;
- end;
-}
-
-047-1,0,0,0|script|XXmas0471|32767
-{
- end;
-
-OnHit2:
- goto OnHit;
-
-OnHit:
- // Not Christmas yet
- if (!$@xmas_time)
- end;
- // Reward time
- if ($@xmas_time == $@xmas_reward_time)
- end;
- // player must be created at least two weeks ago
- if ((BaseLevel < 30) || (gettimetick(2) - TUT_var < 2*7*86400))
- end;
-
- // Magic cheat
- if (@wandspell[4])
- end;
- if (@ingravspell[2])
- end;
- if (@chizaspell[2])
- end;
- if (@flarspell[2])
- end;
- if (@phlexspell[3])
- end;
- if (@chipchipspell[2])
- end;
- if (@upmarmuspell[1])
- end;
-
- // Not equipped to hunt Grinchboos
- //if (getequipid(equip_arrow) != 5260)
- // end;
- if (getequipid(equip_hand1) != 5261)
- end;
-
- // By last, check for Arrow Hail
- set @nearby, 0;
- foreach 1, getmap(), @away[0] - 14, @away[1] - 14, @away[0] + 14, @away[1] + 14,
- strnpcinfo(0) + "::OnNearbyNpc";
- if (@nearby)
- end;
-
- // Grinchboo slain
- set XMAS2020, XMAS2020 + 1;
- set $XMAS2020_BOO, $XMAS2020_BOO + 1;
- set @loop, 0;
- set @rank, 0;
- goto L_MaybeInsertNext;
-
-L_MaybeInsertNext:
- if (XMAS2020 > $Record_XXmas_Kills[@rank])
- goto L_InsertScore;
- // you already had a better score
- if (strcharinfo(0) == $Record_XXmas_Name$[@rank])
- goto L_Reward1;
- set @rank, @rank + 1;
- if (@rank == MAX_HIGH_SCORES)
- goto L_Reward1;
- goto L_MaybeInsertNext;
-
-L_InsertScore:
- set @loop, @rank;
- goto L_FindLastScore;
-
-L_FindLastScore:
- // comment this out to allow the player to be in the list more than once
- // though actually, it might be better just to assume the list is full
- if (strcharinfo(0) == $Record_XXmas_Name$[@loop])
- goto L_MoveStuff;
-
- set @loop, @loop + 1;
- if (@loop == MAX_HIGH_SCORES)
- goto L_MoveStuff;
- goto L_FindLastScore;
-
-L_MoveStuff:
- if (@loop == @rank)
- goto L_FinallyInsertMe;
- set $Record_XXmas_Kills[@loop], $Record_XXmas_Kills[@loop - 1];
- set $Record_XXmas_Name$[@loop], $Record_XXmas_Name$[@loop - 1];
- set $Record_XXmas_Date$[@loop], $Record_XXmas_Date$[@loop - 1];
- set @loop, @loop - 1;
- goto L_MoveStuff;
-
-L_FinallyInsertMe:
- set $Record_XXmas_Kills[@rank], XMAS2020;
- set $Record_XXmas_Name$[@rank], strcharinfo(0);
- callfunc "time_stamp";
- set $Record_XXmas_Date$[@rank], @ts_date$ + " " + @ts_time$;
- set @ts_date$, "";
- set @ts_time$, "";
- goto L_Reward1;
-
-L_Reward1:
- // Maybe we should tell you how many you purified?
- if (XMAS2020 % 10 == 0 || XMAS2020 == 1)
- goto L_Warning;
- end;
-
-L_Warning:
- message strcharinfo(0), "Grinchboos purified: "+XMAS2020;
- end;
-
-OnTimer15000:
- areamonster "047-1", 20, 20, 200, 180, "", 1162, 48, "XXmas0471::OnHit2";
- // Only happens until :15, and every 15 minutes, for a total of 60 cycles.
- if (gettime(2) > 15)
- end;
- initnpctimer;
- end;
-
-OnClock1800:
- initnpctimer;
- end;
-
-OnClock1830:
- killmonster "047-1", "XXmas0471::OnHit2";
- stopnpctimer;
- end;
-
-// Additional timers
-OnClock0000:
- goto OnClock1800;
-OnClock0030:
- goto OnClock1830;
-OnClock0600:
- goto OnClock1800;
-OnClock0630:
- goto OnClock1830;
-
-OnNearbyNpc:
- explode .@nearby$[0], strnpcinfo(0,@target_id), "#";
- if(.@nearby$[0] == "arrow-hail" || .@nearby$[1] == "arrow-hail")
- set @nearby, @nearby + 1;
- end;
-}
-
diff --git a/world/map/npc/annuals/xmas/barriers.txt b/world/map/npc/annuals/xmas/barriers.txt
deleted file mode 100644
index 8460e7bf..00000000
--- a/world/map/npc/annuals/xmas/barriers.txt
+++ /dev/null
@@ -1,165 +0,0 @@
-// This file is part of Christmas Event
-// author: Jenalya, Chayenne, cinderweb, wushin
-// please see #XmasConfig
-
-function|script|ThrowOutTheBum
-{
- set @getout, 0;
- 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 south till you reach the snowman. Then head into the cave to the east.\"";
- close2;
- warp "020-1",33,94;
- set @getout, 1;
- goto L_Return;
-
-L_Warp:
- message strcharinfo(0), "I said get out, We've no time for your kind here.";
- warp "020-1",33,94;
- set @getout, 1;
- goto L_Return;
-
-L_Return:
- return;
-}
-
-// Annual Xmas Boss Fight Door
-030-2,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",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,27,24,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;
- goto L_EnterDialogue;
-
-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:
- heal -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.";
- heal -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;
-
-L_Warp:
- warp "030-2",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,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",27,26;
- 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
deleted file mode 100644
index 31068889..00000000
--- a/world/map/npc/annuals/xmas/config.txt
+++ /dev/null
@@ -1,291 +0,0 @@
-// 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,87,66,0|script|Ayasha|258
-// 9: 021-1,63,107,0|script|Latif|262
-// 10: 021-1,123,116,0|script|Charda|260
-// 11: 021-1,78,87,0|script|Faris|259
-// 12: 021-1,98,25,0|script|Rasin|263
-// 13: 021-1,155,25,0|script|Ghada|265
-// 14: 025-1,80,88,0|script|Rossy|114
-// 15: 001-2,76,59,0|script|Kadiya|174
-// Helper Bit
-// 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|32767
-{
- end;
-
-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;
-
- // 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$,
- "RedTurtleneck",
- "YellowTurtleneck",
- "LightBlueTurtleneck",
- "PinkTurtleneck",
- "OrangeTurtleneck",
- "PurpleTurtleneck",
- "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$, "Shock Sweet", "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", "019-3", "030-3";
- 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;
-
- set $@start_month, $@xmas_start_month;
- set $@end_month, $@xmas_end_month;
- set $@start_day, 1;
- set $@end_day, $@xmas_reward_end_day;
- set $@reward_start_month, $@xmas_reward_start_month;
- set $@reward_start_day, $@xmas_reward_start_day;
-
- callfunc "GetEventTime";
- set $@xmas_time, $@event_time;
-
- if($@xmas_time == 0 && $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);
- goto L_Return;
-
-L_Return:
- // technically this only needs to skip the npctimer in SpawnMobs,
- // but this is a low-level debug setting so whatever.
- if (debug >= 2) end;
- callfunc "SpawnMobs";
- callfunc "PresentHandler";
- callfunc "ReplaceTrees";
- end;
-
-L_XmasError:
- debugmes "Xmas is Dead Jim.";
- mapexit;
-}
diff --git a/world/map/npc/annuals/xmas/core.txt b/world/map/npc/annuals/xmas/core.txt
deleted file mode 100644
index 4e628bb4..00000000
--- a/world/map/npc/annuals/xmas/core.txt
+++ /dev/null
@@ -1,252 +0,0 @@
-// 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 + ((Luk) / 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 >= 135)
- 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:
- set BaseLevel, BaseLevel + 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;
- if (($@xmas_time == $@xmas_reward_time) && ((@xmas_reward_done_state) || (@xmas_reward2_done_state)))
- goto L_GotGift;
- if ($@xmas_time == $@xmas_reward_time)
- goto L_NoGift;
- goto L_Return;
-
-L_GotGift:
- mes "Hey, this is not for you!";
- goto L_Return;
-
-L_NoGift:
- mes "Oh someone got a present. Maybe you can get one too if help the right person?";
- 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 >= $@xmas_reward_tally_rare)
- getitem @xmas_reward_item$, 1;
- if(@xmas_reward >= $@xmas_reward_tally_common)
- 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;
- goto L_OldMatch;
-
-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
deleted file mode 100644
index 6c513ff1..00000000
--- a/world/map/npc/annuals/xmas/debug.txt
+++ /dev/null
@@ -1,228 +0,0 @@
-// 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,
- "Reset Xmas Chamber.", L_XmasChamberReset,
- "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,
- "Reset Xmas Chamber.", L_XmasChamberReset,
- "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:
- 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;
- donpcevent "#XmasConfig::OnCommandRestartQuest";
- goto L_Close;
-
-L_XmasChamberReset:
- donpcevent "AniManOMat::OnCommandChamberReset";
- 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;
- close2;
- return;
-}
-
-020-1,86,76,0|script|XmasDebug#1|105
-{
- callfunc "XmasDebug";
- goto L_End;
-
-OnInit:
- if(!(debug))
- disablenpc "XmasDebug#1";
- goto L_End;
-
-L_End:
- end;
-}
-
-030-2,193,62,0|script|XmasDebug#2|105
-{
- callfunc "XmasDebug";
- goto L_End;
-
-OnInit:
- if(!(debug))
- disablenpc "XmasDebug#2";
- goto L_End;
-
-L_End:
- end;
-}
-
-030-3,26,26,0|script|XmasDebug#3|105
-{
- callfunc "XmasDebug";
- goto L_End;
-
-OnInit:
- if(!(debug))
- disablenpc "XmasDebug#3";
- goto L_End;
-
-L_End:
- end;
-}
-
-030-4,30,30,0|script|XmasDebug#4|111
-{
- callfunc "XmasDebug";
- goto L_End;
-
-OnInit:
- if(!(debug))
- disablenpc "XmasDebug#4";
- goto L_End;
-
-L_End:
- end;
-}
diff --git a/world/map/npc/annuals/xmas/helpers.txt b/world/map/npc/annuals/xmas/helpers.txt
deleted file mode 100644
index 0d566de7..00000000
--- a/world/map/npc/annuals/xmas/helpers.txt
+++ /dev/null
@@ -1,49 +0,0 @@
-// 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;
- goto L_Loop;
-
-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
deleted file mode 100644
index 1805e6a8..00000000
--- a/world/map/npc/annuals/xmas/list.txt
+++ /dev/null
@@ -1,104 +0,0 @@
-// 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;
- goto L_Loop;
-
-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;
- goto L_Loop;
-
-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
deleted file mode 100644
index bb9f2a3f..00000000
--- a/world/map/npc/annuals/xmas/mobmanager.txt
+++ /dev/null
@@ -1,82 +0,0 @@
-// Spawns mobs
-
-019-1,0,0,0|script|XmasSpawnManager|400
-{
- end;
-
-OnCommandSpawnStart:
- if ($@xmas_spawn_started)
- goto L_End;
- set $@xmas_spawn_started, 1;
- 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;
-
-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,0,0,0|script|XmasSpawnCounter#0|400
-{
- end;
-
-OnTally:
- donpcevent "XmasSpawnManager::OnCommandTally";
- end;
-}
-
-019-3,0,0,0|script|XmasSpawnCounter#1|400
-{
- end;
-
-OnTally:
- donpcevent "XmasSpawnManager::OnCommandTally";
- end;
-}
-
-030-3,0,0,0|script|XmasSpawnCounter#2|400
-{
- end;
-
-OnTally:
- donpcevent "XmasSpawnManager::OnCommandTally";
- end;
-}
diff --git a/world/map/npc/annuals/xmas/reagents.txt b/world/map/npc/annuals/xmas/reagents.txt
deleted file mode 100644
index 4adcaf12..00000000
--- a/world/map/npc/annuals/xmas/reagents.txt
+++ /dev/null
@@ -1,146 +0,0 @@
-// 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];
- goto L_ZeroLoopAgain;
-
-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];
- goto L_OneLoopAgain;
-
-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;
- goto L_ZeroLoopAgain;
-
-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;
- goto L_OneLoopAgain;
-
-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
deleted file mode 100644
index 49f51000..00000000
--- a/world/map/npc/annuals/xmas/states.txt
+++ /dev/null
@@ -1,55 +0,0 @@
-// 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;
-}