percussion 27
percussion 54 # 054_Tombourine-0.wav
percussion 27
+ percussion 36 # 036_Kick_2-0.wav
+ percussion 27
# grenadelauncher = RELOADSOUND RELOADSOUND
percussion 63 # 063_Conga_High_2_Open-0.wav
percussion 62
-# seeker is rocket tag
+# seeker is BADFLYSOUND tag
bot seeker
channels 10
init
cmd barrier
cmd selectweapon 18
cmd wait 0.5
- percussion 51 # 051_Cymbal_Ride_1-0.wav
- time 0
- buttons attack1
- time 0.05
- buttons
- time 0.1
- busy 0.25
percussion 41 # 041_Tom_Low_2-0.wav
time 0
buttons attack2
buttons
time 0.1
busy 0.75
+ percussion 51 # 051_Cymbal_Ride_1-0.wav
+ percussion 41
percussion 43 # 043_Tom_Low_1-0.wav
percussion 41
percussion 59 # 059_Cymbal_Ride_2-0.wav
- percussion 51
+ percussion 41
+ percussion 46 # 046_Hi-Hat_Open-0.wav
+ percussion 41
# rifle is hard soft
bot rifle
bot jetpack
init
- cmd resetaim
+ time -2
+ cmd aimtarget "tPercussion 1"
cmd barrier
cmd console "g_jetpack_attenuation 0.5"
+ cmd wait 0.5
percussion 42 # 042_Hi-Hat_Closed-0.wav
time 0
buttons hook
time 0.1
percussion 32 # 032_Square_Click-0.wav
percussion 42
- percussion 36 # 036_Kick_2-0.wav
- percussion 42
percussion 44 # 044_Hi-Hat_Pedal-0.wav
percussion 42
- percussion 46 # 046_Hi-Hat_Open-0.wav
- time 0
- buttons hook
- time 0.134
- buttons
- time 0.2
percussion 64 # 064_Conga_Low-0.wav
percussion 42
+bot vocals
+ init
+ time -2
+ cmd aimtarget "tPercussion 1"
+ cmd barrier
+ cmd wait 0.5
+ vocals
+ time 0
+ cmd sound %s
+ buttons left
+ time 0.06666
+ buttons right
+ time 0.13333
+ buttons
+
bot common
done
cmd resetaim
bot instance_laser
include laser
include common
- count 12
+ count 16
init
cmd movetotarget @places_percussion
cmd barrier
bot instance_shotgun
include shotgun
include common
- count 2
+ count 16
init
cmd movetotarget @places_percussion
cmd barrier
bot instance_uzi
include uzi
include common
- count 4
+ count 16
init
cmd movetotarget @places_percussion
cmd barrier
bot instance_electro
include electro
- count 2
+ include common
+ count 16
init
cmd movetotarget @places_percussion
cmd barrier
bot instance_crylink
include crylink
include common
- count 4
+ count 16
init
cmd movetotarget @places_percussion
cmd barrier
bot instance_nex
include rocket
include common
- count 2
+ count 16
init
cmd movetotarget @places_percussion
cmd barrier
bot instance_minstanex
include rocket
include common
- count 2
+ count 16
init
cmd movetotarget @places_percussion
cmd barrier
bot instance_hagar
include hagar
include common
- count 8
+ count 16
init
cmd movetotarget @places_percussion
cmd barrier
bot instance_rocket
include rocket
include common
- count 4
+ count 16
init
cmd movetotarget @places_percussion
cmd barrier
bot instance_hook
include hook
- count 4
+ include common
+ count 16
init
cmd movetotarget @places_percussion
cmd barrier
bot instance_seeker
include seeker
- count 4
+ include common
+ count 16
init
cmd movetotarget @places_percussion
cmd barrier
bot instance_rifle
include rifle
include common
- count 2
+ count 16
init
cmd movetotarget @places_percussion
cmd barrier
bot instance_jetpack
include jetpack
include common
- count 2
+ count 16
+ init
+ cmd movetotarget @places_percussion
+ cmd barrier
+ super
+
+bot instance_vocals
+ include vocals
+ include common
+ count 1
init
+ cmd cc "playermodel models/player/suiseiseki.zym"
cmd movetotarget @places_percussion
cmd barrier
super
use MIDI::Opus;
use Storable;
+use constant SYS_TICRATE => 0.033333;
use constant MIDI_FIRST_NONCHANNEL => 17;
use constant MIDI_DRUMS_CHANNEL => 10;
$super = $currentbot->{percussion}->{$1};
$currentbot->{percussion}->{$1} = $appendref = [];
}
+ elsif(/^vocals$/)
+ {
+ $super = $currentbot->{vocals};
+ $currentbot->{vocals} = $appendref = [];
+ }
else
{
print "unknown command: $_\n";
my $botbusytime = defined $bot->{busytimer} ? $bot->{busytimer} : -1;
return 0
- if $time < $botbusytime;
+ if $time < $botbusytime + SYS_TICRATE;
my $mintime = (@commands && ($commands[0]->[0] eq 'time')) ? $commands[0]->[1] : 0;
return 0
- if $time + $mintime < $bottime;
+ if $time + $mintime < $bottime + SYS_TICRATE;
return 1;
}
if defined $bot->{channels} and not $bot->{channels}->{$channel};
my $cmds;
my $cmds_off;
- if($channel == 10)
+ if($channel <= 0)
{
+ # vocals
+ $cmds = $bot->{vocals};
+ $cmds_off = undef;
+ if(defined $cmds)
+ {
+ $cmds = [ map { [ map { $_ eq '%s' ? $note : $_ } @$_ ] } @$cmds ];
+ }
+ }
+ elsif($channel == 10)
+ {
+ # percussion
$cmds = $bot->{percussion}->{$note};
$cmds_off = undef;
}
else
{
+ # music
$cmds = $bot->{notes_on}->{$note - ($bot->{transpose} || 0) - $transpose};
$cmds_off = $bot->{notes_off}->{$note - ($bot->{transpose} || 0) - $transpose};
}
#print STDERR "note off $time:$channel:$note\n";
+ return 0
+ if $channel <= 0;
return 0
if $channel == 10;
push @allmidievents, [$command, $tick, $sequence++, $track, @data];
}
}
+
+ if(open my $fh, "$filename.vocals")
+ {
+ my $scale = 1;
+ my $shift = 0;
+ for(<$fh>)
+ {
+ chomp;
+ my ($tick, $file) = split /\s+/, $_;
+ if($tick eq 'scale')
+ {
+ $scale = $file;
+ }
+ elsif($tick eq 'shift')
+ {
+ $shift = $file;
+ }
+ else
+ {
+ push @allmidievents, ['note_on', $tick * $scale + $shift, $sequence++, -1, -1, $file];
+ push @allmidievents, ['note_off', $tick * $scale + $shift, $sequence++, -1, -1, $file];
+ }
+ }
+ }
+
@allmidievents = sort { $a->[1] <=> $b->[1] or $a->[2] <=> $b->[2] } @allmidievents;
my %midinotes = ();
{
my $chan = $_->[4] + 1;
$note_min = $_->[5]
- if not defined $note_min or $_->[5] < $note_min and $chan != 10;
+ if $chan != 10 and $chan > 0 and (not defined $note_min or $_->[5] < $note_min);
$note_max = $_->[5]
- if not defined $note_max or $_->[5] > $note_max and $chan != 10;
+ if $chan != 10 and $chan > 0 and (not defined $note_max or $_->[5] > $note_max);
if($midinotes{$chan}{$_->[5]})
{
--$notes_stuck;