timeoffset_postintermission 2
time_forgetfulness 3
-raw set places_tuba "tUba1 tUba2 tUba3 tUba4 tUba5 tUba6 tUba7 tUba8 tUba9 tUba10 tUba11 tUba12 tUba13 tUba14 tUba15 tUba16 tUba17 tUba18 tUba19 tUba20 tUba21 tUba22 tUba23 tUba24 tUba25 tUba26 tUba27 tUba28 tUba29 tUba30 tUba31 tUba32"
-raw set places_percussion "tChr1 tChr2 tChr3 tChr4 tChr5 tChr6 tChr7 tChr8 tChr9 tChr10 tChr11 tChr12 tChr13 tChr14 tChr15 tChr16 tChr17 tChr18 tChr19 tChr20 tChr21 tChr22 tChr23 tChr24 tChr25 tChr26 tChr27 tChr38 tChr39 tChr30 tChr31 tChr32"
-raw set places_vocals "tVocals"
-raw set places_metalsteps "tMetalSteps1 tMetalSteps2 tMetalSteps3"
-raw set places_nosteps "tNoSteps1 tNoSteps2 tNoSteps3 tNoSteps4"
+list places_tuba tUba1 tUba2 tUba3 tUba4 tUba5 tUba6 tUba7 tUba8 tUba9 tUba10 tUba11 tUba12 tUba13 tUba14 tUba15 tUba16 tUba17 tUba18 tUba19 tUba20 tUba21 tUba22 tUba23 tUba24 tUba25 tUba26 tUba27 tUba28 tUba29 tUba30 tUba31 tUba32
+list places_percussion tChr1 tChr2 tChr3 tChr4 tChr5 tChr6 tChr7 tChr8 tChr9 tChr10 tChr11 tChr12 tChr13 tChr14 tChr15 tChr16 tChr17 tChr18 tChr19 tChr20 tChr21 tChr22 tChr23 tChr24 tChr25 tChr26 tChr27 tChr38 tChr39 tChr30 tChr31 tChr32
+list places_vocals tVocals
+list places_metalsteps tMetalSteps1 tMetalSteps2 tMetalSteps3
+list places_nosteps tNoSteps1 tNoSteps2 tNoSteps3 tNoSteps4
raw settemp bot_ai_thinkinterval 0
raw settemp bot_sound_monopoly 1
my $timeoffset_preintermission = 2;
my $timeoffset_postintermission = 2;
my $time_forgetfulness = 1.5;
+my %lists = ();
+my %listindexes = ();
my ($config, @midilist) = @ARGV;
{
$time_forgetfulness = $1;
}
+ elsif(/^list (.*?) (.*)/)
+ {
+ $lists{$1} = [split / /, $2];
+ $listindexes{$1} = 0;
+ }
else
{
print "unknown command: $_\n";
return 1;
}
+sub buildstring(@)
+{
+ return
+ join " ",
+ map
+ {
+ $_ =~ /^\@(.*)$/
+ ? do { $lists{$1}[$listindexes{$1}++ % @{$lists{$1}}]; }
+ : $_
+ }
+ @_;
+}
+
sub busybot_cmd_bot_execute($$@)
{
my ($bot, $time, @commands) = @_;
}
elsif($_->[0] eq 'cmd')
{
- $commands .= sprintf "sv_cmd bot_cmd %d %s\n", $bot->{id}, join " ", @{$_}[1..@$_-1];
+ $commands .= sprintf "sv_cmd bot_cmd %d %s\n", $bot->{id}, buildstring @{$_}[1..@$_-1];
}
elsif($_->[0] eq 'aim_random')
{
}
elsif($_->[0] eq 'raw')
{
- $commands .= sprintf "%s\n", join " ", @{$_}[1..@$_-1];
+ $commands .= sprintf "%s\n", buildstring @{$_}[1..@$_-1];
}
}
$noalloc = 0;
for(;;)
{
+ %listindexes = ();
$commands = "";
eval
{