-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgold_mine.sqf
133 lines (113 loc) · 4.61 KB
/
gold_mine.sqf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
local _mission = count WAI_MissionData -1;
local _aiType = _this select 0; // "Bandit" or "Hero"
local _position = [80] call WAI_FindPos;
local _name = "Gold Mine";
local _startTime = diag_tickTime;
local _difficulty = "Hard";
local _localName = "STR_CL_GOLDMINE_TITLE";
local _localized = ["STR_CL_MISSION_BANDIT", "STR_CL_MISSION_HERO"] select (_aiType == "Hero");
local _text = [_localized,_localName];
diag_log format["[WAI]: %1 %2 started at %3.",_aiType,_name,_position];
local _messages =
[
"STR_CL_GOLDMINE_ANNOUNCE"
,"STR_CL_GOLDMINE_WIN"
,"STR_CL_GOLDMINE_FAIL"
];
local _markers = [1,1,1,1];
_markers set [0, [_position, "WAI" + str(_mission), "ColorRed", "", "ELLIPSE", "Solid", [900,900], [], 0]];
_markers set [1, [_position, "WAI" + str(_mission) + "dot", "ColorBlack", "mil_dot", "", "", [], [_text], 0]];
if (WAI_AutoClaim) then
{
_markers set [2, [_position, "WAI" + str(_mission) + "auto", "ColorRed", "", "ELLIPSE", "Border", [WAI_AcAlertDistance,WAI_AcAlertDistance], [], 0]];
};
DZE_ServerMarkerArray set [count DZE_ServerMarkerArray, _markers];
_markerIndex = count DZE_ServerMarkerArray - 1;
PVDZ_ServerMarkerSend = ["start",_markers];
publicVariable "PVDZ_ServerMarkerSend";
WAI_MarkerReady = true;
DZE_MissionPositions set [count DZE_MissionPositions, _position];
local _posIndex = count DZE_MissionPositions - 1;
[_difficulty,(_messages select 0)] call WAI_Message;
local _timeout = false;
local _claimPlayer = objNull;
while {WAI_WaitForPlayer && !_timeout && {isNull _claimPlayer}} do {
_claimPlayer = [_position, WAI_TimeoutDist] call isClosestPlayer;
if (diag_tickTime - _startTime >= (WAI_Timeout * 60)) then
{
_timeout = true;
};
uiSleep 1;
};
if (_timeout) exitWith
{
[_mission, _aiType, _markerIndex, _posIndex] call WAI_AbortMission;
[_difficulty,(_messages select 2)] call WAI_Message;
diag_log format["[WAI]: %1 %2 aborted %3.",_aiType,_name,_position];
};
// Crates
[[[[10,5,[10,WAI_Gems],10,3],WAI_CrateLg,[0.2,0]]],_position,_mission] call WAI_SpawnCrate;
// Buildings
[
[
["MAP_R2_RockWall",[-24,11,-7.1],-85.388],
["MAP_R2_RockWall",[6,16,-5.9],-151.6],
["MAP_R2_RockWall",[30,3,-7.1],40.18],
["MAP_R2_RockWall",[45,-18,-7.1],131.1],
["MAP_R2_RockWall",[-29,-12,-7.1],-258.57],
["MAP_R2_RockWall",[-0.1,15,16.85]],
["MAP_R2_RockWall",[19,-9,17.6],-128.72],
["MAP_R2_RockWall",[-11,-3,14.8],165.8],
["MAP_R2_RockWall",[-3,-9,20.37]],
["MAP_R2_RockWall",[-29,-27,-7.1],66.4],
["MAP_R2_RockWall",[-20,-36,-7.1],23.5],
["MAP_R2_RockWall",[-2,-25,16.2],-13.9],
["MAP_R2_RockWall",[11,-30,16.2],-28.07],
["MAP_R2_RockTower",[7,-24,-20.4]],
["MAP_R2_Boulder2",[14,-27,-0.015]],
["MAP_R2_Boulder1",[18,-37,-0.015]],
["MAP_R2_Rock1",[-2,-7,-1.99,-25.05],-4.74],
["MAP_Ind_HammerMill",[30,-53,-6.1],-69.97],
["UralWreck",[34,-59,-0.01],14.54],
["MAP_Ind_Conveyer",[22,-45,0.1],116.29],
["Land_Dirthump01",[13,-38,-1.41],92.4],
["Land_Dirthump01",[13,-39,-1.45],42.23],
["MAP_R2_RockTower",[60,-55,-26.69]],
["MAP_R2_RockTower",[12,-121,-0.02],98.4],
["Gold_Vein_DZE",[13,-14,-0.01]],
["Gold_Vein_DZE",[-6,-25,-0.01]],
["Gold_Vein_DZE",[-8,-17,-0.01]],
["fiberplant",[7,-1,-0.02]],
["fiberplant",[5,-6,-0.02]],
["fiberplant",[-13,-21,-0.02]],
["fiberplant",[19,-21,-0.02]]
],_position,_mission
] call WAI_SpawnObjects;
// AI
[[(_position select 0) + 20, (_position select 1) - 54, .01],(ceil random 4),_difficulty,"Random","","Random",WAI_RockerSkin,3,_aiType,_mission] call WAI_SpawnGroup;
[[(_position select 0) - 15, (_position select 1) - 70, .01],5,_difficulty,"Random","","Random",WAI_RockerSkin,3,_aiType,_mission] call WAI_SpawnGroup;
[[(_position select 0) + 60, (_position select 1) - 38, .01],6,_difficulty,"Random","","Random",WAI_RockerSkin,3,_aiType,_mission] call WAI_SpawnGroup;
[[(_position select 0) + 33, (_position select 1) + 20, .01],6,_difficulty,"Random","","Random",WAI_RockerSkin,3,_aiType,_mission] call WAI_SpawnGroup;
// Turrets
[
[
[(_position select 0) + 44, (_position select 1) - 55, .01],
[(_position select 0) + 4, (_position select 1) - 70, .01]
],"M2StaticMG",_difficulty,_aiType,_aiType,"random","random","random",_mission
] call WAI_SpawnStatic;
uiSleep 30;
[
_mission, // Mission number
_position, // Position of mission
_difficulty, // Difficulty
_name, // Name of Mission
_localName, // localized marker text
_aiType, // "Bandit" or "Hero"
_markerIndex,
_posIndex,
_claimPlayer,
true, // show mission marker?
true, // make minefields available for this mission
["crate"], // Completion type: ["crate"], ["kill"], or ["assassinate", _unitGroup],
_messages
] spawn WAI_MissionMonitor;