diff options
author | Jesusaves <jesusalva@themanaworld.org> | 2020-11-30 21:49:54 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-01 00:49:54 +0000 |
commit | dbc0174b72ea451dd737a99e581cd460ff969fa8 (patch) | |
tree | 90472c492bd8a4c97fc9c90436e459cfb36711b2 /world/map/npc/annuals/xmas | |
parent | 7b9d5976809d36fd542176f2010fd9714d0c685c (diff) | |
download | serverdata-dbc0174b72ea451dd737a99e581cd460ff969fa8.tar.gz serverdata-dbc0174b72ea451dd737a99e581cd460ff969fa8.tar.bz2 serverdata-dbc0174b72ea451dd737a99e581cd460ff969fa8.tar.xz serverdata-dbc0174b72ea451dd737a99e581cd460ff969fa8.zip |
Christmas 2020 (#567)
“Jack Frost has cursed Santa's Reinboos! They can recover if hit with a snowball, but
catching these buggers is hard! Get a Snowball Thrower with Santa and save Christmas!
On the meanwhile, someone not so interested in Christmas might have better targets for these snowballs...”
Diffstat (limited to 'world/map/npc/annuals/xmas')
-rw-r--r-- | world/map/npc/annuals/xmas/2020.txt | 675 |
1 files changed, 675 insertions, 0 deletions
diff --git a/world/map/npc/annuals/xmas/2020.txt b/world/map/npc/annuals/xmas/2020.txt new file mode 100644 index 00000000..f60dfd4e --- /dev/null +++ b/world/map/npc/annuals/xmas/2020.txt @@ -0,0 +1,675 @@ +// 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; + + // 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; + +OnClock1800: + initnpctimer; + end; + +OnClock1830: + killmonster "034-1", "XXmas0341::OnHit2"; + stopnpctimer; + end; + +// Additional timers +OnClock0000: + goto OnClock1800; +OnClock0030: + goto OnClock1830; +OnClock0600: + goto OnClock1800; +OnClock0630: + goto OnClock1830; +} + +// 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; + +} + + + +//////////////////////////////// +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; + + // Not equipped to hunt Grinchboos + if (getequipid(equip_arrow) != 5260) + end; + if (getequipid(equip_hand1) != 5261) + 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; +} + +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; + + // Not equipped to hunt Grinchboos + if (getequipid(equip_arrow) != 5260) + end; + if (getequipid(equip_hand1) != 5261) + 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; +} + +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; + + // Not equipped to hunt Grinchboos + if (getequipid(equip_arrow) != 5260) + end; + if (getequipid(equip_hand1) != 5261) + 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; +} + |