[code]--
-- Random Sides Script for Star Wars Battlefront II Copyright (c) 2007 A.A.5. Productionzorz, All rights reserved.
-- Side Setup Script, Star Wars Battlefront II and Zero Engine Copyright (c) 2005 Pandemic Studios, LLC. All rights reserved.
--
function RandomLegion()
if unexpected_condition then error() end
CloneLegion = math.random(1,10) --Pic a number between 1 and 10
if CloneLegion <4 then --if math.random results in 2 or three (and maybe 1) 501st
ReadDataFile("SIDE\\rep.lvl",
"rep_inf_ep2_rocketeer",
"rep_inf_ep2_rocketeer_chaingun",
"rep_fly_gunship_sc",
"rep_hero_anakin",
"rep_hover_barcspeeder",
"rep_inf_ep3_rifleman",
"rep_inf_ep3_rocketeer",
"rep_inf_ep3_engineer",
"rep_inf_ep3_sniper",
"rep_inf_ep3_officer",
"rep_inf_ep3_jettrooper")
else
ReadDataFile("SIDE\\rep.lvl",
"rep_inf_ep2_rocketeer",
"rep_inf_ep2_rocketeer_chaingun",
"rep_fly_gunship_sc",
"rep_hero_anakin",
"rep_hover_barcspeeder")
end
if CloneLegion >3 and CloneLegion <6 then --if math.random results in 4 or 5 327th
ReadDataFile("SIDE\\rep327th.lvl",
"rep_inf_ep3_rifleman",
"rep_inf_ep3_rocketeer",
"rep_inf_ep3_engineer",
"rep_inf_ep3_sniper",
"rep_inf_ep3_officer",
"rep_inf_ep3_jettrooper")
end
if CloneLegion >5 and CloneLegion <8 then --if math.random results in 6 or 7 212th
ReadDataFile("SIDE\\rep212th.lvl",
"rep_inf_ep3_rifleman",
"rep_inf_ep3_rocketeer",
"rep_inf_ep3_engineer",
"rep_inf_ep3_sniper",
"rep_inf_ep3_officer",
"rep_inf_ep3_jettrooper")
end
if CloneLegion >7 and CloneLegion <11 then --if math.random results in 6 or 7 146th
ReadDataFile("SIDE\\rep146th.lvl",
"rep_inf_ep3_rifleman",
"rep_inf_ep3_rocketeer",
"rep_inf_ep3_engineer",
"rep_inf_ep3_sniper",
"rep_inf_ep3_officer",
"rep_inf_ep3_jettrooper")
end
end[/code]