goto _this
titleText ["!!!  E R R O R  !!!  SCRIPT ENDS  !!!  E R R O R  !!!","Plain"]
exit


#SETUP
;*******************
ECP_lod_enable = false
MERCS_Shuffle = {private ["_this","_newarray","_acount","_rand","_moveitem"]; _newarray = []; _temparray = [] + _this; while "count _temparray > 0" do {_acount = (count _temparray); _rand = random _acount; _rand = _rand - (_rand mod 1); _moveitem = _temparray select _rand; _newarray = _newarray + [_moveitem]; _temparray set [_rand, ""]; _temparray = _temparray - [""]}; _newarray}
setAccTime 1; 0 fadeMusic 0.5; 0 fadeSound 0.5
_scenes = ["01","02","03","04","05","06","07","08","09","10","11","12"]
_sccount = (count _scenes)
_starts = ["01","02","03","04","05","06","07","09","11","12"]
_stcount = (count _starts)
_rand = (random _stcount)
_rand = _rand - (_rand mod 1)
_first = (_starts select _rand)
_last = _first
_camera = "Camera" camCreate [0,0,0]
_camera cameraEffect ["Internal","Back"]
{CHIMNEY} exec "intro.sqs"
{CT_PC} exec "intro.sqs"
{MUSIC} exec "intro.sqs"
goto _first
;-------------------


#00
;MAINTENANCE
;*******************
_rand = (random _sccount)
_rand = _rand - (_rand mod 1)
_next = (_scenes select _rand)
~0.1
? ((_next == _last) || (_next == _before)) : goto "00"
goto _next
;-------------------


#01
;MANSION
;*******************
_ts = [[99620.57,5334.55,-22414.87],[77880.83,63226.62,-29229.64]]
_ps = [[2162.78,4824.82,28.38],[2162.78,4824.82,27.95]]
_s1 = 0; _s2 = 1; _fov1 = 0.747; _fov2 = 0.227
? (random 1 > 0.5) : _s1 = 1; _s2 = 0; _fov1 = 0.227; _fov2 = 0.747
_t1 = _ts select _s1; _p1 = _ps select _s1
_t2 = _ts select _s2; _p2 = _ps select _s2
_camera camSetTarget _t1
_camera camSetPos _p1
_camera camSetFov _fov1
_camera camCommit 0
@camCommitted _camera
~1.5
_camera camSetTarget _t2
_camera camSetPos _p2
_camera camSetFov _fov2
_camera camCommit 15
@camCommitted _camera
~1
_before = _last
~0.5
_last = "01"
goto "00"
;-------------------


#02
;HARBOUR NW
;*******************
_ts = [[-43050.80,-84452.15,-15355.59],[91392.14,-35925.63,-15355.84]]
_s1 = 0; _s2 = 1
? (random 1 > 0.5) : _s1 = 1; _s2 = 0
_t1 = _ts select _s1
_t2 = _ts select _s2
_camera camSetTarget _t1
_camera camSetPos [1003.34,3996.31,6.45]
_camera camSetFov 0.7
_camera camCommit 0
@camCommitted _camera
~1.5
_camera camSetTarget _t2
_camera camCommit 10
@camCommitted _camera
~1
_before = _last
~0.5
_last = "02"
goto "00"
;-------------------


#03
;TUNNEL
;*******************
_ps = [[1525.22,3438.48,1.10],[1525.22,3018.41,1.10]]
_s1 = 0; _s2 = 1
? (random 1 > 0.5) : _s1 = 1; _s2 = 0
_p1 = _ps select _s1
_p2 = _ps select _s2
_camera camSetTarget [1526.03,103062.34,14.02]
_camera camSetPos _p1
_camera camSetFov 0.7
_camera camCommit 0
@camCommitted _camera
~1.5
_camera camSetPos _p2
_camera camCommit 65
@camCommitted _camera
~1
_before = _last
~0.5
_last = "03"
goto "00"
;-------------------


#04
;RUINS
;*******************
_ts = [[98199.11,-10694.94,-19637.36],[46880.02,87851.71,-19637.80]]
_s1 = 0; _s2 = 1
? (random 1 > 0.5) : _s1 = 1; _s2 = 0
_t1 = _ts select _s1
_t2 = _ts select _s2
_camera camSetTarget _t1
_camera camSetPos [905.53,1274.28,24.25]
_camera camSetFov 0.7
_camera camCommit 0
@camCommitted _camera
~1.5
_camera camSetTarget _t2
_camera camCommit 10
@camCommitted _camera
~1
_before = _last
~0.5
_last = "04"
goto "00"
;-------------------


