more survival.cfg fixes
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@7179 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
+30
-24
@@ -123,8 +123,8 @@ const changespeed [
|
||||
if (> $curspeed $targetspeed) [
|
||||
loops = (- $curspeed $targetspeed)
|
||||
] [ loops = (- $targetspeed $curspeed) ]
|
||||
loop i $loops [
|
||||
sleep (* $i $increments) [ gamespeed ((at [+ -] (> $curspeed $targetspeed)) $gamespeed 1) ]
|
||||
loop CSL $loops [
|
||||
sleep (* $CSL $increments) [ gamespeed ((at [+ -] (> $curspeed $targetspeed)) $gamespeed 1) ]
|
||||
]
|
||||
sleep (* $loops $increments) [ changingspeed = 0 ]
|
||||
] [ changingspeed = 0 ]
|
||||
@@ -136,8 +136,8 @@ const changegamma [
|
||||
if (> $curgamma $targetgamma) [
|
||||
loopss = (- $curgamma $targetgamma)
|
||||
] [ loopss = (- $targetgamma $curgamma) ]
|
||||
loop t $loopss [
|
||||
sleep (* $t $incrementss) [ gamma ((at [+ -] (> $curgamma $targetgamma)) $gamma 1) ]
|
||||
loop CGL $loopss [
|
||||
sleep (* $CGL $incrementss) [ gamma ((at [+ -] (> $curgamma $targetgamma)) $gamma 1) ]
|
||||
]
|
||||
sleep (* $loopss $incrementss) [ changinggamma = 0 ]
|
||||
] [ changinggamma = 0 ]
|
||||
@@ -159,8 +159,10 @@ const checkzone [
|
||||
if (isInZone) startSurvival
|
||||
if (>= (- (millis) $startPreSurvMillis) $timeUntilTele) teleportPlayer
|
||||
] [
|
||||
if (&& (>= (- (millis) $startSurvMillis) 500) (|| (|| (idlebots 2) (! (botsshoot 2))) $editing)) [ endSurvival (concatword (genSurvDifStr) (red) " Error: " (blue) editmode (white) ", " (yellow) idlebots (white) ", and " (green) botsshoot (white) " are not allowed in Survival Mode.") ]
|
||||
if (&& (! (alive)) (>= (- (millis) $startSurvMillis) 500)) [ finalSurvMillis = (- (millis) $startSurvMillis); endSurvival (concatword (genSurvDifStr) (red) " You survived for " (white) (divf $finalSurvMillis 1000) (red) " seconds, killed " (white) $survKills (red) " enemies. Average: " (white) (divf (listaverage $survTimeBetKills) 1000) (red) " seconds between kills. Total Damage Dealt: " (white) $survTotalDmg) ]
|
||||
if (>= (- (millis) $startSurvMillis) 500) [
|
||||
if (|| $editing (|| (idlebots 2) (! (botsshoot 2)))) [ endSurvival (concatword (genSurvDifStr) (red) [ Error: editmode, idlebots, and botsshoot are not allowed in bot survival mode.]) 1 ]
|
||||
if (! (alive)) [ finalSurvMillis = (- (millis) $startSurvMillis); endSurvival (concatword (genSurvDifStr) (red) [ You survived for ] (white) (divf $finalSurvMillis 1000) (red) [ seconds, killed ] (white) $survKills (red) [ enemies. Average: ] (white) (divf (listaverage $survTimeBetKills) 1000) (red) [ seconds between kills. Total Damage Dealt: ] (white) $survTotalDmg) ]
|
||||
]
|
||||
if (&& (! (isInZone)) (! $startedOBCount)) startOBCount
|
||||
if (&& (>= (- (millis) $lastCheckPoint) $timeBetChkPts) $gotCheckPoint) increaseDifficulty
|
||||
if $survDamageEffects [
|
||||
@@ -174,10 +176,12 @@ const checkzone [
|
||||
]
|
||||
|
||||
const startOBCount [
|
||||
startedOBCount = 1; startOBMillis = (millis); backInZone = 0; tmpSCtr = 5
|
||||
echo (red)Get back into the arena! (white)You only have (red)5 (white)seconds to return.
|
||||
loop soc 5 [ sleep (* $soc 1000) [ if (&& (! $survIsFinished) (&& (! (isInZone)) (! $backInZone))) [ if $spamSurvMsgs [ hudecho (concatword (orange) $tmpSCtr ...) ] [ echo (concatword (orange) $tmpSCtr ...) ]; -= tmpSCtr 1 ] [ backInZone = 1 ] ] ]
|
||||
sleep 5000 [ if (&& (! (isInZone)) (&& (! $backInZone) (>= (- (millis) $startOBMillis) 5000))) [ endSurvival (concatword (genSurvDifStr) (red) " You took too long to return to the arena!") ] [ startedOBCount = 0 ] ]
|
||||
if (&& (! $survIsFinished) $startedSurvival) [
|
||||
startedOBCount = 1; startOBMillis = (millis); backInZone = 0; tmpSCtr = 5
|
||||
echo (red)Get back into the arena! (white)You only have (red)5 (white)seconds to return.
|
||||
loop soc 5 [ sleep (* $soc 1000) [ if (&& (! $survIsFinished) (&& (! (isInZone)) (! $backInZone))) [ if $spamSurvMsgs [ hudecho (concatword (orange) $tmpSCtr ...) ] [ echo (concatword (orange) $tmpSCtr ...) ]; -= tmpSCtr 1 ] [ backInZone = 1 ] ] ]
|
||||
sleep 5000 [ if (&& (! (isInZone)) (&& (! $backInZone) (>= (- (millis) $startOBMillis) 5000))) [ endSurvival (concatword (genSurvDifStr) (red) [ You took too long to return to the arena!]) 1 ] [ startedOBCount = 0 ] ]
|
||||
]
|
||||
]
|
||||
|
||||
const increaseDifficulty [
|
||||
@@ -189,22 +193,24 @@ const increaseDifficulty [
|
||||
]
|
||||
|
||||
const endSurvival [
|
||||
tmp_survstr = $arg1; survIsFinished = 1; startedSurvival = 0; survNumBots = (at $tmpSurvSets 0)
|
||||
checkinit mapstartonce [
|
||||
if (! $dyngamma) [ gamma (at $survOrigSets 0) ]; gamespeed 100
|
||||
if (&& (strstr $tmp_survstr " You survived for ") (strstr $tmp_survstr " enemies. Average: ")) [
|
||||
echo (green)Bot Survival results for map: (white) (at $tmpSurvSets 1)
|
||||
if (!= (at $tmpSurvSets 2) (at $tmpSurvSets 3)) [
|
||||
if (= (at $tmpSurvSets 5) 1) [ sleep 5 [ echo (concatword (yellow) (format "you were %1 by %2" (gibmessage (at $tmpSurvSets 4)) (at $tmpSurvSets 6))) ] ] [
|
||||
sleep 5 [ echo (concatword (yellow) (format [you were %1 by %2] (fragmessage (at $tmpSurvSets 4)) (at $tmpSurvSets 6))) ]
|
||||
]
|
||||
] [ sleep 5 [ echo (concatword (yellow) you suicided!) ] ]
|
||||
if (! $survIsFinished) [
|
||||
tmp_survstr = $arg1; survIsFinished = 1; startedSurvival = 0; survNumBots = (at $tmpSurvSets 0)
|
||||
checkinit mapstartonce [
|
||||
if (! $dyngamma) [ gamma (at $survOrigSets 0) ]; gamespeed 100
|
||||
if (< $numargs 2) [
|
||||
echo (green)Bot Survival results for map: (white) (at $tmpSurvSets 1)
|
||||
if (!= (at $tmpSurvSets 2) (at $tmpSurvSets 3)) [
|
||||
if (= (at $tmpSurvSets 5) 1) [ sleep 5 [ echo (concatword (yellow) (format [you were %1 by %2] (gibmessage (at $tmpSurvSets 4)) (at $tmpSurvSets 6))) ] ] [
|
||||
sleep 5 [ echo (concatword (yellow) (format [you were %1 by %2] (fragmessage (at $tmpSurvSets 4)) (at $tmpSurvSets 6))) ]
|
||||
]
|
||||
] [ sleep 5 [ echo (concatword (yellow) (concat you suicided!)) ] ]
|
||||
]
|
||||
echo $tmp_survstr
|
||||
if (&& $spamSurvMsgs $survKills) [ hudecho (green)GG ]
|
||||
]
|
||||
echo $tmp_survstr
|
||||
if (&& $spamSurvMsgs $survKills) [ hudecho (green)GG ]
|
||||
if (curmodeattr bot) kickallbots
|
||||
tdm (rndmap)
|
||||
]
|
||||
if (curmodeattr bot) kickallbots
|
||||
tdm (rndmap)
|
||||
]
|
||||
|
||||
// List of aliases that need to be cleared from saved.cfg on quit:
|
||||
|
||||
Reference in New Issue
Block a user