diff --git a/config/survival.cfg b/config/survival.cfg index 575ff7a0..36140053 100644 --- a/config/survival.cfg +++ b/config/survival.cfg @@ -9,7 +9,7 @@ // * If the player dies, or leaves the "zone" for too long of a duration, the game ends. // * Total seconds survived, total number of enemies killed during, and average amount of time between kills are reported as stats when the game ends. -const survResetAliases "gotCheckPoint lastCheckPoint survIsFinished startedSurvival startedOBCount startPreSurvMillis startSurvMillis survKills survTeleported" +const survResetAliases "gotCheckPoint lastCheckPoint survIsFinished startedSurvival startedOBCount startPreSurvMillis startSurvMillis survKills survTeleported survTotalDmg" const resetSurvAliases [ loop rsa (listlen $survResetAliases) [ (at $survResetAliases $rsa) = 0 ] @@ -46,6 +46,14 @@ const survival [ ] ] ] + if (! (checkalias onHit)) [ onHit = "" ] + if (! (strstr $onHit survTotalDmg)) [ + add2alias onHit [ // Use onHit for total damage dealt stat + if (&& (= $arg1 (player1 cn)) (!= $arg1 $arg2)) [ + += survTotalDmg $arg3 + ] + ] + ] add2alias mapstartonce [ startPreSurvMillis = (millis); add2list tmpSurvSets (curmap 1) echo (genSurvDifStr) (c 2)Bot survival mode prepared, gather items and find the arena to start! (c 9)You have (c 5) (div $timeUntilTele 1000) (c 9)seconds to prepare! @@ -120,7 +128,7 @@ const checkzone [ if (&& (! $startedSurvival) (>= (- (millis) $startPreSurvMillis) $timeUntilTele)) [ teleportPlayer ] if (&& (>= (- (millis) $lastCheckPoint) $timeBetChkPts) (&& $startedSurvival $gotCheckPoint)) [ increaseDifficulty ] if (&& (! $startedOBCount) (&& (! (isInZone)) $startedSurvival)) [ startOBCount ] - if (&& $startedSurvival (&& (! (alive)) (>= (- (millis) $startSurvMillis) 500))) [ finalSurvMillis = (- (millis) $startSurvMillis); endSurvival (concatword (genSurvDifStr) (c 3) " You survived for " (c 5) (divf $finalSurvMillis 1000) (c 3) " seconds, and killed " (c 5) $survKills (c 3) " enemies. Average: " (c 5) (divf (listaverage $survTimeBetKills) 1000) (c 3) " seconds between kills.") ] + if (&& $startedSurvival (&& (! (alive)) (>= (- (millis) $startSurvMillis) 500))) [ finalSurvMillis = (- (millis) $startSurvMillis); endSurvival (concatword (genSurvDifStr) (c 3) " You survived for " (c 5) (divf $finalSurvMillis 1000) (c 3) " seconds, killed " (c 5) $survKills (c 3) " enemies. Average: " (c 5) (divf (listaverage $survTimeBetKills) 1000) (c 3) " seconds between kills. Total Damage Dealt: " (white) $survTotalDmg) ] if (&& (! (curteam)) (! $startedSurvival)) [ team RVSF ]; sleep 0 [ checkzone ] ] ]