summaryrefslogtreecommitdiff
path: root/npc
diff options
context:
space:
mode:
Diffstat (limited to 'npc')
-rw-r--r--npc/001-1/eventmaster.txt54
-rw-r--r--npc/functions/event.txt43
2 files changed, 97 insertions, 0 deletions
diff --git a/npc/001-1/eventmaster.txt b/npc/001-1/eventmaster.txt
index 48c43c034..bb61fa20f 100644
--- a/npc/001-1/eventmaster.txt
+++ b/npc/001-1/eventmaster.txt
@@ -716,6 +716,60 @@ L_Conf:
$@AEROS_SPWN=@menu-1;
goto L_Menu;
+OnAutoSched:
+ .@t=0;
+ // Scatter 10× Strange Coins for digging
+ // Also scatter some strange coins for looting
+ buryitem(StrangeCoin, any(9,10,10,10,11,11));
+ mkitem(StrangeCoin, $@AEROS_AUTOSPAWN);
+ // Spawn monsters
+ freeloop(true);
+ for (.@i = 0; .@i < ($@AEROS_AUTOSPAWN * 5); .@i++) {
+ .@r=rand2(5, 12);
+ .@m=any(Piou, Piousee, Ratto, LittleBlub, Croc, PlushroomField,
+ Tipiu, CaveMaggot, Bat, Scorpion, Duck, Maggot, RedScorpion,
+ ManaBug, ManaGhost, HouseMaggot, RedSlime, WhiteSlime,
+ SlimeBlast, Mouboo, Bandit, BlackScorpion, GiantMaggot,
+ CaveSnake, ManaBug, GoldenScorpion, NightScorpion, SantaSlime,
+ CopperSlime, FallenGuard1, FallenGuard2, OldSnake, GrassSnake,
+ Snake, Pollet, Wolvern, EarthFairy, FireFairy, WaterFairy,
+ WindFairy, NatureFairy, GreenSlimeMother, ChocolateSlimeMother,
+ CopperSlimeMother, SeaSlimeMother, AzulSkullSlime,
+ CopperSkullSlime, Crafty, Troll, Forain, Yeti, Centaur, GoboBear,
+ Terranite, TerraniteProtector, Reaper, Michel, JackO, Skeleton,
+ Pinkie, PinkieSuseran, CloverPatch, MagicRatto, Moonshroom,
+ MoubooSlime);
+ spawner(strmobinfo(1, .@m), .@m, .@r);
+ .@t += .@r;
+ // Bonus
+ .@r=rand2(1, 3);
+ .@m=any(SaxsoGhost, HolyPixie, BronzeChest, SilverChest, GoldenChest,
+ MalignChest, PrismChest, SupremeChest, WildxChest, ManaChest,
+ ThornChest, ViciousChest, EvilChest, BronzeMimic, SilverMimic,
+ GoldenMimic, Bif, EleniumBif, BigEleniumBif, RubyBif, BigRubyBif,
+ TopazBif, BigTopazBif, EmeraldBif, BigEmeraldBif,
+ DiamondBif, BigDiamondBif, AmethystBif, BigAmethystBif,
+ SapphireBif, BigSapphireBif, SmallMagicBif, MagicBif, BigMagicBif,
+ CloverPatch, EvilScythe);
+ spawner(strmobinfo(1, .@m), .@m, .@r);
+ .@t += .@r;
+ }
+ freeloop(false);
+ // Open gate if full
+ if ($@AEROS_SPWN == 2 && .WALL) {
+ delcells "AerosWall";
+ .WALL=0;
+ }
+ // Close gate otherwise
+ if ($@AEROS_SPWN != 2 && !.WALL) {
+ setcells "001-1", 169, 63, 169, 76, 3, "AerosWall";
+ .WALL=1;
+ }
+ // We're done
+ $@AEROS_AUTOSPAWN = 0;
+ consoleinfo("script automatically spawned "+str(.@t)+" beigns at Aeros.");
+ end;
+
OnAerosMobDeath:
if ($coinsrate < 0) end;
// A level 100 monster can have a 4% drop bonus against a level 0 monster.
diff --git a/npc/functions/event.txt b/npc/functions/event.txt
index 72e854429..7ba1e802c 100644
--- a/npc/functions/event.txt
+++ b/npc/functions/event.txt
@@ -363,6 +363,48 @@ OnBossDie:
end;
}
+- script sThankAeros NPC_HIDDEN,{
+OnInit:
+ .users=getusers(1);
+ .score=0;
+ .event=0;
+OnTimer90000:
+ if ($EVENT$ != "Thanksgiving")
+ end;
+ .users=getusers(1);
+ .score+=.users;
+
+ // Abort event and reset score
+ if (.event && .event < gettimetick(2)) {
+ .event=0;
+ .score=0;
+ $@GM_EVENT=0;
+ $@MK_SCENE=MK_NONE;
+ killmonsterall("001-1");
+ mapwarp("001-1", "000-1", 22, 22, 0);
+ announce ("The event is over!"), bc_all|bc_npc;
+ }
+
+ // Do event (lasts 30 minutes)
+ if (!.event && !$@MK_SCENE && .score > 300 && .users > 3) {
+ /* Reserve Aeros */
+ $@MK_SCENE=MK_LOCKED;
+ /* Setup the event */
+ $@AEROS_SPWN=(.users > 6 ? 2 : any(0, 1));
+ $@AEROS_AUTOSPAWN=.users+rand2(1, .users);
+ donpcevent("Mana Being#001-1::OnAutoSched");
+ /* Open the event */
+ $@GM_EVENT = 2;
+ .event = gettimetick(2) + 1800;
+ announce ("The mana bridge to Aeros is open! To participate on event, talk to ##BSoul Menhir##b!"), bc_all|bc_npc;
+ announce ("##1THANKSGIVING SPECIAL. TIME LIMIT: ##B30 MINUTES.##b##0"), bc_all|bc_npc;
+ channelmes("#world", "An event is happening on Aeros! Hurry up!");
+ }
+
+ initnpctimer;
+ end;
+}
+
function script sThanksgiving {
// Variables:
// #THANKS_DAY
@@ -966,6 +1008,7 @@ OnClock0000:
if ($EVENT$ != "")
FYStopEvent();
$EVENT$="Thanksgiving";
+ donpcevent("sThankAeros::OnTimer90000");
}
// End the event the day after
else if (.@d == .thanks_endday+1 && .@m == .thanks_endmon) {