summaryrefslogtreecommitdiff
path: root/npc/006-1/crazyfefe.txt
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2019-04-03 15:14:05 -0300
committerJesusaves <cpntb1@ymail.com>2019-04-03 15:14:05 -0300
commit830e23d824191c4537fac69710c8a6d43d9fa0f8 (patch)
treed5c5586f6deee4eb09ba74d73bef8a3566ff2d43 /npc/006-1/crazyfefe.txt
parent0c455178412cdb8a0ee9029830b72f5702f03366 (diff)
downloadserverdata-830e23d824191c4537fac69710c8a6d43d9fa0f8.tar.gz
serverdata-830e23d824191c4537fac69710c8a6d43d9fa0f8.tar.bz2
serverdata-830e23d824191c4537fac69710c8a6d43d9fa0f8.tar.xz
serverdata-830e23d824191c4537fac69710c8a6d43d9fa0f8.zip
Candor Fight doesn't uses L_abels anymore (not sure why, but meh)
Diffstat (limited to 'npc/006-1/crazyfefe.txt')
-rw-r--r--npc/006-1/crazyfefe.txt19
1 files changed, 11 insertions, 8 deletions
diff --git a/npc/006-1/crazyfefe.txt b/npc/006-1/crazyfefe.txt
index fffbaec9c..106c98e52 100644
--- a/npc/006-1/crazyfefe.txt
+++ b/npc/006-1/crazyfefe.txt
@@ -25,6 +25,8 @@
function aboutCandor;
function StartFight;
function CleanUp;
+ function CaveLogic;
+ function NextRound;
// Battle already begun
if ($@FEFE_WAVE)
@@ -154,6 +156,7 @@ function StartFight {
}
$@FEFE_CAVE_LEVEL = 1;
+ $@FEFE_WAVE = 0;
$@FEFE_DELAY = gettimetick(2)+.delay;
$@FEFE_CAVE_PLAYER_COUNT = getmapusers("006-1");
mapannounce("006-1", "The battle is about to begin!", bc_map);
@@ -171,16 +174,17 @@ function StartFight {
// Recalc difficulty
OnSumLevel:
if (ispcdead()) end;
- $@FEFE_DIFFICULTY+=BaseLevel; end;
+ $@FEFE_DIFFICULTY+=BaseLevel;
+ end;
// Check if we're ready for next wave. Otherwise, do this check again after 5 seconds.
-L_CaveLogic:
+function CaveLogic {
.wtime+=5; // This is looped every 5 s
$@FEFE_CAVE_PLAYER_COUNT = getmapusers("006-1");
// New wave condition: All mobs dead, or 5 minutes have passed
if (mobcount("006-1", "Crazyfefe::OnPetDeath") <= 0 || .wtime >= 240)
- goto L_NextRound;
+ NextRound();
// Victory conditions: Too few players are alive OR twenty minutes went on.
// WARNING, dead players still in cave are counted, we might never finish the fight.
@@ -196,8 +200,9 @@ L_CaveLogic:
// reset timer
initnpctimer;
end;
+}
-L_NextRound:
+function NextRound {
.wtime=0;
$@FEFE_WAVE = $@FEFE_WAVE + 1;
// Prepare next round, and reward survivors
@@ -207,10 +212,7 @@ L_NextRound:
areatimer "006-1", 20, 20, 70, 60, 10, "Crazyfefe::OnReward";
mapannounce "006-1", "The wave nÂș "+$@FEFE_WAVE+" is starting with " + $@FEFE_CAVE_PLAYER_COUNT + " player(s) left alive." , 0;
- goto L_Summon;
-// TODO
-L_Summon:
.@amount=($@FEFE_CAVE_LEVEL/rand(4,6))+1;
freeloop(true);
for (.@i = 0; .@i < .@amount; ++.@i) {
@@ -268,6 +270,7 @@ L_Summon:
freeloop(false);
initnpctimer;
end;
+}
function CleanUp {
mapannounce "006-1", "Game over! Who will be the next to fall on Crazyfefe's Cave?", 0;
@@ -318,7 +321,7 @@ OnReward:
// Every 5 seconds, handle cave, if fighting. Does nothing when waiting.
OnTimer5000:
if ($@FEFE_CAVE_LEVEL)
- goto L_CaveLogic;
+ CaveLogic();
end;
// Announces and attempts to start the fight once time run out