summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2019-03-31 12:35:22 -0300
committerJesusaves <cpntb1@ymail.com>2019-03-31 12:35:22 -0300
commitbcc665fb84a78d794c7310e3944ddf572aecb890 (patch)
treef212993b14b1ca92377253dedd6808261fa7e2d6
parentcc1bec4e1559fdebd385f668f893cd062a8ac8b8 (diff)
downloadserverdata-bcc665fb84a78d794c7310e3944ddf572aecb890.tar.gz
serverdata-bcc665fb84a78d794c7310e3944ddf572aecb890.tar.bz2
serverdata-bcc665fb84a78d794c7310e3944ddf572aecb890.tar.xz
serverdata-bcc665fb84a78d794c7310e3944ddf572aecb890.zip
Ugh, this code needs a total rewrite.
-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.