summaryrefslogtreecommitdiff
path: root/npc/006-1
diff options
context:
space:
mode:
Diffstat (limited to 'npc/006-1')
-rw-r--r--npc/006-1/crazyfefe.txt19
1 files changed, 16 insertions, 3 deletions
diff --git a/npc/006-1/crazyfefe.txt b/npc/006-1/crazyfefe.txt
index aac877ccd..bf5e10bdf 100644
--- a/npc/006-1/crazyfefe.txt
+++ b/npc/006-1/crazyfefe.txt
@@ -63,6 +63,7 @@ L_Next:
goto L_StartFight;
}
+ @crazypoints=1;
initnpctimer;
announce $@FEFE_CAVE_HERO$+" invites everyone to a challenge against Candor Cave. It'll start in "+FuzzyTime($@FEFE_DELAY,2,2)+". Prepare yourselves!", bc_all|bc_npc;
mesn;
@@ -239,7 +240,7 @@ L_Summon:
L_CleanUp:
mapannounce "006-1", "Game over! Who will be the next to fall on Crazyfefe's Cave?", 0;
- areatimer "006-1", 20, 20, 70, 60, 10, "Crazyfefe::OnReward";
+ areatimer "006-1", 20, 20, 70, 60, 10, "Crazyfefe::OnReward2";
$@FEFE_CAVE_LEVEL = 0;
$@FEFE_WAVE = 0;
$@FEFE_CAVE_HERO$ = "";
@@ -255,19 +256,31 @@ L_CleanUp:
-
-
+// Special case for survivors.
+OnReward2:
+ if (@crazypoints > CRAZYPOINTS) {
+ CRAZYPOINTS=@crazypoints;
+ dispbottom l("Crazyfefe Cave: New Highscore: @@ points", CRAZYPOINTS);
+ @crazypoints=0;
+ }
// Rewards surviving players between rounds, according to performance, and get rid of dead PCs.
OnReward:
if (ispcdead()) {
recovery(getcharid(3));
warp "Save", 0, 0;
+ // If your current points is more than your top, update
+ if (@crazypoints > CRAZYPOINTS) {
+ CRAZYPOINTS=@crazypoints;
+ dispbottom l("Crazyfefe Cave: New Highscore: @@ points", CRAZYPOINTS);
+ @crazypoints=0;
+ }
end;
}
// Player reward is a random number based on current wave + lvl/50 (1 point ~= 12~8 mobs)
.@prize=rand($@FEFE_WAVE/2,$@FEFE_WAVE) + ($@FEFE_CAVE_LEVEL/50);
Zeny=Zeny+.@prize;
getexp .@prize, rand(1,3);
+ @crazypoints+=1;
end;
// Every 5 seconds, handle cave, if fighting. Does nothing when waiting.