From fd3b5d17b94aca288091c382e27967c229d04c21 Mon Sep 17 00:00:00 2001 From: RandumKiwi Date: Sat, 18 Oct 2008 07:14:35 +0000 Subject: [PATCH] reverted git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@3118 e016b1c5-ed68-44aa-a2f7-31cac88cffde --- config/menus_bot.cfg | 58 +++++++++++++++++++++++++++++--------------- 1 file changed, 38 insertions(+), 20 deletions(-) diff --git a/config/menus_bot.cfg b/config/menus_bot.cfg index 65b28642..9d8e7a9d 100644 --- a/config/menus_bot.cfg +++ b/config/menus_bot.cfg @@ -6,7 +6,7 @@ alias genbotmaps [ loop i (listlen $arg1) [ alias listmapname (at $arg1 $i) alias menutext $listmapname (concat map $listmapname) - menuitem $menutext (concat "alias tmp_botmap" $listmapname "; preparebotmap") + menuitem $menutext (concat "alias tmp_botmap" $listmapname "; startbotmap") ] ] genbotmaps $defaultmaps @@ -16,39 +16,57 @@ alias tmp_numbots 1 alias tmp_mode alias tmp_botmap -// Add bots. +// add bots alias startbotmatch [ - if (= $tmp_mode 7) [ // Team bot numbers. + + if (= $tmp_mode 7) [ // TDM alias numrvsf (- (div $tmp_numbots 2) (curteam)) alias numcla (- (div $tmp_numbots 2) (= (curteam) 0)) addnbot $numrvsf RVSF $tmp_botskill addnbot $numcla CLA $tmp_botskill - ] [ // FFA bot numbers. + ] [ // DM addnbot $tmp_numbots ] ] -alias preparebotmap [ - while [ $connected 1 ] [ disconnect ] // Wait till disconnected before executing the next command. - kickallbots // Loose the bots. - mode $tmp_mode // Choose bot mode. - map $tmp_botmap // Choose map. - startbotmatch // Add bots. - ] +alias preparebotmatch [ + echo starting botmatch.. + + // register event that is fired during mapload + alias mapstartonce [ + kickallbots + startbotmatch // add bots + mode 0 // reset mode for next maps + ] + + mode $tmp_mode + map $tmp_botmap +] -alias emptymap [ - while [ $connected 1 ] [ disconnect ] // Wait till disconnected before executing the next command. - kickallbots // Loose the bots. - mode 1 // An inhert mode. - showmenu maps // Load a map. +// register events and change map +alias startbotmap [ + if $connected [ + alias mapstartonce [ preparebotmatch ] + disconnect + ] [ + preparebotmatch + ] +] + + +alias emptymap [ if $connected [ disconnect; alias mapstartonce [ emptymap2 ] ] [ emptymap2 ] ] +alias emptymap2 [ + mode 0 + showmenu maps ] newmenu singleplayer -menuitem "Bot Team Deathmatch" "alias tmp_mode 7; showmenu botskill" // Teamplay not mature yet -menuitem "Bot Deathmatch" "alias tmp_mode 8; showmenu botskill" -menuitem "Bot One Shot, One Kill" "alias tmp_mode 12; showmenu botskill" -menuitem "Empty Map" "emptymap" +// teamplay not mature yet +menuitem "Bot Team Deathmatch" "alias tmp_mode 7; showmenu botskill" +menuitem "Bot Deathmatch" "alias tmp_mode 8; showmenu botskill" +menuitem "Bot One Shot, One Kill" "alias tmp_mode 12; showmenu botskill" +menuitem "Empty Map" "emptymap" newmenu botskill