summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2018-07-23 10:51:02 -0300
committerJesusaves <cpntb1@ymail.com>2018-07-23 10:51:02 -0300
commit8cd2e8d5c6c88cd44b358cc0401a0991d4bc1146 (patch)
treea7dd76cda6221c32e34ae800550bdb385fbb45dd
parentd02088c8c417dc61745ca66cf6dec9a1771531e8 (diff)
downloadserverdata-8cd2e8d5c6c88cd44b358cc0401a0991d4bc1146.tar.gz
serverdata-8cd2e8d5c6c88cd44b358cc0401a0991d4bc1146.tar.bz2
serverdata-8cd2e8d5c6c88cd44b358cc0401a0991d4bc1146.tar.xz
serverdata-8cd2e8d5c6c88cd44b358cc0401a0991d4bc1146.zip
Refactor season code
-rw-r--r--npc/commands/super-menu.txt14
-rw-r--r--npc/functions/seasons.txt119
2 files changed, 69 insertions, 64 deletions
diff --git a/npc/commands/super-menu.txt b/npc/commands/super-menu.txt
index 9bb3b9365..cc82a6ad1 100644
--- a/npc/commands/super-menu.txt
+++ b/npc/commands/super-menu.txt
@@ -1,12 +1,6 @@
function script SuperMenu {
do
{
- if (debug && !is_gm())
- {
- GlobalDebugMenu;
- return;
- }
-
clear;
setnpcdialogtitle l("Super Menu");
mes l("This menu contains all options available to you, based on your access privileges.");
@@ -20,7 +14,9 @@ function script SuperMenu {
rif(is_admin() && !getcharid(2), l("Join teh Guild")),
rif(is_admin(), l("Referral Program Report")),
rif(is_admin(), "Broken checks"),
- "Debug";
+ rif(is_gm(), l("Seasonal Drop Control")),
+ "Debug",
+ "Quit";
switch (@menu)
{
@@ -37,7 +33,9 @@ function script SuperMenu {
mes("Either delitem is not working, or you had 1 aquada and 100 bread.");
next;
break;
- case 7: GlobalDebugMenu 1; break;
+ case 7: SeasonControl; break;
+ case 8: GlobalDebugMenu 1; break;
+ default: close; break;
}
} while (1);
}
diff --git a/npc/functions/seasons.txt b/npc/functions/seasons.txt
index 3fe8f12d1..08e93e481 100644
--- a/npc/functions/seasons.txt
+++ b/npc/functions/seasons.txt
@@ -36,71 +36,78 @@ function script season {
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;
+
OnInit:
OnHour00:
if ($@SEASON != season()) {
// Summer extra drops
if (season() == SUMMER && $@SEASON != SUMMER) {
- 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);
-
+ donpcevent("#SeasonCore::OnSummerStart");
}
// Summer end delete drops
if (season() == AUTUMN && $@SEASON == SUMMER) {
- 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);
+ donpcevent("#SeasonCore::OnSummerEnd");
}
$@SEASON=season();