#05
;CITY RUINS
;*******************
_ts = [[80630.41,-53325.87,-25794.82],[92094.17,31767.10,-25794.31]]
_ps = [[631.67,799.31,16.98],[558.44,661.92,71.66]]
_s1 = 0; _s2 = 1
? (random 1 > 0.5) : _s1 = 1; _s2 = 0
_t1 = _ts select _s1; _p1 = _ps select _s1
_t2 = _ts select _s2; _p2 = _ps select _s2
_camera camSetTarget _t1
_camera camSetPos _p1
_camera camSetFov 0.7
_camera camCommit 0
@camCommitted _camera
~1.5
_camera camSetTarget _t2
_camera camSetPos _p2
_camera camCommit 20
@camCommitted _camera
~1
_before = _last
~0.5
_last = "05"
goto "00"
;-------------------


#06
;FISHING
;*******************
_p1 = [-50,-50,5]
_p2 = [-75,-75,-15]
? (random 1) < 0.5 : _p1 = [-75,-75,-15]; _p2 = [-50,-50,5]
_camera camSetTarget ECP_server
_camera camSetRelPos _p1
_camera camSetFov 0.75
_camera camCommit 0
@camCommitted _camera
~1.5
_camera camSetTarget ECP_server
_camera camSetRelPos _p2
_camera camCommit 20
@camCommitted _camera
~1
_before = _last
~0.5
_last = "06"
goto "00"
;-------------------


#07
;HARBOUR SW
;*******************
_ts = [[-97363.65,482.41,-21509.56],[-97363.65,482.41,-21509.76]]
_ps = [[289.19,714.93,7.29],[289.35,634.29,5.15]]
_s1 = 0; _s2 = 1
? (random 1 > 0.5) : _s1 = 1; _s2 = 0
_t1 = _ts select _s1; _p1 = _ps select _s1
_t2 = _ts select _s2; _p2 = _ps select _s2
_camera camSetTarget _t1
_camera camSetPos _p1
_camera camSetFov 0.7
_camera camCommit 0
@camCommitted _camera
~1.5
_camera camSetTarget _t2
_camera camSetPos _p2
_camera camCommit 20
@camCommitted _camera
~1
_before = _last
~0.5
_last = "07"
goto "00"
;-------------------


#08
;CONTROL CENTER
;*******************
Dude switchMove "FXInHand"
Nerd switchMove "CargoVer1"
_ts = [[-49843.69,-82075.97,-2270.93],[-51712.45,84356.63,-2270.90]]
_s1 = 0; _s2 = 1
? (random 1 > 0.5) : _s1 = 1; _s2 = 0
_t1 = _ts select _s1
_t2 = _ts select _s2
_camera camSetTarget _t1
_camera camSetPos [4614.63,1762.30,1.42]
_camera camSetFov 0.7
_camera camCommit 0
@camCommitted _camera
~1.5
_camera camSetTarget _t2
_camera camCommit 10
~3
Nerd doWatch [4601,1762,-1]
~2
Nerd say "MERCS_Keyboard"
@camCommitted _camera
~1
_before = _last
~0.5
_last = "08"
goto "00"
;-------------------


#09
;QUARTERS
;*******************
_ts = [[102312.95,1892.93,-21531.06],[102312.95,1892.93,-21530.79]]
_ps = [[4600.26,2375.03,6.87],[4689.69,2375.03,15.68]]
_s1 = 0; _s2 = 1
? (random 1 > 0.5) : _s1 = 1; _s2 = 0
_t1 = _ts select _s1; _p1 = _ps select _s1
_t2 = _ts select _s2; _p2 = _ps select _s2
_camera camSetTarget _t1
_camera camSetPos _p1
_camera camSetFov 0.7
_camera camCommit 0
@camCommitted _camera
~1.5
_camera camSetTarget _t2
_camera camSetPos _p2
_camera camCommit 20
@camCommitted _camera
~1
_before = _last
~0.5
_last = "09"
goto "00"
;-------------------


#10
;STILLS
;*******************
_phone = false
? (random 1 > 0.5) : goto "10A"
_camera camSetTarget [-64637.86,-65269.34,12999.88]
_camera camSetPos [4978.89,5334.52,0.10]
_camera camSetFov 0.7
_camera camCommit 0
@camCommitted _camera
~1
goto "10B"
#10A
_phone = true
Chef switchMove "CargoVer2"
_camera camSetTarget [76235.80,63206.10,-25938.31]
_camera camSetPos [1404.58,2204.30,2.27]
_camera camSetFov 0.723
_camera camCommit 0
@camCommitted _camera
~1
Honk switchMove "FXCivilArmsAkimboL"
#10B
~1
? (_phone) : Chef say "MERCS_Telephone"
~2.5
_before = _last
~0.5
_last = "10"
goto "00"
;-------------------

