summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--npc/006-7/ctrl.txt2
-rw-r--r--npc/006-9/ctrl.txt287
-rw-r--r--npc/functions/hub.txt9
3 files changed, 294 insertions, 4 deletions
diff --git a/npc/006-7/ctrl.txt b/npc/006-7/ctrl.txt
index 59ca902d1..c81bd2abc 100644
--- a/npc/006-7/ctrl.txt
+++ b/npc/006-7/ctrl.txt
@@ -2,6 +2,8 @@
// Author:
// Jesusalva
+006-7 mapflag zone MMO
+
006-7,44,50,0 script #OutOf0067 NPC_HIDDEN,0,0,{
end;
diff --git a/npc/006-9/ctrl.txt b/npc/006-9/ctrl.txt
index c9bdaba19..b533a6820 100644
--- a/npc/006-9/ctrl.txt
+++ b/npc/006-9/ctrl.txt
@@ -2,26 +2,305 @@
// Author:
// Jesusalva
+006-9 mapflag zone MMO
+
006-9,37,21,0 script #OutOf0069 NPC_HIDDEN,0,0,{
end;
OnTouch:
if (!$@SURVIVAL_CANDOR)
- warp "006-6", 40, 36;
+ warp "006-6", 54, 36;
end;
}
006-9,55,32,0 script Bloodbath NPC_NO_SPRITE,{
- if ($@SURVIVAL_CANDOR) end;
- // $@SURVIVAL_CANDOR = gettimetick(2);
+ function spawn;
+ if ($@SURVIVAL_CANDOR) {
+ npctalk3 l("Score: %s / %s", FuzzyTime($@SURVIVAL_CANDOR), FuzzyTime(gettimetick(2)+SCANDORPTS));
+ end;
+ }
mesn;
mes l("Goal: Survive the longest possible.");
mes l("Monsters will spawn in the south fountain continuously.");
- mes l("After five minutes, they'll also start spawning on whole map.");
+ mes l("They'll also start spawning on whole map, so be careful.");
+ mesc l("The fee to use this room is %s GP.", fnum(.price)), 1;
+ mes "";
+ mes l("Current score: %s", FuzzyTime(gettimetick(2)+SCANDORPTS));
+
+ if (Zeny < .price) close;
+ next;
+ mesc l("Begin?");
+ if (askyesno() == ASK_NO || Zeny < .price) {
+ closeclientdialog;
+ close;
+ }
+
+ Zeny-=.price;
+ $@SURVIVAL_CANDOR = gettimetick(2);
+ initnpctimer;
close;
+// Timer logic
+OnTimer4000:
+ .diff += 1;
+ if (.diff == 75)
+ mapannounce "006-9","Five minutes have passed, changing spawn pattern!",0;
+ if (.diff == 450)
+ mapannounce "006-9", "Half hour has passed, changing spawn pattern!", 0;
+ if (.diff == 900)
+ mapannounce "006-9", "One hour has passed, changing spawn pattern!", 0;
+ initnpctimer;
+OnTimer2000:
+ /* Verify for game over */
+ if (getmapusers("006-9") < 1) {
+ sleep(25);
+ stopnpctimer;
+ .diff = 0;
+ $@SURVIVAL_CANDOR = 0;
+ killmonsterall("006-9");
+ end;
+ }
+ spawn(.diff);
+ end;
+
+// Spawn logic
+function spawn {
+ .@lv = getarg(0);
+ if (.@lv < 450) {
+ .@mb[0] = MagicGoblin;
+ .@mb[1] = IceMaggot;
+ }
+
+ // Artillery
+ if (.@lv > 40)
+ array_push(.@mb, RobinBandit);
+ if (.@lv > 50)
+ array_push(.@mb, DustGatling);
+ if (.@lv > 60)
+ array_push(.@mb, DustRifle);
+ if (.@lv > 70)
+ array_push(.@mb, DustRevolver);
+ if (.@lv > 80)
+ array_push(.@mb, DustBoss);
+ if (.@lv > 90)
+ array_push(.@mb, GreatMoubooSlime);
+ if (.@lv > 100)
+ array_push(.@mb, Jhon);
+
+ // Monsters
+ if (is_between2(0, .@lv, 60)) {
+ array_push(.@mb, Piou);
+ array_push(.@mb, Piousse);
+ array_push(.@mb, Squirrel);
+ array_push(.@mb, ManaPiou);
+ array_push(.@mb, ForestPiou);
+ array_push(.@mb, RedButterfly);
+ array_push(.@mb, Maggot);
+ array_push(.@mb, CandorScorpion);
+ array_push(.@mb, HouseMaggot);
+ array_push(.@mb, LittleYellowSlime);
+ array_push(.@mb, Ratto);
+ array_push(.@mb, RudolphSlime);
+ array_push(.@mb, MoubooSlime);
+ array_push(.@mb, Croc);
+ array_push(.@mb, Scorpion);
+ array_push(.@mb, SmallFrog);
+ }
+ if (is_between2(20, .@lv, 80)) {
+ array_push(.@mb, BigFrog);
+ array_push(.@mb, Lavern);
+ array_push(.@mb, LittleRedSlime);
+ array_push(.@mb, ChocolateSlime);
+ array_push(.@mb, Blub);
+ array_push(.@mb, Duck);
+ array_push(.@mb, Bat);
+ array_push(.@mb, CaveMaggot);
+ array_push(.@mb, ManaGhost);
+ array_push(.@mb, ManaBug);
+ array_push(.@mb, Fluffy);
+ array_push(.@mb, FireGoblin);
+ array_push(.@mb, ViciousSquirrel);
+ array_push(.@mb, RedScorpion);
+ array_push(.@mb, WhiteSlime);
+ array_push(.@mb, AzulSlime);
+ array_push(.@mb, DesertLogHead);
+ }
+ if (is_between2(30, .@lv, 100)) {
+ array_push(.@mb, RedSlime);
+ array_push(.@mb, PoisonSpikyMushroom);
+ array_push(.@mb, DesertBandit);
+ array_push(.@mb, OceanCroc);
+ array_push(.@mb, ToppyBlub);
+ array_push(.@mb, Sarracenus);
+ array_push(.@mb, IceMaggot);
+ array_push(.@mb, VampireBat);
+ array_push(.@mb, Bandit);
+ array_push(.@mb, Pinkie);
+ array_push(.@mb, LivingPotato);
+ array_push(.@mb, Assassin);
+ array_push(.@mb, Skeleton);
+ }
+ if (is_between2(50, .@lv, 120)) {
+ array_push(.@mb, CaveSnake);
+ array_push(.@mb, GreenSlime);
+ array_push(.@mb, CopperSlime);
+ array_push(.@mb, YellowSlime);
+ array_push(.@mb, SantaSlime);
+ array_push(.@mb, LavaSlime);
+ array_push(.@mb, Bluepar);
+ array_push(.@mb, DeathCat);
+ array_push(.@mb, Moggun);
+ array_push(.@mb, SeaSlime);
+ array_push(.@mb, RedMushroom);
+ array_push(.@mb, Mouboo);
+ array_push(.@mb, LogHead);
+ array_push(.@mb, CandiedSlime);
+ array_push(.@mb, OldSnake);
+ array_push(.@mb, GrassSnake);
+ }
+ if (is_between2(60, .@lv, 140)) {
+ array_push(.@mb, GiantMaggot);
+ array_push(.@mb, IcedFluffy);
+ array_push(.@mb, Snake);
+ array_push(.@mb, BlackSlime);
+ array_push(.@mb, Tipiou);
+ array_push(.@mb, AlphaMouboo);
+ array_push(.@mb, Pollet);
+ array_push(.@mb, Snowman);
+ array_push(.@mb, PiouKnight);
+ array_push(.@mb, Shrewboo);
+ }
+ if (is_between2(70, .@lv, 160)) {
+ array_push(.@mb, Wolvern);
+ array_push(.@mb, FireSkull);
+ array_push(.@mb, DarkLizard);
+ }
+ if (is_between2(90, .@lv, 180)) {
+ array_push(.@mb, ArmoredSkeleton);
+ array_push(.@mb, BlackScorpion);
+ array_push(.@mb, ElectroWorm);
+ array_push(.@mb, EarthFairy);
+ array_push(.@mb, FireFairy);
+ array_push(.@mb, WaterFairy);
+ array_push(.@mb, WindFairy);
+ array_push(.@mb, PoisonFairy);
+ array_push(.@mb, MountainSnake);
+ array_push(.@mb, HoodedNinja);
+ array_push(.@mb, ForestMushroom);
+ array_push(.@mb, GoldenScorpion);
+ }
+ if (is_between2(110, .@lv, 200)) {
+ array_push(.@mb, Yeti);
+ array_push(.@mb, FallenGuard1);
+ array_push(.@mb, GreenSlimeMother);
+ array_push(.@mb, SnowFlower);
+ array_push(.@mb, BlueSlimeMother);
+ array_push(.@mb, WickedMushroom);
+ array_push(.@mb, CopperSlimeMother);
+ array_push(.@mb, YellowSlimeMother);
+ array_push(.@mb, RedSlimeMother);
+ array_push(.@mb, ChocolateSlimeMother);
+ array_push(.@mb, WhiteSlimeMother);
+ array_push(.@mb, Archant);
+ array_push(.@mb, Scar);
+ }
+ if (is_between2(140, .@lv, 220)) {
+ array_push(.@mb, AzulSlimeMother);
+ array_push(.@mb, SeaSlimeMother);
+ array_push(.@mb, LavaSlimeMother);
+ array_push(.@mb, BlackSlimeMother);
+ array_push(.@mb, Crafty);
+ array_push(.@mb, Forain);
+ array_push(.@mb, GreenDragon);
+ array_push(.@mb, Michel);
+ array_push(.@mb, Troll);
+ }
+ if (is_between2(160, .@lv, 240)) {
+ array_push(.@mb, EliteDuck);
+ array_push(.@mb, AzulSkullSlime);
+ array_push(.@mb, Moonshroom);
+ array_push(.@mb, RedSkullSlime);
+ array_push(.@mb, Terranite);
+ array_push(.@mb, JackO);
+ array_push(.@mb, BlackMamba);
+ array_push(.@mb, GreenSkullSlime);
+ array_push(.@mb, BloodyMouboo);
+ array_push(.@mb, Centaur);
+ array_push(.@mb, GoboBear);
+ }
+ if (is_between2(180, .@lv, 260)) {
+ array_push(.@mb, CopperSkullSlime);
+ array_push(.@mb, LavaSkullSlime);
+ array_push(.@mb, BlackSkullSlime);
+ array_push(.@mb, GiantCaveMaggot);
+ array_push(.@mb, TerraniteProtector);
+ array_push(.@mb, VanityPixie);
+ array_push(.@mb, HolyPixie);
+ }
+ if (is_between2(200, .@lv, 280)) {
+ array_push(.@mb, ShadowPixie);
+ array_push(.@mb, NulityPixie);
+ array_push(.@mb, Reaper);
+ array_push(.@mb, NightmareDragon);
+ array_push(.@mb, Snail);
+ array_push(.@mb, WhirlyBird);
+ }
+ if (is_between2(250, .@lv, 350)) {
+ array_push(.@mb, PinkieSuseran);
+ array_push(.@mb, Mandragora);
+ array_push(.@mb, PinkieMaximus);
+ }
+ if (.@lv > 240) {
+ array_push(.@mb, Junglefowl);
+ array_push(.@mb, Tengu);
+ array_push(.@mb, Moubi);
+ }
+ if (.@lv > 260) {
+ array_push(.@mb, SuperiorShroom);
+ array_push(.@mb, Nutcracker);
+ array_push(.@mb, Golem);
+ }
+ if (.@lv > 280) {
+ array_push(.@mb, SiegeTower);
+ array_push(.@mb, GreenhornAbomination);
+ array_push(.@mb, ShadowTortuga);
+ array_push(.@mb, FireElement);
+ array_push(.@mb, WaterElement);
+ array_push(.@mb, EarthElement);
+ array_push(.@mb, WindElement);
+ }
+ if (.@lv > 320) {
+ array_push(.@mb, SacredWisp);
+ array_push(.@mb, EvilWisp);
+ array_push(.@mb, PanthomWisp);
+ array_push(.@mb, EpiphanyWisp);
+ }
+ if (.@lv >= 350)
+ array_push(.@mb, Tortuga);
+
+ /* The final attack pattern is aimed at nukes */
+ if (.@lv >= 900)
+ .@lv *= 3; // 12 -> 36 mobs
+
+ /* Spawn them and make hostile */
+ .@mid = any_of(.@mb);
+ .@m=areamonster("006-9", 35, 63, 36, 65, strmobinfo(1, .@mid), .@mid, 1);
+ set_aggro(.@m);
+ /* After five minutes, spawn some globally */
+ freeloop(true);
+ for (.@i = 0; .@i < 2+(.@lv / 75); .@i++) {
+ .@mid = any_of(.@mb);
+ .@m=areamonster("006-9", 20, 20, getmapinfo(MAPINFO_SIZE_X,"006-9"), getmapinfo(MAPINFO_SIZE_Y,"006-9"), strmobinfo(1, .@mid), .@mid, 1);
+ set_aggro(.@m);
+ }
+ freeloop(false);
+ return;
+}
+
OnInit:
.distance=3;
+ .price=2400;
+ .diff = 0;
end;
}
diff --git a/npc/functions/hub.txt b/npc/functions/hub.txt
index a662c894c..f836da910 100644
--- a/npc/functions/hub.txt
+++ b/npc/functions/hub.txt
@@ -178,6 +178,15 @@ function script HUB_Logout {
@crazypoints=0;
}
}
+ // Died or logged out at Candor Survival
+ if (.@mapa$ == "006-9") {
+ .@score = gettimetick(2)-$@SURVIVAL_CANDOR;
+ if (.@score > SCANDORPTS) {
+ SCANDORPTS=.@score;
+ dispbottom l("Candor Survival : New Highscore: %s", FuzzyTime(gettimetick(2)+.@score));
+ }
+ warp "005-1", 66, 63;
+ }
// Died or logged during Bandit Lord fight
if (.@mapa$ == "015-2") {
if (isin("015-2", 228, 227, 282, 280))