some updates

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6513 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
Bukz
2011-06-06 15:36:20 +00:00
parent 083ca2cf4a
commit 54d64451b3
+11 -12
View File
@@ -18,12 +18,18 @@ resetSurvAliases = [
resetSurvAliases; if (! (checkalias afterinit)) [ afterinit = "" ]; if (! (strstr $afterinit survMap)) [ add2alias afterinit [ if (! (checkalias survMap)) [ survMap = (rnd (listlen $defaultmaps)) ] ] ]
genSurvDifStr = [
if $nonSurvDefaults [ result "[CUSTOM]"] [
result (at (concat (concatword (c 0) "[EASY]") (concatword (c 2) "[INTERMEDIATE]") (concatword (c 9) "[HARD]") (concatword (c 7) "[IMPOSSIBLE]")) $survDifficulty)
]
]
survival = [
tmpSurvSets = $survNumBots; curSurvDifficulty = 0; resetSurvAliases
if (|| (! (checkalias onKill)) (! (strstr $onKill survKills))) [ add2alias onKill [ += survKills 1 ] ]
add2alias mapstartonce [
add2alias mapstartonce [
startPreSurvMillis = (millis)
echo (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!
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!
if (strstr $defaultmaps (curmap 1)) [ survMap = (findlist $defaultmaps (curmap 1)) ]
setOfcZones; checkzone
]
@@ -32,7 +38,7 @@ survival = [
startSurvival = [
startedSurvival = 1; startSurvMillis = (millis); addnbot $survNumBots CLA bad
sleep 2500 [ if $survTeleported [ echo (c 9)You were teleported to the zone. ]; echo (c 3)Starting survival mode, good luck! ]
sleep 1000 [ if $survTeleported [ echo (c 9)You were teleported to the zone. ]; echo (c 3)Starting survival mode, good luck! ]
sleep $timeBetChkPts [ gotCheckPoint = 1; increaseDifficulty ]
]
@@ -105,14 +111,7 @@ 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);
if $nonSurvDefaults [
endSurvival (concatword "[CUSTOM] " (c 3) "You survived for " (c 5) (divf $finalSurvMillis 1000) (c 3) " seconds, and killed " (c 5) $survKills (c 3) " enemies.")
] [
endSurvival (concatword (at (concat (concatword (c 0) "[EASY]") (concatword (c 2) "[INTERMEDIATE]") (concatword (c 9) "[HARD]") (concatword (c 7) "[IMPOSSIBLE]")) $survDifficulty) (c 3) " You survived for " (c 5) (divf $finalSurvMillis 1000) (c 3) " seconds, and killed " (c 5) $survKills (c 3) " enemies.")
]
]
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.") ]
if (&& (! (curteam)) (! $startedSurvival)) [ team RVSF ]; sleep 0 [ checkzone ]
]
]
@@ -121,7 +120,7 @@ startOBCount = [
startedOBCount = 1; startOBMillis = (millis); backInZone = 0; tmpSCtr = 5
echo (c 3)Get back into the arena! (c 5)You only have (c 3)5 (c 5)seconds to return.
loop soc 5 [ sleep (* $soc 1000) [ if (&& (! $survIsFinished) (&& (! (isInZone)) (! $backInZone))) [ if $spamSurvMsgs [ hudecho (concatword (c 9) $tmpSCtr ...) ] [ echo (concatword (c 9) $tmpSCtr ...) ]; -= tmpSCtr 1 ] [ backInZone = 1 ] ] ]
sleep 5000 [ if (&& (! (isInZone)) (&& (! $backInZone) (>= (- (millis) $startOBMillis) 5000))) [ endSurvival (concatword (c 3) "You took too long to return to the arena!") ] [ startedOBCount = 0 ] ]
sleep 5000 [ if (&& (! (isInZone)) (&& (! $backInZone) (>= (- (millis) $startOBMillis) 5000))) [ endSurvival (concatword (genSurvDifStr) (c 3) " You took too long to return to the arena!") ] [ startedOBCount = 0 ] ]
]
increaseDifficulty = [