#11
;FORTRESS AND BASE
;*******************
_ts = [[-36462.05,92521.81,-20135.21],[77929.77,63060.32,-20132.92]]
_ps = [[1262.89,2148.11,4.31],[1262.89,2148.11,68.25]]
_s1 = 0; _s2 = 1
? (random 1 > 0.5) : _s1 = 1; _s2 = 0
_t1 = _ts select _s1; _p1 = _ps select _s1
_t2 = _ts select _s2; _p2 = _ps select _s2
_camera camSetTarget _t1
_camera camSetPos _p1
_camera camSetFov 0.814
_camera camCommit 0
@camCommitted _camera
~1.5
_camera camSetTarget _t2
_camera camSetPos _p2
_camera camCommit 20
@camCommitted _camera
~1
_before = _last
~0.5
_last = "11"
goto "00"
;-------------------


#12
;BASE NW
;*******************
_ts = [[-74808.34,68816.02,-6406.58],[46035.46,89370.30,-26985.30]]
_ps = [[1222.41,4181.50,13.88],[1222.41,4181.50,81.75]]
_s1 = 0; _s2 = 1; _fov1 = 0.539; _fov2 = 0.204
? (random 1 > 0.5) : _s1 = 1; _s2 = 0; _fov1 = 0.204; _fov2 = 0.539
_t1 = _ts select _s1; _p1 = _ps select _s1
_t2 = _ts select _s2; _p2 = _ps select _s2
_camera camSetTarget _t1
_camera camSetPos _p1
_camera camSetFov _fov1
_camera camCommit 0
@camCommitted _camera
~1.5
_camera camSetTarget _t2
_camera camSetPos _p2
_camera camSetFov _fov2
_camera camCommit 20
@camCommitted _camera
~1
_before = _last
~0.5
_last = "12"
goto "00"
;-------------------


#CHIMNEY
;*******************
_chimney = (object 30763)
#SMOKELOOP
drop ["cl_basic","","Billboard",10,(random(3)+7),[2.5,-2.8,5.6],[(random(1)-0.5),(random(1)-0.5),2.5],0,1.275,1.1,1,[0.75,4],[[1,1,1,0.8],[1,1,1,0]],[0],0.2,0.2,"","",_chimney]
~0.12
goto "SMOKELOOP"
;-------------------


#CT_PC
;*******************
@ alive ECP_server
_front = "\data\pc_frontback.pac"
_keyboard = "\data\klabosnice.pac"
_tex_win98 = ["\MERCS_B\5\mon_1.paa","\MERCS_B\5\mon_2.paa","\MERCS_B\5\mon_5.paa"]
_tex_winxp = ["\MERCS_B\5\mon_3.paa","\MERCS_B\5\mon_4.paa","\MERCS_B\5\mon_6.paa"]
_xmod = 5.35
_ymod = 0.05
_ct3 = object 7235
_pos3 = getPos _ct3
_pos3x = (_pos3 select 0) - _xmod
_pos3y = (_pos3 select 1) - _ymod
_dir3 = (getDir _ct3) + 180
_pc3 = "MERCS_CT_PC" camCreate [0,0,0]
_pc3 setDir _dir3
_pc3 setPos [_pos3x,_pos3y,0]
_tex_983 = _tex_win98 call MERCS_Shuffle
_tex_xp3 = _tex_winxp call MERCS_Shuffle
_pc3 setObjectTexture [0, (_tex_983 select 0)]
_pc3 setObjectTexture [1, (_tex_983 select 1)]
_pc3 setObjectTexture [2, (_tex_xp3 select 0)]
_pc3 setObjectTexture [3, (_tex_xp3 select 1)]
_pc3 setObjectTexture [4, _front]
_pc3 setObjectTexture [5, _keyboard]
exit
;-------------------


#MUSIC
;*******************
~(random 5)
_skip = (random 1)
? _skip < 0.33 : goto "MUSIC_SKIP1"
? _skip < 0.66 : goto "MUSIC_SKIP2"
#MUSIC_LOOP
playMusic "MERCS_Night"
~121
#MUSIC_SKIP1
playMusic "MERCS_Stealth"
~170
#MUSIC_SKIP2
playMusic "MERCS_Tenement"
~176
goto "MUSIC_LOOP"
;-------------------
