summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--npc/006-1/crazyfefe.txt14
1 files changed, 10 insertions, 4 deletions
diff --git a/npc/006-1/crazyfefe.txt b/npc/006-1/crazyfefe.txt
index af3594bd6..d8e3e1ee6 100644
--- a/npc/006-1/crazyfefe.txt
+++ b/npc/006-1/crazyfefe.txt
@@ -131,14 +131,17 @@ L_Exit:
// Check if we're ready for next wave. Otherwise, do this check again after 5 seconds.
L_CaveLogic:
+ .wtime+=5; // This is looped every 5 s
$@FEFE_CAVE_PLAYER_COUNT = getmapusers("006-1");
- if (mobcount("006-1", "Crazyfefe::OnPetDeath") <= 0)
+
+ // New wave condition: All mobs dead, or 5 minutes have passed
+ if (mobcount("006-1", "Crazyfefe::OnPetDeath") <= 0 || .wtime >= 300)
goto L_NextRound;
// Victory conditions: Too few players are alive OR twenty minutes went on.
- // WARNING, if dead players still in cave are counted, we might never finish the fight.
+ // WARNING, dead players still in cave are counted, we might never finish the fight.
// And a GM might be called to ban everyone inside.
- if ($@FEFE_CAVE_PLAYER_COUNT <= any(1,1,1,2) && !$@GM_OVERRIDE || gettimetick(2) >= $@FEFE_DELAY - (60*40)) {
+ if ($@FEFE_CAVE_PLAYER_COUNT <= any(1,1,1,1,1,1,1,1,1,2) && !$@GM_OVERRIDE || gettimetick(2) >= $@FEFE_DELAY - (60*40)) {
goto L_CleanUp;
}
@@ -147,6 +150,7 @@ L_CaveLogic:
end;
L_NextRound:
+ .wtime=0;
$@FEFE_WAVE = $@FEFE_WAVE + 1;
// Prepare next round, and reward survivors
$@FEFE_CAVE_LEVEL = $@FEFE_CAVE_LEVEL + $@FEFE_CAVE_PLAYER_COUNT + rand(1,3) + $@FEFE_WAVE;
@@ -214,6 +218,7 @@ L_CleanUp:
$@FEFE_CAVE_LEVEL = 0;
$@FEFE_WAVE = 0;
$@FEFE_CAVE_HERO$ = "";
+ .wtime=0;
killmonster "006-1", "Crazyfefe::OnPetDeath";
stopnpctimer;
initnpctimer;
@@ -259,6 +264,7 @@ OnInit:
.sex=G_OTHER;
.distance=5;
.price=8000;
- .delay=(60*60*1);
+ .delay=(60*40);
+ .wtime=0;
end;
}