Hazza #2 [429.7]
140 rounds, 127 wins, 13 losses, 0 draws
Ships
RocketScanner2
lsl = true
function Start()
if GY:Ang() > 90 and GY:Ang() < 180 then
lsl = true
elseif GY:Ang() > 270 and GY:Ang() < 360 then
lsl = true
else
lsl = false
end
print(GY:Ang())
print(lsl)
end
function Update()
local av = GY:AngVel()
local mav = 25
S()
if lsl then
if av < mav then
L()
else
R()
end
else
if av > -mav then
R()
else
L()
end
end
if SL:Range() > 0 and not SL:IsAlly() then
mav = 25
lsl = true
end
if SR:Range() > 0 and not SR:IsAlly() then
mav = 25
lsl = false
end
if SB:Range() > 0 and not SB:IsAlly() then
mav = 40
end
if SFL:Range() > 0 and not SFL:IsAlly() then
--print("Seen on FL")
mav = 10
if SFR:Range() > 0 and not SFR:IsAlly() then
print("Seen both")
TA(av)
elseif not SFR.alive then
TA(av)
else
lsl = true
end
elseif not SFL.alive then
if SFR:Range() > 0 and not SFR:IsAlly() then
--print("Seen on FR")
TA(av)
end
else
if SFR:Range() > 0 and not SFR:IsAlly() then
--print("Seen on FR")
mav = 10
lsl = false
else
--print("Not seen")
end
end
end
function TA(av)
FA()
if av < -7 then
L()
elseif av > 7 then
R()
end
end
function S()
TBL:SetThrust(0)
TBR:SetThrust(0)
TL:SetThrust(0)
TR:SetThrust(0)
end
function R()
S()
TBL:SetThrust(1)
TR:SetThrust(1)
end
function L()
S()
TBR:SetThrust(1)
TL:SetThrust(1)
end
function FA()
S()
R1:Fire()
R2:Fire()
R3:Fire()
R4:Fire()
R5:Fire()
end