Author Topic: Gridlock(CB)(bacillus)-27-05-08  (Read 2571 times)

Offline bacillus

  • Bot Overlord
  • ****
  • Posts: 907
    • View Profile
Gridlock(CB)(bacillus)-27-05-08
« on: May 27, 2008, 03:57:15 AM »
'Gridlock
'A communal bot by Bacillus
'Inspired by Commander Keen's Republican Bee
'Forms a defensive grid in the center of the map
def status 42
def cx 43
def cy 44
def lastx 45
def lasty 46
def temp 47

cond
 *.robage 0 =
start
 1256 .out1 store
 1256 9 div dup dup dup dup dup dup dup dup 30 add .eye6dir store
 2 mult 60 add .eye7dir store
 3 mult 90 add .eye8dir store
 4 mult 130 add .eye9dir store
 -1 mult 30 sub .eye4dir store
 -2 mult 60 sub .eye3dir store
 -3 mult 90 sub .eye2dir store
 -4 mult 130 sub .eye1dir store
 1256 9 div 30 sub dup dup dup dup dup dup dup dup .eye1width store
 .eye2width store
 .eye3width store
 .eye4width store
 .eye5width store
 .eye6width store
 .eye7width store
 .eye8width store
 .eye9width store
 0 .status store
 0 .fixpos store
stop

start
 *.nrg 3 div *.body sub dup .strbody store - .fdbody store

 *.cx .out2 store
 *.cy .out3 store
 *.status .out4 store
 *.cx *.cy dist .out5 store

 10 .up store
 'OCULUS II
 -4 *.eye1 *.eye9 sub sgn 0 floor mult *.eye1 *.eye8 sub sgn 0 floor mult
*.eye1 *.eye7 sub sgn 0 floor mult *.eye1 *.eye6 sub sgn 0 floor mult *.eye1
*.eye5

sub sgn 0 floor mult *.eye1 *.eye4 sub sgn 0 floor mult *.eye1 *.eye3 sub
sgn 0 floor mult *.eye1 *.eye2 sub sgn 0 floor mult 4 *.eye9 *.eye8 sub sgn
0 floor

mult *.eye9 *.eye7 sub sgn 0 floor mult *.eye9 *.eye6 sub sgn 0 floor mult
*.eye9 *.eye5 sub sgn 0 floor mult *.eye9 *.eye4 sub sgn 0 floor mult *.eye9
*.eye3 sub sgn 0 floor mult *.eye9 *.eye2 sub sgn 0 floor mult *.eye9 *.eye1
sub

sgn ++ sgn mult add -3 *.eye2 *.eye9 sub sgn ++ sgn mult *.eye2 *.eye8 sub
sgn 0 floor mult *.eye2 *.eye7 sub sgn 0 floor mult *.eye2 *.eye6 sub sgn 0
floor

mult *.eye2 *.eye5 sub sgn 0 floor mult *.eye2 *.eye4 sub sgn 0 floor mult
*.eye2 *.eye3 sub sgn 0 floor mult *.eye2 *.eye1 sub sgn ++ sgn mult add 3
*.eye8

*.eye9 sub sgn ++ sgn mult *.eye8 *.eye7 sub sgn 0 floor mult *.eye8 *.eye6
sub sgn 0 floor mult *.eye8 *.eye5 sub sgn 0 floor mult *.eye8 *.eye4 sub
sgn 0

floor mult *.eye8 *.eye3 sub sgn 0 floor mult *.eye8 *.eye2 sub sgn ++ sgn
mult *.eye8 *.eye1 sub sgn ++ sgn mult add -2 *.eye3 *.eye9 sub sgn ++ sgn
mult

*.eye3 *.eye8 sub sgn ++ sgn mult *.eye3 *.eye7 sub sgn 0 floor mult *.eye3
*.eye6 sub sgn 0 floor mult
*.eye3 *.eye5 sub sgn 0 floor mult *.eye3 *.eye4 sub sgn 0 floor mult *.eye3
*.eye2 sub sgn ++ sgn mult *.eye3 *.eye1 sub sgn ++ sgn mult add 2 *.eye7
*.eye9

sub sgn ++ sgn mult *.eye7 *.eye8 sub sgn ++ sgn mult *.eye7 *.eye7 sub sgn
0 floor mult *.eye7 *.eye6 sub sgn 0 floor mult *.eye7 *.eye5 sub sgn 0
floor

mult *.eye7 *.eye4 sub sgn ++ sgn mult *.eye7 *.eye2 sub sgn ++ sgn mult
*.eye7 *.eye1 sub sgn ++ sgn mult add -1 *.eye4 *.eye9 sub sgn ++ sgn mult
*.eye4

