diff --git a/config/scripts.cfg b/config/scripts.cfg index 81d17c29..d85dc655 100644 --- a/config/scripts.cfg +++ b/config/scripts.cfg @@ -402,7 +402,7 @@ setmr = [ ] // storesets - Generates an alias (list) of the current values for the given CVARs. -omit_idents = "curname curteam name" +omit_idents = "curname curteam idlebots name" storesets = [ if (> $numargs 1) [ diff --git a/config/survival.cfg b/config/survival.cfg index 937592f9..ec4dd93b 100644 --- a/config/survival.cfg +++ b/config/survival.cfg @@ -20,7 +20,7 @@ resetSurvAliases = [ resetSurvAliases survival = [ - positiontype 1; kickallbots; resetSurvAliases + storesets "positiontype" tmpSurvSets; add2list tmpSurvSets $survNumBots; curSurvDifficulty = 0; positiontype 1; resetSurvAliases if (! (strstr $onKill survKills)) [ add2alias onKill [ += survKills 1 ] ] add2alias mapstartonce [ echo (c 2)Bot survival mode prepared...load up on items and find the arena to start! @@ -31,7 +31,7 @@ survival = [ ] startSurvival = [ - tmpSurvNumBots = $survNumBots; curSurvDifficulty = 0; startedSurvival = 1; startSurvMillis = (millis) + startedSurvival = 1; startSurvMillis = (millis) addnbot $survNumBots CLA bad sleep 2500 [ echo (c 3)Starting survival mode, good luck! ] sleep $timeBetChkPts [ gotCheckPoint = 1; increaseDifficulty ] @@ -58,7 +58,7 @@ survOfcZones = [ ac_gothic 47.10 83.90 41.10 83.90 ac_iceroad 325.10 374.90 244.10 274.90 ac_industrial 319.10 357.90 180.10 244.90 - ac_ingress 92.10 119.90 68.10 98.90 + ac_ingress 133.10 181.90 66.10 112.90 ac_keller 66.10 100.90 222.10 244.90 ac_mines 83.10 110.90 117.10 131.90 ac_outpost 61.10 99.90 73.10 98.90 @@ -93,10 +93,11 @@ isInZone = [ checkzone = [ if (! $survIsFinished) [ - if (&& (&& $startedSurvival $gotCheckPoint) (>= (- (millis) $lastCheckPoint) $timeBetChkPts)) [ increaseDifficulty ] + if (|| $editing (|| (> $gamespeed 100) (< $gamespeed 100))) [ endSurvival (concatword (c 3) "Error: " (c 1) editmode (c 5) " and " (c 1) gamespeed (c 5) " are not allowed in Survival Mode.") ] if (&& (isInZone) (! $startedSurvival)) [ startSurvival ] - if (&& (! (alive)) $startedSurvival) [ finalSurvMillis = (- (millis) $startSurvMillis); endSurvival (concatword (c 3) "You survived for " (c 5) (divf $finalSurvMillis 1000) (c 3) " seconds, and killed " (c 5) $survKills (c 3) " enemies.") ] + if (&& (&& $startedSurvival $gotCheckPoint) (>= (- (millis) $lastCheckPoint) $timeBetChkPts)) [ increaseDifficulty ] if (&& (&& (! (isInZone)) $startedSurvival) (! $startedOBCount)) [ startOBCount ] + if (&& (! (alive)) $startedSurvival) [ finalSurvMillis = (- (millis) $startSurvMillis); endSurvival (concatword (c 3) "You survived for " (c 5) (divf $finalSurvMillis 1000) (c 3) " seconds, and killed " (c 5) $survKills (c 3) " enemies.") ] sleep 0 [ checkzone ] ] ] @@ -119,12 +120,12 @@ increaseDifficulty = [ ] endSurvival = [ - tmp_survstr = $arg1; startedSurvival = 0; survIsFinished = 1 - add2alias mapstartonce [ survNumBots = $tmpSurvNumBots; echo $tmp_survstr ] + tmp_survstr = $arg1; startedSurvival = 0; survIsFinished = 1; positiontype (at $tmpSurvSets 0) + add2alias mapstartonce [ survNumBots = (at $tmpSurvSets 1); echo $tmp_survstr ] tdm (at $defaultmaps (rnd (listlen $defaultmaps))) ] // List of aliases that need to be cleared from saved.cfg on quit: -survAliases = "backInZone checkzone curSurvDifficulty endSurvival finalSurvMillis gotCheckPoint increaseDifficulty isInZone lastCheckPoint onKill resetSurvAliases setOfcZones setzone startedOBCount startedSurvival startOBCount startOBMillis startSurvival startSurvMillis survIsFinished survival_test survKills survMapIndex survOfcZones tmpSurvCtr tmpSurvInt tmpSurvNumBots tmp_survstr tmpSurvZone zone checkSurvAliases survResetAliases survAliases" +survAliases = "backInZone checkzone curSurvDifficulty endSurvival finalSurvMillis gotCheckPoint increaseDifficulty isInZone lastCheckPoint onKill resetSurvAliases setOfcZones setzone startedOBCount startedSurvival startOBCount startOBMillis startSurvival startSurvMillis survIsFinished survival_test survKills survMapIndex survOfcZones tmpSurvCtr tmpSurvInt tmpSurvSets tmp_survstr tmpSurvZone zone checkSurvAliases survResetAliases survAliases" addListOnQuit $survAliases \ No newline at end of file