///// The 1-key was hit by player 0

macro "p12"//This is a macro

loop
get "player02"
mark 1//floats 1-3 contain position of the target town
seti 1,0
loadi "life",2
if i,2,>,1

setb 1,true//true throughout this script
setb 3,true//true when a free missile base was found

//Now find a missile base that is not shooting
get "player11"
loadb "busy",2
if b,2,=,1
get "player12"
loadb "busy",2
if b,2,=,1
get "player13"
loadb "busy",2
if b,2,=,1
get "player14"
loadb "busy",2
if b,2,=,1
get "player15"
loadb "busy",2
if b,2,=,1
get "player16"
loadb "busy",2
if b,2,=,1
//all missile bases are busy
player
setb 3,false
endif
endif
endif
endif
endif
endif

if b,3,=,1
storef "targetX",1
storef "targetY",2
storef "targetZ",3
storeb "busy",1
endif
endif
endloop