diff options
-rw-r--r-- | npc/commands/event.txt | 75 | ||||
-rw-r--r-- | npc/functions/seasons.txt | 75 | ||||
-rw-r--r-- | npc/scripts.conf | 2 |
3 files changed, 77 insertions, 75 deletions
diff --git a/npc/commands/event.txt b/npc/commands/event.txt index 2ed3368c9..65e9b85c8 100644 --- a/npc/commands/event.txt +++ b/npc/commands/event.txt @@ -6,80 +6,6 @@ // Description: // Handles all major events on TMW2 (Christmas, Easter, Worker Day, etc.) -// Christmas cannot be on GlobalEventMenu because it affects seasons system -function script sChristmas { - // Determine the drop rates based on month, and Christmas proximity - if (gettime(GETTIME_MONTH) == DECEMBER) { - if (gettime(GETTIME_DAYOFMONTH) <= 26) - .@m=10; - else - .@m=8; - } else { - .@m=5; - } - - // Add Christmas drops - addmonsterdrop(Moggun, XmasCake, 80*.@m); - addmonsterdrop(AlphaMouboo, XmasCake, 92*.@m); - addmonsterdrop(BlueSlime, XmasCake, 100*.@m); - addmonsterdrop(SantaSlime, XmasCake, 120*.@m); - addmonsterdrop(IcedFluffy, XmasCake, 150*.@m); - addmonsterdrop(Yeti, XmasCake, 500*.@m); - - addmonsterdrop(Bandit, XmasCandyCane, 30*.@m); - addmonsterdrop(Mouboo, XmasCandyCane, 48*.@m); - addmonsterdrop(WhiteSlime, XmasCandyCane, 50*.@m); - addmonsterdrop(RudolphSlime,XmasCandyCane, 100*.@m); - addmonsterdrop(Fluffy, XmasCandyCane, 200*.@m); - addmonsterdrop(AzulSlime, XmasCandyCane, 200*.@m); - - addmonsterdrop(Duck, GingerBreadMan, 36*.@m); - addmonsterdrop(WaterFairy, GingerBreadMan, 100*.@m); - - // Event drop rates, multiplied by 10 during Christmas (see .@m) - addmonsterdrop(Yeti, ClosedChristmasBox, 350*.@m); - addmonsterdrop(WaterFairy, ClosedChristmasBox, 108*.@m); - addmonsterdrop(AlphaMouboo, ClosedChristmasBox, 83*.@m); - addmonsterdrop(IcedFluffy, ClosedChristmasBox, 67*.@m); - addmonsterdrop(BlueSlime, ClosedChristmasBox, 42*.@m); - addmonsterdrop(Moggun, ClosedChristmasBox, 40*.@m); - addmonsterdrop(SantaSlime, ClosedChristmasBox, 36*.@m); - addmonsterdrop(AzulSlime, ClosedChristmasBox, 20*.@m); - addmonsterdrop(Fluffy, ClosedChristmasBox, 20*.@m); - addmonsterdrop(RudolphSlime,ClosedChristmasBox, 8*.@m); - addmonsterdrop(WhiteSlime, ClosedChristmasBox, 3*.@m); - addmonsterdrop(GiantMaggot, ClosedChristmasBox, 2*.@m); - - // This is not dropped outside December - if (gettime(GETTIME_MONTH) == DECEMBER) { - // Bugfix - if (gettime(GETTIME_YEAR) == 2018) - .@m+=10; - addmonsterdrop(WaterFairy, XmasGift, 6*.@m); - addmonsterdrop(AlphaMouboo, XmasGift, 5*.@m); - addmonsterdrop(IcedFluffy, XmasGift, 4*.@m); - addmonsterdrop(SantaSlime, XmasGift, 3*.@m); - addmonsterdrop(Fluffy, XmasGift, 2*.@m); - addmonsterdrop(AzulSlime, XmasGift, 2*.@m); - } - - // Change maps for Christmas Season (Specially LoF maps) - addmapmask "003-1", MASK_CHRISTMAS; - addmapmask "005-1", MASK_CHRISTMAS; - addmapmask "009-1", MASK_CHRISTMAS; - addmapmask "012-1", MASK_CHRISTMAS; - addmapmask "017-2", MASK_CHRISTMAS; - addmapmask "017-2-1", MASK_CHRISTMAS; - addmapmask "017-3", MASK_CHRISTMAS; - addmapmask "020-2", MASK_CHRISTMAS; - - // Enable event - set $EVENT$, "Christmas"; - //logmes "Enabled CHRISTMAS event.", LOGMES_ATCOMMAND; - return; - } - //MASK_CHRISTMAS - function script GlobalEventMenu { function rateManagement { @@ -110,6 +36,7 @@ function script GlobalEventMenu { return; } + // Easter is map-only, so it can be handled here instead of seasons.txt function sEaster { // Enable event diff --git a/npc/functions/seasons.txt b/npc/functions/seasons.txt index 0e269f6ac..6f867ce7f 100644 --- a/npc/functions/seasons.txt +++ b/npc/functions/seasons.txt @@ -34,6 +34,81 @@ function script season { } +// Event seasons +// Christmas cannot be on GlobalEventMenu because it affects seasons system +function script sChristmas { + // Determine the drop rates based on month, and Christmas proximity + if (gettime(GETTIME_MONTH) == DECEMBER) { + if (gettime(GETTIME_DAYOFMONTH) <= 26) + .@m=10; + else + .@m=8; + } else { + .@m=5; + } + + // Add Christmas drops + addmonsterdrop(Moggun, XmasCake, 80*.@m); + addmonsterdrop(AlphaMouboo, XmasCake, 92*.@m); + addmonsterdrop(BlueSlime, XmasCake, 100*.@m); + addmonsterdrop(SantaSlime, XmasCake, 120*.@m); + addmonsterdrop(IcedFluffy, XmasCake, 150*.@m); + addmonsterdrop(Yeti, XmasCake, 500*.@m); + + addmonsterdrop(Bandit, XmasCandyCane, 30*.@m); + addmonsterdrop(Mouboo, XmasCandyCane, 48*.@m); + addmonsterdrop(WhiteSlime, XmasCandyCane, 50*.@m); + addmonsterdrop(RudolphSlime,XmasCandyCane, 100*.@m); + addmonsterdrop(Fluffy, XmasCandyCane, 200*.@m); + addmonsterdrop(AzulSlime, XmasCandyCane, 200*.@m); + + addmonsterdrop(Duck, GingerBreadMan, 36*.@m); + addmonsterdrop(WaterFairy, GingerBreadMan, 100*.@m); + + // Event drop rates, multiplied by 10 during Christmas (see .@m) + addmonsterdrop(Yeti, ClosedChristmasBox, 350*.@m); + addmonsterdrop(WaterFairy, ClosedChristmasBox, 108*.@m); + addmonsterdrop(AlphaMouboo, ClosedChristmasBox, 83*.@m); + addmonsterdrop(IcedFluffy, ClosedChristmasBox, 67*.@m); + addmonsterdrop(BlueSlime, ClosedChristmasBox, 42*.@m); + addmonsterdrop(Moggun, ClosedChristmasBox, 40*.@m); + addmonsterdrop(SantaSlime, ClosedChristmasBox, 36*.@m); + addmonsterdrop(AzulSlime, ClosedChristmasBox, 20*.@m); + addmonsterdrop(Fluffy, ClosedChristmasBox, 20*.@m); + addmonsterdrop(RudolphSlime,ClosedChristmasBox, 8*.@m); + addmonsterdrop(WhiteSlime, ClosedChristmasBox, 3*.@m); + addmonsterdrop(GiantMaggot, ClosedChristmasBox, 2*.@m); + + // This is not dropped outside December + if (gettime(GETTIME_MONTH) == DECEMBER) { + // Bugfix + if (gettime(GETTIME_YEAR) == 2018) + .@m+=10; + addmonsterdrop(WaterFairy, XmasGift, 6*.@m); + addmonsterdrop(AlphaMouboo, XmasGift, 5*.@m); + addmonsterdrop(IcedFluffy, XmasGift, 4*.@m); + addmonsterdrop(SantaSlime, XmasGift, 3*.@m); + addmonsterdrop(Fluffy, XmasGift, 2*.@m); + addmonsterdrop(AzulSlime, XmasGift, 2*.@m); + } + + // Change maps for Christmas Season (Specially LoF maps) + addmapmask "003-1", MASK_CHRISTMAS; + addmapmask "005-1", MASK_CHRISTMAS; + addmapmask "009-1", MASK_CHRISTMAS; + addmapmask "012-1", MASK_CHRISTMAS; + addmapmask "017-2", MASK_CHRISTMAS; + addmapmask "017-2-1", MASK_CHRISTMAS; + addmapmask "017-3", MASK_CHRISTMAS; + addmapmask "020-2", MASK_CHRISTMAS; + + // Enable event + set $EVENT$, "Christmas"; + //logmes "Enabled CHRISTMAS event.", LOGMES_ATCOMMAND; + return; +} + +// This allows GMs to change seasons if needed function script SeasonControl { do { diff --git a/npc/scripts.conf b/npc/scripts.conf index 6e3eef3c0..2fcd1a3ff 100644 --- a/npc/scripts.conf +++ b/npc/scripts.conf @@ -12,7 +12,6 @@ "npc/functions/string.txt", "npc/functions/time.txt", "npc/functions/timer.txt", -"npc/commands/event.txt", "npc/functions/seasons.txt", "npc/functions/weather.txt", @@ -66,6 +65,7 @@ // custom atcommands "npc/commands/music.txt", +"npc/commands/event.txt", "npc/commands/exp.txt", "npc/commands/debug-look.txt", "npc/commands/debug-quest.txt", |