*.eye8 sub sgn ++ sgn mult *.eye4 *.eye7 sub sgn ++ sgn mult *.eye4 *.eye6
sub sgn 0 floor mult *.eye4 *.eye5 sub sgn 0 floor mult *.eye4 *.eye3 sub
sgn ++

sgn mult *.eye4 *.eye2 sub sgn ++ sgn mult *.eye4 *.eye1 sub sgn ++ sgn mult
add 1 *.eye4 *.eye9 sub sgn ++ sgn mult *.eye4 *.eye8 sub sgn ++ sgn mult
*.eye4

*.eye7 sub sgn ++ sgn mult *.eye4 *.eye6 sub sgn ++ sgn mult *.eye4 *.eye5
sub sgn 0 floor mult
*.eye4 *.eye3 sub sgn ++ sgn mult *.eye4 *.eye2 sub sgn ++ sgn mult *.eye4
*.eye1 sub sgn ++ sgn mult add 0 *.eye5 *.eye9 sub sgn ++ sgn mult *.eye5
*.eye8

sub sgn ++ sgn mult *.eye5 *.eye7 sub sgn ++ sgn mult *.eye5 *.eye6 sub sgn
++ sgn mult *.eye5 *.eye4 sub sgn ++ sgn mult *.eye5 *.eye3 sub sgn ++ sgn
mult

*.eye5 *.eye2 sub sgn ++ sgn mult *.eye5 *.eye1 sub sgn ++ sgn mult add
.focuseye store
stop

cond
 *.body 1000 >
start
 0 .strbody store
 *.body 1000 sub .fdbody store
stop

cond
*.status 0 =
start
 0 0 angle .setaim store
stop

cond
*.cx *.xpos 2 div <
start
 *.xpos 2 div .cx store
stop

cond
 *.cy *.ypos 2 div <
start
 *.ypos 2 div .cy store
stop

cond
 *.in1 *.out1 =
 *.cx *.in2 <
start
 *.in2 .cx store
stop

cond
 *.in1 *.out1 =
 *.cy *.in3 <
start
 *.in3 .cy store
stop

cond
 *.robage 20 >
 *.xpos *.lastx sub abs *.maxvel >
 *.ypos *.lasty sub abs *.maxvel >
 *.status 0 =
start
 .status inc
stop

cond
 *.status 1 =
start
 *.cx *.cy angle .setaim store
 *.velsx .dx store
stop

cond
 *.eyef 0 !=
 *.in1 *.out1 !=
 *.status 2 = or
start
 *.refxpos *.refypos angle .setaim store
 *.velsx .dx store
stop

cond
 *.nrg 5000 >
start
 *.nrg 5000 sub 3 div .mkshell store
stop

cond
 *.nrg 20000 >
start
 5000 .mkslime store
stop

cond
 *.in1 *.out1 !=
 *.refbody 2000 > or
 *.eye5 40 >
start
 -6 .shoot store
stop

cond
 *.in1 *.out1 !=
 *.eye5 0 >
 *.eye5 40 <
 *.status 2 =
 *.timer 10 mod 7 =
start
 -32 .shootval store
 -6 .shoot store
stop

cond
 *.status 1 =
 *.cx *.cy dist 100 <
 *.in1 *.out1 =
 *.in4 2 = and
 *.eyef 2 = and xor
 *.temp 5 <
start
 .temp inc
stop

cond
 *.status 1 = and
 *.cx *.cy dist 100 < and
 *.in1 *.out1 =
 *.in4 2 = and
 *.eyef 2 = and xor not
 *.temp 0 !=
start
 0 .temp store
stop

cond
 *.status 2 =
 *.in4 2 =
 *.in1 *.out1 =
 *.refnrg *.nrg sub 1000 >
 *.timer 10 mod 2 =
start
 -16 .shootval store
 -1 .shoot store
stop

cond
 *.waste 100 >
start
 *.waste .shootval store
 -4 .shoot store
stop

cond
 *.status 1 =
 *.cx *.cy dist 100 <
 *.in1 *.out1 =
 *.in4 2 = and
 *.eyef 2 = and xor
 *.temp 5 =
start
 .status inc
 .fixpos inc
stop

cond
 *.eyef 2 >
 *.in1 *.out1 =
 *.status 1 =
 *.in4 2 =
start
 -12 .up store
 3 .dx store
stop

cond
 *.status 2 =
 *.eyef 2 >
 *.in4 2 =
 *.out5 *.in5 <=
start
 0 .fixpos store
 1 .status store
 -25 .up store
stop

cond
 *.nrg 10000 >
 *.timer 250 mod 7 =
 *.status 2 =
start
 1256 rnd .setaim store
 30 .repro store
stop

start
 *.xpos .lastx store
 *.ypos .lasy store
stop
"They laughed at Columbus, they laughed at Fulton, they laughed at the Wright brothers. But they also laughed at Bozo the Clown."
- Carl Sagan