// TMW2 Script. // Authors: // Jesusalva // Description: // Season functions // Function authored by Reid and edited by Jesusalva // season({day, month}) // SQuest_Summer // returns the current season (approximation) // WINTER: Winter, 21/12 // SPRING: Spring, 20/03 // SUMMER: Summer, 21/06 // AUTUMN: Autumn, 22/09 function script season { .@current_month = getarg(0, gettime(GETTIME_MONTH)); if (.@current_month % 3 == 0) { .@current_day = getarg(1, gettime(GETTIME_DAYOFMONTH)); switch (.@current_month) { case MARCH: .@season_day = 20; break; case JUNE: .@season_day = 21; break; case SEPTEMBER: .@season_day = 22; break; case DECEMBER: .@season_day = 21; break; default: break; } .@is_after_season_day = .@current_day >= .@season_day ? 0 : -1; } return (.@current_month / 3 + .@is_after_season_day) % 4; } function script SeasonControl { do { select "Summer Start", "Summer End", "Autumn Start", "Autumn End", "Winter Start", "Winter End", "Abort"; switch (@menu) { case 1: donpcevent("#SeasonCore::OnSummerStart"); break; case 2: donpcevent("#SeasonCore::OnSummerEnd"); break; case 3: donpcevent("#SeasonCore::OnAutumnStart"); break; case 4: donpcevent("#SeasonCore::OnAutumnEnd"); break; case 5: donpcevent("#SeasonCore::OnWinterStart"); break; case 6: donpcevent("#SeasonCore::OnWinterEnd"); break; } } while (@menu != 5); return; } // If skip_checks is set, it'll ignore $@SEASON control. // SeasonReload( {skip_checks} ) function script SeasonReload { // Proccess skip_checks if (getarg(0,0)) $@SEASON=99; // Summer extra drops if (season() == SUMMER && $@SEASON != SUMMER) { donpcevent("#SeasonCore::OnSummerStart"); } // Summer end delete drops if (season() == AUTUMN && $@SEASON == SUMMER) { donpcevent("#SeasonCore::OnSummerEnd"); } // Autumn extra drops if (season() == AUTUMN && $@SEASON != AUTUMN) { donpcevent("#SeasonCore::OnAutumnStart"); } // Autumn end delete drops if (season() == WINTER && $@SEASON == AUTUMN) { donpcevent("#SeasonCore::OnAutumnEnd"); } // Winter extra drops if (season() == WINTER && $@SEASON != WINTER) { donpcevent("#SeasonCore::OnWinterStart"); } // Winter end delete drops if (season() == SPRING && $@SEASON == WINTER) { donpcevent("#SeasonCore::OnWinterEnd"); } // Non-season, but season-related // Christmas have a special feature if ($EVENT$ == "Christmas") sChristmas(); $@SEASON=season(); return; } 000-0,0,0,0 script #SeasonCore NPC_HIDDEN,{ end; OnSummerStart: addmonsterdrop(Duck, CherryCocktail, 360); addmonsterdrop(Croc, CherryCocktail, 180); addmonsterdrop(SaxsoGhost, CherryCocktail, 450); addmonsterdrop(RedButterfly, CherryCocktail, 100); addmonsterdrop(Maggot, CactusCocktail, 140); addmonsterdrop(DesertMaggot, CactusCocktail, 190); addmonsterdrop(Scorpion, CactusCocktail, 165); addmonsterdrop(GiantMaggot, CactusCocktail, 290); addmonsterdrop(Centaur, CactusCocktail, 1000); addmonsterdrop(AlphaMouboo, AppleCocktail, 850); addmonsterdrop(OceanCroc, AppleCocktail, 480); addmonsterdrop(Mouboo, AppleCocktail, 280); addmonsterdrop(Pinkie, AppleCocktail, 70); addmonsterdrop(Duck, Sunglasses, 1); addmonsterdrop(Croc, Sunglasses, 1); addmonsterdrop(SaxsoGhost, Sunglasses, 1); addmonsterdrop(DesertMaggot, Sunglasses, 1); addmonsterdrop(Scorpion, Sunglasses, 1); addmonsterdrop(GiantMaggot, Sunglasses, 1); addmonsterdrop(Centaur, Sunglasses, 3); addmonsterdrop(AlphaMouboo, Sunglasses, 1); addmonsterdrop(OceanCroc, Sunglasses, 1); addmonsterdrop(Mouboo, Sunglasses, 1); addmonsterdrop(Pinkie, Sunglasses, 1); addmonsterdrop(Moonshroom, Sunglasses, 2); addmonsterdrop(RedButterfly, Sunglasses, 1); end; OnSummerEnd: delmonsterdrop(Duck, CherryCocktail); delmonsterdrop(Croc, CherryCocktail); delmonsterdrop(SaxsoGhost, CherryCocktail); delmonsterdrop(RedButterfly, CherryCocktail); delmonsterdrop(Maggot, CactusCocktail); delmonsterdrop(DesertMaggot, CactusCocktail); delmonsterdrop(Scorpion, CactusCocktail); delmonsterdrop(GiantMaggot, CactusCocktail); delmonsterdrop(Centaur, CactusCocktail); delmonsterdrop(AlphaMouboo, AppleCocktail); delmonsterdrop(OceanCroc, AppleCocktail); delmonsterdrop(Mouboo, AppleCocktail); delmonsterdrop(Pinkie, AppleCocktail); delmonsterdrop(Duck, Sunglasses); delmonsterdrop(Croc, Sunglasses); delmonsterdrop(SaxsoGhost, Sunglasses); delmonsterdrop(DesertMaggot, Sunglasses); delmonsterdrop(Scorpion, Sunglasses); delmonsterdrop(GiantMaggot, Sunglasses); delmonsterdrop(Centaur, Sunglasses); delmonsterdrop(AlphaMouboo, Sunglasses); delmonsterdrop(OceanCroc, Sunglasses); delmonsterdrop(Mouboo, Sunglasses); delmonsterdrop(Pinkie, Sunglasses); delmonsterdrop(Moonshroom, Sunglasses); delmonsterdrop(RedButterfly, Sunglasses); end; OnAutumnStart: // Ched's Quest Winner .@nb = query_sql("SELECT c.name FROM `quest` AS i, `char` AS c WHERE i.quest_id="+SQuest_Ched+" AND i.char_id=c.char_id ORDER BY i.count2 DESC LIMIT 1", .@name$); $@AUTUMN_VICTOR$=.@name$[0]; // Fancy trees addmapmask "012-1", MASK_AUTUMN; // Autumn's Drop addmonsterdrop(FafiDragon, PumpkandySeed, 10000); addmonsterdrop(BlackMamba, PumpkandySeed, 8000); addmonsterdrop(AlphaMouboo, PumpkandySeed, 5000); addmonsterdrop(PoisonSpikyMushroom, PumpkandySeed, 3000); addmonsterdrop(Mouboo, PumpkandySeed, 2000); addmonsterdrop(Bandit, PumpkandySeed, 1600); addmonsterdrop(Fluffy, PumpkandySeed, 1500); addmonsterdrop(LogHead, PumpkandySeed, 1400); addmonsterdrop(CaveSnake, PumpkandySeed, 1380); addmonsterdrop(CaveMaggot, PumpkandySeed, 850); addmonsterdrop(GreenSlime, PumpkandySeed, 750); addmonsterdrop(Piou, PumpkandySeed, 600); addmonsterdrop(Squirrel, PumpkandySeed, 500); end; OnAutumnEnd: // Ched's rewards can't be claimed anymore. Delete that from all players. DelQuestFromEveryPlayer(SQuest_Ched); removemapmask "012-1", MASK_AUTUMN; delmonsterdrop(FafiDragon, PumpkandySeed); delmonsterdrop(Mouboo, PumpkandySeed); delmonsterdrop(AlphaMouboo, PumpkandySeed); delmonsterdrop(Fluffy, PumpkandySeed); delmonsterdrop(Piou, PumpkandySeed); delmonsterdrop(CaveSnake, PumpkandySeed); delmonsterdrop(CaveMaggot, PumpkandySeed); delmonsterdrop(Bandit, PumpkandySeed); delmonsterdrop(Squirrel, PumpkandySeed); delmonsterdrop(PoisonSpikyMushroom, PumpkandySeed); delmonsterdrop(LogHead, PumpkandySeed); delmonsterdrop(GreenSlime, PumpkandySeed); delmonsterdrop(BlackMamba, PumpkandySeed); end; OnWinterStart: // Nearly all Winterlands + Woodlands + ducks drop winter items. (Summer is Desert shining, Winter is the opposite) // Winterland Area Mobs // Moggun AlphaMouboo BlueSlime SantaSlime IcedFluffy Yeti WaterFairy AzulSlime Fluffy // RudolphSlime WhiteSlime AngryBat Wolvern WindFairy // Woodlands Area Mobs // Tipiu Piousse Silkworm Squirrel Blub CobaltPlant MauvePlant GambogePlant AlizarinPlant // Loghead Mouboo ForestMushroom SeaSlime Centaur Pinkie CloverField PoisonSpikyMushroom // ChagashroomField PlushroomField ManaPiou Bluepar LivingPotato RedMushroom RedButterfly // ManaBug TrainingDummy // LoF Area Mobs // ChocolateSlime Lavern ShadowPlant CyanButterfly // Items: Snowflake CaramelCandy GingerBreadMan ChocolateBiscuit // Quest Requires All Of The Above addmonsterdrop(WaterFairy, GingerBreadMan, 1000); addmonsterdrop(RedMushroom, GingerBreadMan, 300); addmonsterdrop(Duck, GingerBreadMan, 280); addmonsterdrop(ManaPiou, GingerBreadMan, 240); addmonsterdrop(AngryBat, GingerBreadMan, 140); addmonsterdrop(AzulSlime, GingerBreadMan, 110); addmonsterdrop(Lavern, GingerBreadMan, 90); addmonsterdrop(Tipiu, CaramelCandy, 8000); addmonsterdrop(WindFairy, CaramelCandy, 2000); addmonsterdrop(IcedFluffy, CaramelCandy, 1200); addmonsterdrop(Wolvern, CaramelCandy, 1000); addmonsterdrop(LivingPotato, CaramelCandy, 800); addmonsterdrop(ChocolateSlime, CaramelCandy, 400); addmonsterdrop(SeaSlime, CaramelCandy, 400); addmonsterdrop(Pinkie, CaramelCandy, 200); addmonsterdrop(SlimeBlast, CaramelCandy, 100); addmonsterdrop(SilkWorm, CaramelCandy, 30); addmonsterdrop(ForestMushroom, Snowflake, 3000); addmonsterdrop(Blub, Snowflake, 3000); addmonsterdrop(LogHead, Snowflake, 600); addmonsterdrop(RedButterfly, Snowflake, 400); addmonsterdrop(CyanButterfly, Snowflake, 400); addmonsterdrop(Dummy, Snowflake, 300); addmonsterdrop(ManaBug, Snowflake, 200); addmonsterdrop(Piousse, Snowflake, 100); addmonsterdrop(Squirrel, Snowflake, 100); addmonsterdrop(CloverPatch, Snowflake, 100); addmonsterdrop(CobaltPlant, Snowflake, 90); addmonsterdrop(GambogePlant, Snowflake, 90); addmonsterdrop(MauvePlant, Snowflake, 90); addmonsterdrop(AlizarinPlant, Snowflake, 90); addmonsterdrop(AlphaMouboo, ReinbooWand, 3); addmonsterdrop(BloodyMouboo,ReinbooWand, 2); addmonsterdrop(Centaur, ReinbooWand, 2); addmonsterdrop(Mouboo, ReinbooWand, 1); addmonsterdrop(EasterMouboo,ReinbooWand, 1); addmonsterdrop(MoubooSlime, ReinbooWand, 1); end; OnWinterEnd: delmonsterdrop(WaterFairy, GingerBreadMan); delmonsterdrop(RedMushroom, GingerBreadMan); delmonsterdrop(Duck, GingerBreadMan); delmonsterdrop(ManaPiou, GingerBreadMan); delmonsterdrop(AngryBat, GingerBreadMan); delmonsterdrop(AzulSlime, GingerBreadMan); delmonsterdrop(Lavern, GingerBreadMan); delmonsterdrop(Tipiu, CaramelCandy); delmonsterdrop(WindFairy, CaramelCandy); delmonsterdrop(IcedFluffy, CaramelCandy); delmonsterdrop(Wolvern, CaramelCandy); delmonsterdrop(LivingPotato, CaramelCandy); delmonsterdrop(ChocolateSlime, CaramelCandy); delmonsterdrop(SeaSlime, CaramelCandy); delmonsterdrop(Pinkie, CaramelCandy); delmonsterdrop(SlimeBlast, CaramelCandy); delmonsterdrop(SilkWorm, CaramelCandy); delmonsterdrop(ForestMushroom, Snowflake); delmonsterdrop(Blub, Snowflake); delmonsterdrop(LogHead, Snowflake); delmonsterdrop(RedButterfly, Snowflake); delmonsterdrop(CyanButterfly, Snowflake); delmonsterdrop(Dummy, Snowflake); delmonsterdrop(ManaBug, Snowflake); delmonsterdrop(Piousse, Snowflake); delmonsterdrop(Squirrel, Snowflake); delmonsterdrop(CloverPatch, Snowflake); delmonsterdrop(CobaltPlant, Snowflake); delmonsterdrop(GambogePlant, Snowflake); delmonsterdrop(MauvePlant, Snowflake); delmonsterdrop(AlizarinPlant, Snowflake); delmonsterdrop(AlphaMouboo, ReinbooWand); delmonsterdrop(BloodyMouboo,ReinbooWand); delmonsterdrop(Centaur, ReinbooWand); delmonsterdrop(Mouboo, ReinbooWand); delmonsterdrop(EasterMouboo,ReinbooWand); delmonsterdrop(MoubooSlime, ReinbooWand); end; OnInit: SeasonReload(1); end; OnHour00: if ($@SEASON != season()) { SeasonReload(); } end; }